Class ItemPredicate
java.lang.Object
net.minecraft.advancements.criterion.ItemPredicate
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ItemPredicate
private final MinMaxBounds.IntBound
private static final Map<ResourceLocation,
Function<com.google.gson.JsonObject, ItemPredicate>> private final MinMaxBounds.IntBound
private final EnchantmentPredicate[]
private final Item
private final NBTPredicate
private final Potion
private final EnchantmentPredicate[]
private static final Map<ResourceLocation,
Function<com.google.gson.JsonObject, ItemPredicate>> -
Constructor Summary
ConstructorDescriptionItemPredicate
(ITag<Item> p_i225740_1_, Item p_i225740_2_, MinMaxBounds.IntBound p_i225740_3_, MinMaxBounds.IntBound p_i225740_4_, EnchantmentPredicate[] p_i225740_5_, EnchantmentPredicate[] p_i225740_6_, Potion p_i225740_7_, NBTPredicate p_i225740_8_) -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemPredicate
fromJson
(com.google.gson.JsonElement p_192492_0_) static ItemPredicate[]
fromJsonArray
(com.google.gson.JsonElement p_192494_0_) 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
-
item
-
count
-
durability
-
enchantments
-
storedEnchantments
-
potion
-
nbt
-
-
Constructor Details
-
ItemPredicate
public ItemPredicate() -
ItemPredicate
public ItemPredicate(@Nullable ITag<Item> p_i225740_1_, @Nullable Item p_i225740_2_, MinMaxBounds.IntBound p_i225740_3_, MinMaxBounds.IntBound p_i225740_4_, EnchantmentPredicate[] p_i225740_5_, EnchantmentPredicate[] p_i225740_6_, @Nullable Potion p_i225740_7_, NBTPredicate p_i225740_8_)
-
-
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>>
-