Interface IQuestInstance

All Superinterfaces:
net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
All Known Implementing Classes:
QuestInstance

public interface IQuestInstance extends net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Quest instance
  • Method Details

    • onStart

      void onStart(net.minecraft.world.entity.player.Player player, IColony colony)
      Triggered when the quest is accepted
      Parameters:
      player - player accepting
    • getQuestGiver

      IQuestGiver getQuestGiver()
      Get the id of the quest giver. Server only!
      Returns:
      the id of the quest giver.
    • getQuestGiverId

      int getQuestGiverId()
      Id of questgiver.
      Returns:
      the id.
    • isValid

      boolean isValid(IColony colony)
      Check if the expiration date relative to the colony day count was reached.
      Parameters:
      colony - the colony to check the validity for.
      Returns:
      true if so.
    • getId

      net.minecraft.resources.ResourceLocation getId()
      Get the quest id of the quest.
      Returns:
      the id.
    • onDeletion

      void onDeletion()
      On deletion of the quest.
    • advanceObjective

      IObjectiveInstance advanceObjective(net.minecraft.world.entity.player.Player player, int nextObjective)
      Advance the quest objective to this id.
      Parameters:
      player - the player advancing this objective.
      nextObjective - the id to advance it to.
      Returns:
      the next objective instance.
    • onCompletion

      void onCompletion()
      On question completion call.
    • getObjectiveIndex

      int getObjectiveIndex()
      Get the current objective index.
      Returns:
      the index number.
    • getParticipant

      IQuestParticipant getParticipant(int target)
      Get one of the other participants by index.
      Parameters:
      target - the target participant id.
      Returns:
      the quest participant.
    • getParticipants

      List<Integer> getParticipants()
      Get the full list of quest participants.
      Returns:
      the list of participants.
    • getQuestTarget

      int getQuestTarget()
      Get the id of the current task holder in the quest.
      Returns:
      the quest participant.
    • getCurrentObjectiveInstance

      @Nullable @Nullable IObjectiveInstance getCurrentObjectiveInstance()
      Get the objective data of the current objective.
      Returns:
      the data.
    • getColony

      IColony getColony()
      Get the colony matching the quest.
      Returns:
      the colony.
    • getAssignedPlayer

      UUID getAssignedPlayer()
      Get the player UUID that accepted the quest.
      Returns:
      the player uuid.
    • advanceObjective

      void advanceObjective(net.minecraft.world.entity.player.Player player)
      Simple advance objective by one.
      Parameters:
      player - the player involved.
    • onWorldLoad

      void onWorldLoad()
      On world load trigger.