Package com.minecolonies.api.quests
Interface IQuestTemplate
- All Known Implementing Classes:
QuestTemplate
public interface IQuestTemplate
Quest Data Instance.
-
Method Summary
Modifier and TypeMethodDescriptionattemptStart(IColony colony) This is where we actually check if the colony fulfills the quest requirements.intHow often we can redo this quest.net.minecraft.network.chat.ComponentgetName()The name of the quest.getObjective(int index) Get the objective at a given index.intGet the objective count of this quest.List<net.minecraft.resources.ResourceLocation> Get the list of parent quests.intTimeout in ingame days until an available quest or in progress quest gets deleted.voidunlockQuestRewards(IColony colony, net.minecraft.world.entity.player.Player player, IQuestInstance colonyQuest, List<Integer> unlockedRewards) Unlock the quest rewards.
-
Method Details
-
attemptStart
This is where we actually check if the colony fulfills the quest requirements.- Parameters:
colony- the colony to check.- Returns:
- the colony quest instance if successful.
-
getQuestTimeout
int getQuestTimeout()Timeout in ingame days until an available quest or in progress quest gets deleted.- Returns:
- the timeout.
-
getMaxOccurrence
int getMaxOccurrence()How often we can redo this quest.- Returns:
- the number.
-
unlockQuestRewards
void unlockQuestRewards(IColony colony, net.minecraft.world.entity.player.Player player, IQuestInstance colonyQuest, List<Integer> unlockedRewards) Unlock the quest rewards.- Parameters:
colony- the colony.player- the player.colonyQuest- the quest.unlockedRewards- the applicable rewards.
-
getObjective
Get the objective at a given index.- Parameters:
index- the index of the objective.- Returns:
- the current objective.
-
getObjectiveCount
int getObjectiveCount()Get the objective count of this quest.- Returns:
- the count.
-
getName
net.minecraft.network.chat.Component getName()The name of the quest.- Returns:
- the name of the quest.
-
getParents
List<net.minecraft.resources.ResourceLocation> getParents()Get the list of parent quests.- Returns:
- the list of parent quests.
-