Class ItemPredicate
java.lang.Object
net.minecraft.advancements.critereon.ItemPredicate
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ItemPredicateprivate final MinMaxBounds.Intsprivate static final Map<ResourceLocation,Function<com.google.gson.JsonObject, ItemPredicate>> private final MinMaxBounds.Intsprivate final EnchantmentPredicate[]private final NbtPredicateprivate final Potionprivate final EnchantmentPredicate[]private static final Map<ResourceLocation,Function<com.google.gson.JsonObject, ItemPredicate>> -
Constructor Summary
ConstructorsConstructorDescriptionItemPredicate(TagKey<Item> p_204137_, Set<Item> p_204138_, MinMaxBounds.Ints p_204139_, MinMaxBounds.Ints p_204140_, EnchantmentPredicate[] p_204141_, EnchantmentPredicate[] p_204142_, Potion p_204143_, NbtPredicate p_204144_) -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemPredicatefromJson(com.google.gson.JsonElement p_45052_) static ItemPredicate[]fromJsonArray(com.google.gson.JsonElement p_45056_) static Map<ResourceLocation,Function<com.google.gson.JsonObject, ItemPredicate>> booleanstatic voidregister(ResourceLocation name, Function<com.google.gson.JsonObject, ItemPredicate> deserializer) com.google.gson.JsonElement
-
Field Details
-
custom_predicates
private static final Map<ResourceLocation,Function<com.google.gson.JsonObject, custom_predicatesItemPredicate>> -
unmod_predicates
private static final Map<ResourceLocation,Function<com.google.gson.JsonObject, unmod_predicatesItemPredicate>> -
ANY
-
tag
-
items
-
count
-
durability
-
enchantments
-
storedEnchantments
-
potion
-
nbt
-
-
Constructor Details
-
ItemPredicate
public ItemPredicate() -
ItemPredicate
public ItemPredicate(@Nullable TagKey<Item> p_204137_, @Nullable Set<Item> p_204138_, MinMaxBounds.Ints p_204139_, MinMaxBounds.Ints p_204140_, EnchantmentPredicate[] p_204141_, EnchantmentPredicate[] p_204142_, @Nullable Potion p_204143_, NbtPredicate p_204144_)
-
-
Method Details
-
matches
-
fromJson
-
serializeToJson
public com.google.gson.JsonElement serializeToJson() -
fromJsonArray
-
register
public static void register(ResourceLocation name, Function<com.google.gson.JsonObject, ItemPredicate> deserializer) -
getPredicates
public static Map<ResourceLocation,Function<com.google.gson.JsonObject, getPredicates()ItemPredicate>>
-