Class ItemPredicate
java.lang.Object
net.minecraft.advancements.critereon.ItemPredicate
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ItemPredicateprivate MinMaxBounds.Intsprivate static Map<ResourceLocation,Function<com.google.gson.JsonObject,ItemPredicate>>private MinMaxBounds.Intsprivate EnchantmentPredicate[]private NbtPredicateprivate Potionprivate EnchantmentPredicate[]private static Map<ResourceLocation,Function<com.google.gson.JsonObject,ItemPredicate>> -
Constructor Summary
ConstructorsConstructorDescriptionItemPredicate(Tag<Item> p_151429_, Set<Item> p_151430_, MinMaxBounds.Ints p_151431_, MinMaxBounds.Ints p_151432_, EnchantmentPredicate[] p_151433_, EnchantmentPredicate[] p_151434_, Potion p_151435_, NbtPredicate p_151436_) -
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,ItemPredicate>> custom_predicates -
unmod_predicates
private static final Map<ResourceLocation,Function<com.google.gson.JsonObject,ItemPredicate>> unmod_predicates -
ANY
-
tag
-
items
-
count
-
durability
-
enchantments
-
storedEnchantments
-
potion
-
nbt
-
-
Constructor Details
-
ItemPredicate
public ItemPredicate() -
ItemPredicate
public ItemPredicate(@Nullable Tag<Item> p_151429_, @Nullable Set<Item> p_151430_, MinMaxBounds.Ints p_151431_, MinMaxBounds.Ints p_151432_, EnchantmentPredicate[] p_151433_, EnchantmentPredicate[] p_151434_, @Nullable Potion p_151435_, NbtPredicate p_151436_)
-
-
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,ItemPredicate>> getPredicates()
-