Class StateQuestTriggerTemplate
java.lang.Object
com.minecolonies.core.quests.triggers.StateQuestTriggerTemplate
- All Implemented Interfaces:
IQuestTriggerTemplate
Random quest trigger.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intHow often we have to match.final com.google.gson.JsonElementThe tag we are trying to match.Path of keys to the nbt we are trying to match, -
Constructor Summary
ConstructorsConstructorDescriptionStateQuestTriggerTemplate(String[] paths, com.google.gson.JsonElement match, int count) Create a new state quest trigger. -
Method Summary
Modifier and TypeMethodDescriptioncanTriggerQuest(IColony colony) Check if the quest trigger condition is fulfilled.static StateQuestTriggerTemplatecreateStateTrigger(com.google.gson.JsonObject questTriggerJson) Create a new trigger directly from json.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.quests.IQuestTriggerTemplate
canTriggerQuest
-
Field Details
-
nbtPath
Path of keys to the nbt we are trying to match, -
matchTag
public final com.google.gson.JsonElement matchTagThe tag we are trying to match. -
matchCount
public final int matchCountHow often we have to match.
-
-
Constructor Details
-
StateQuestTriggerTemplate
Create a new state quest trigger.- Parameters:
paths- the path to the state to match.match- the state to match.count- the number of matches we have to find.
-
-
Method Details
-
createStateTrigger
public static StateQuestTriggerTemplate createStateTrigger(com.google.gson.JsonObject questTriggerJson) Create a new trigger directly from json.- Parameters:
questTriggerJson- the json associated to this trigger.
-
canTriggerQuest
Description copied from interface:IQuestTriggerTemplateCheck if the quest trigger condition is fulfilled.- Specified by:
canTriggerQuestin interfaceIQuestTriggerTemplate- Parameters:
colony- the colony the quest is in.- Returns:
- true if so.
-