public class ItemPredicate
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ItemPredicate.Builder |
Modifier and Type | Field and Description |
---|---|
static ItemPredicate |
ANY |
Constructor and Description |
---|
ItemPredicate() |
ItemPredicate(Tag<Item> p_i49722_1_,
Item p_i49722_2_,
MinMaxBounds.IntBound p_i49722_3_,
MinMaxBounds.IntBound p_i49722_4_,
EnchantmentPredicate[] p_i49722_5_,
Potion p_i49722_6_,
NBTPredicate p_i49722_7_) |
Modifier and Type | Method and Description |
---|---|
static ItemPredicate |
deserialize(com.google.gson.JsonElement element) |
static ItemPredicate[] |
deserializeArray(com.google.gson.JsonElement element) |
static java.util.Map<ResourceLocation,java.util.function.Function<com.google.gson.JsonObject,ItemPredicate>> |
getPredicates() |
static void |
register(ResourceLocation name,
java.util.function.Function<com.google.gson.JsonObject,ItemPredicate> deserializer) |
com.google.gson.JsonElement |
serialize() |
boolean |
test(ItemStack item) |
public static final ItemPredicate ANY
public ItemPredicate()
public ItemPredicate(@Nullable Tag<Item> p_i49722_1_, @Nullable Item p_i49722_2_, MinMaxBounds.IntBound p_i49722_3_, MinMaxBounds.IntBound p_i49722_4_, EnchantmentPredicate[] p_i49722_5_, @Nullable Potion p_i49722_6_, NBTPredicate p_i49722_7_)
public boolean test(ItemStack item)
public static ItemPredicate deserialize(@Nullable com.google.gson.JsonElement element)
public com.google.gson.JsonElement serialize()
public static ItemPredicate[] deserializeArray(@Nullable com.google.gson.JsonElement element)
public static void register(ResourceLocation name, java.util.function.Function<com.google.gson.JsonObject,ItemPredicate> deserializer)
public static java.util.Map<ResourceLocation,java.util.function.Function<com.google.gson.JsonObject,ItemPredicate>> getPredicates()