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 |
private MinMaxBounds.IntBound |
count |
private static java.util.Map<ResourceLocation,java.util.function.Function<com.google.gson.JsonObject,ItemPredicate>> |
custom_predicates |
private MinMaxBounds.IntBound |
durability |
private EnchantmentPredicate[] |
enchantments |
private EnchantmentPredicate[] |
field_226656_g_ |
private Item |
item |
private NBTPredicate |
nbt |
private Potion |
potion |
private Tag<Item> |
tag |
private static java.util.Map<ResourceLocation,java.util.function.Function<com.google.gson.JsonObject,ItemPredicate>> |
unmod_predicates |
Constructor and Description |
---|
ItemPredicate() |
ItemPredicate(Tag<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_) |
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) |
private static final java.util.Map<ResourceLocation,java.util.function.Function<com.google.gson.JsonObject,ItemPredicate>> custom_predicates
private static final java.util.Map<ResourceLocation,java.util.function.Function<com.google.gson.JsonObject,ItemPredicate>> unmod_predicates
public static final ItemPredicate ANY
@Nullable private final Item item
private final MinMaxBounds.IntBound count
private final MinMaxBounds.IntBound durability
private final EnchantmentPredicate[] enchantments
private final EnchantmentPredicate[] field_226656_g_
@Nullable private final Potion potion
private final NBTPredicate nbt
public ItemPredicate()
public ItemPredicate(@Nullable Tag<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_)
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()