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 Summary
ConstructorsConstructorDescriptionPlaceStructureCriterionInstance(String hutName) Construct the check with a single condition -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull PlaceStructureCriterionInstancedeserializeFromJson(@NotNull com.google.gson.JsonObject jsonObject, @NotNull net.minecraft.advancements.critereon.DeserializationContext context) @NotNull com.google.gson.JsonObjectserializeToJson(@NotNull net.minecraft.advancements.critereon.SerializationContext context) booleanPerforms the check for the conditionsMethods inherited from class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
getCriterion, getPlayerPredicate, toString
-
Constructor Details
-
PlaceStructureCriterionInstance
public PlaceStructureCriterionInstance() -
PlaceStructureCriterionInstance
Construct the check with a single condition- Parameters:
hutName- the hut that has to be placed to succeed
-
-
Method Details
-
test
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:
serializeToJsonin interfacenet.minecraft.advancements.CriterionTriggerInstance- Overrides:
serializeToJsonin classnet.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
-