Class CreateBuildRequestCriterionInstance
java.lang.Object
net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
com.minecolonies.api.advancements.create_build_request.CreateBuildRequestCriterionInstance
- All Implemented Interfaces:
net.minecraft.advancements.CriterionTriggerInstance
public class CreateBuildRequestCriterionInstance
extends net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
The test instance to check "hut_name" or "structure_name" for the "create_build_request" trigger
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct the check with a single conditionCreateBuildRequestCriterionInstance(String hutName, int level) Construct the check with a more specific condition -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull CreateBuildRequestCriterionInstancedeserializeFromJson(@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
-
CreateBuildRequestCriterionInstance
public CreateBuildRequestCriterionInstance() -
CreateBuildRequestCriterionInstance
Construct the check with a single condition- Parameters:
hutName- the hut that has to be requested to succeed
-
CreateBuildRequestCriterionInstance
Construct the check with a more specific condition- Parameters:
hutName- the hut that has to be requested to succeedlevel- the level that the request should complete
-
-
Method Details
-
test
Performs the check for the conditions- Parameters:
structureName- the id of the structure that was just requestedlevel- the level that the structure will be once completed, or 0- Returns:
- whether the check succeeded
-
deserializeFromJson
@NotNull public static @NotNull CreateBuildRequestCriterionInstance 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
-