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