Interface IQuestManager

All Superinterfaces:
net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
All Known Implementing Classes:
QuestManager

public interface IQuestManager extends net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Interface of the Quest manager of each colony.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Map<net.minecraft.resources.ResourceLocation,IQuestTemplate>
    All quests that exist.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    alterReputation(double difference)
    Alter the quest reputation.
    boolean
    attemptAcceptQuest(net.minecraft.resources.ResourceLocation questID, net.minecraft.world.entity.player.Player player)
    Have player attempt to accept a colony quest.
    void
    completeQuest(net.minecraft.resources.ResourceLocation questId)
    Conclude a given quest.
    void
    deleteQuest(net.minecraft.resources.ResourceLocation questID)
    Deactivate a given quest.
    void
    deserialize(net.minecraft.network.RegistryFriendlyByteBuf buf)
    Deserialize network data
    @Nullable IQuestInstance
    getAvailableOrInProgressQuest(net.minecraft.resources.ResourceLocation questId)
    Get the currently available or in progress quest with a given id.
    Get the list of available quests in the colony.
    Get the list of completed quests in the colony.
    Get the list of in progress quests in the colony.
    double
    Get the reputation of the colony.
    void
    Inject an available quest manually.
    boolean
    isUnlocked(net.minecraft.resources.ResourceLocation questId)
    Check if a quest is unlocked.
    void
     
    void
    On each colony tick.
    void
    On world load handling.
    void
    serialize(net.minecraft.network.RegistryFriendlyByteBuf buf, boolean hasNewSubscribers)
    Serialize to network data
    void
    unlockQuest(net.minecraft.resources.ResourceLocation questId)
    Unlock a quest with a given id.

    Methods inherited from interface net.neoforged.neoforge.common.util.INBTSerializable

    deserializeNBT, serializeNBT
  • Field Details

    • GLOBAL_SERVER_QUESTS

      static final Map<net.minecraft.resources.ResourceLocation,IQuestTemplate> GLOBAL_SERVER_QUESTS
      All quests that exist.
  • Method Details

    • attemptAcceptQuest

      boolean attemptAcceptQuest(net.minecraft.resources.ResourceLocation questID, net.minecraft.world.entity.player.Player player)
      Have player attempt to accept a colony quest.
      Parameters:
      questID - the unique id of the quest.
      player - the player trying to accept it.
      Returns:
      true if successful.
    • completeQuest

      void completeQuest(net.minecraft.resources.ResourceLocation questId)
      Conclude a given quest. This is called FROM the quest, to the colony.
      Parameters:
      questId - the unique id of the quest.
    • onColonyTick

      void onColonyTick()
      On each colony tick.
    • deleteQuest

      void deleteQuest(net.minecraft.resources.ResourceLocation questID)
      Deactivate a given quest.
      Parameters:
      questID - the id of the quest.
    • getAvailableOrInProgressQuest

      @Nullable @Nullable IQuestInstance getAvailableOrInProgressQuest(net.minecraft.resources.ResourceLocation questId)
      Get the currently available or in progress quest with a given id.
      Parameters:
      questId - the id.
      Returns:
      the quest.
    • onWorldLoad

      void onWorldLoad()
      On world load handling.
    • unlockQuest

      void unlockQuest(net.minecraft.resources.ResourceLocation questId)
      Unlock a quest with a given id.
      Parameters:
      questId - the quest to unlock.
    • isUnlocked

      boolean isUnlocked(net.minecraft.resources.ResourceLocation questId)
      Check if a quest is unlocked.
      Parameters:
      questId - the id of the quest.
      Returns:
      true if so.
    • alterReputation

      void alterReputation(double difference)
      Alter the quest reputation.
      Parameters:
      difference - the alteration.
    • getReputation

      double getReputation()
      Get the reputation of the colony.
      Returns:
      the reputation.
    • markDirty

      void markDirty()
    • getAvailableQuests

      List<IQuestInstance> getAvailableQuests()
      Get the list of available quests in the colony.
      Returns:
      the list of quest instances.
    • getInProgressQuests

      List<IQuestInstance> getInProgressQuests()
      Get the list of in progress quests in the colony.
      Returns:
      the list of quest instances.
    • getFinishedQuests

      List<FinishedQuest> getFinishedQuests()
      Get the list of completed quests in the colony.
      Returns:
      the list of quest templates, and how often they've been completed.
    • injectAvailableQuest

      void injectAvailableQuest(IQuestInstance questInstance)
      Inject an available quest manually.
      Parameters:
      questInstance - the quest instance to inject.
    • serialize

      void serialize(net.minecraft.network.RegistryFriendlyByteBuf buf, boolean hasNewSubscribers)
      Serialize to network data
      Parameters:
      buf -
      hasNewSubscribers -
    • deserialize

      void deserialize(net.minecraft.network.RegistryFriendlyByteBuf buf)
      Deserialize network data
      Parameters:
      buf -