Class StateQuestTriggerTemplate

java.lang.Object
com.minecolonies.core.quests.triggers.StateQuestTriggerTemplate
All Implemented Interfaces:
IQuestTriggerTemplate

public class StateQuestTriggerTemplate extends Object implements IQuestTriggerTemplate
Random quest trigger.
  • Field Details

    • nbtPath

      public final List<String> nbtPath
      Path of keys to the nbt we are trying to match,
    • matchTag

      public final com.google.gson.JsonElement matchTag
      The tag we are trying to match.
    • matchCount

      public final int matchCount
      How often we have to match.
  • Constructor Details

    • StateQuestTriggerTemplate

      public StateQuestTriggerTemplate(String[] paths, com.google.gson.JsonElement match, int count)
      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

      public ITriggerReturnData canTriggerQuest(IColony colony)
      Description copied from interface: IQuestTriggerTemplate
      Check if the quest trigger condition is fulfilled.
      Specified by:
      canTriggerQuest in interface IQuestTriggerTemplate
      Parameters:
      colony - the colony the quest is in.
      Returns:
      true if so.