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