Class OpenGuiWindowCriterionInstance
java.lang.Object
net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
com.minecolonies.api.advancements.open_gui_window.OpenGuiWindowCriterionInstance
- All Implemented Interfaces:
net.minecraft.advancements.CriterionTriggerInstance
public class OpenGuiWindowCriterionInstance
extends net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
The test instance to check the "window_resource_location" for the "open_gui_window" trigger
-
Constructor Summary
ConstructorsConstructorDescriptionOpenGuiWindowCriterionInstance(net.minecraft.resources.ResourceLocation windowResource) Construct the check with a single condition -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull OpenGuiWindowCriterionInstancedeserializeFromJson(@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) booleantest(net.minecraft.resources.ResourceLocation windowResource) Performs the check for the conditionsMethods inherited from class net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance
getCriterion, getPlayerPredicate, toString
-
Constructor Details
-
OpenGuiWindowCriterionInstance
public OpenGuiWindowCriterionInstance() -
OpenGuiWindowCriterionInstance
public OpenGuiWindowCriterionInstance(net.minecraft.resources.ResourceLocation windowResource) Construct the check with a single condition- Parameters:
windowResource- the window that has to be opened to succeed
-
-
Method Details
-
test
public boolean test(net.minecraft.resources.ResourceLocation windowResource) Performs the check for the conditions- Parameters:
windowResource- the blockui window id that was just opened- Returns:
- whether the check succeeded
-
deserializeFromJson
@NotNull public static @NotNull OpenGuiWindowCriterionInstance 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
-