Class PlaceStructureCriterionInstance

java.lang.Object
net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
com.minecolonies.api.advancements.place_structure.PlaceStructureCriterionInstance
All Implemented Interfaces:
net.minecraft.advancements.CriterionTriggerInstance

public class PlaceStructureCriterionInstance extends net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
The test instance to check the "hut_name" or "structure_name" for the "place_structure" trigger
  • Constructor Details

    • PlaceStructureCriterionInstance

      public PlaceStructureCriterionInstance()
    • PlaceStructureCriterionInstance

      public PlaceStructureCriterionInstance(String hutName)
      Construct the check with a single condition
      Parameters:
      hutName - the hut that has to be placed to succeed
  • Method Details

    • test

      public boolean test(String hutName)
      Performs the check for the conditions
      Parameters:
      hutName - the id of the structure that was just placed
      Returns:
      whether the check succeeded
    • deserializeFromJson

      @NotNull public static @NotNull PlaceStructureCriterionInstance deserializeFromJson(@NotNull @NotNull com.google.gson.JsonObject jsonObject, @NotNull @NotNull net.minecraft.advancements.critereon.DeserializationContext context)
    • serializeToJson

      @NotNull public @NotNull com.google.gson.JsonObject serializeToJson(@NotNull @NotNull net.minecraft.advancements.critereon.SerializationContext context)
      Specified by:
      serializeToJson in interface net.minecraft.advancements.CriterionTriggerInstance
      Overrides:
      serializeToJson in class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance