Class ItemPredicate
java.lang.Object
net.minecraft.advancements.critereon.ItemPredicate
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic ItemPredicate
private MinMaxBounds.Ints
private static Map<ResourceLocation,Function<com.google.gson.JsonObject,ItemPredicate>>
private MinMaxBounds.Ints
private EnchantmentPredicate[]
private NbtPredicate
private Potion
private EnchantmentPredicate[]
private static Map<ResourceLocation,Function<com.google.gson.JsonObject,ItemPredicate>>
-
Constructor Summary
ConstructorDescriptionItemPredicate(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 ItemPredicate
fromJson(com.google.gson.JsonElement p_45052_)
static ItemPredicate[]
fromJsonArray(com.google.gson.JsonElement p_45056_)
static Map<ResourceLocation,Function<com.google.gson.JsonObject,ItemPredicate>>
boolean
static void
register(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()
-