public class ItemPredicate extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ItemPredicate.Builder |
Modifier and Type | Field and Description |
---|---|
static ItemPredicate |
ANY |
private NumberRange.IntRange |
count |
private NumberRange.IntRange |
durability |
private EnchantmentPredicate[] |
enchantments |
private Item |
item |
private NbtPredicate |
nbt |
private Potion |
potion |
private EnchantmentPredicate[] |
storedEnchantments |
private Tag<Item> |
tag |
Constructor and Description |
---|
ItemPredicate() |
ItemPredicate(Tag<Item> tag,
Item item,
NumberRange.IntRange count,
NumberRange.IntRange durability,
EnchantmentPredicate[] enchantments,
EnchantmentPredicate[] storedEnchantments,
Potion potion,
NbtPredicate nbt) |
Modifier and Type | Method and Description |
---|---|
static ItemPredicate[] |
deserializeAll(JsonElement el) |
static ItemPredicate |
fromJson(JsonElement el) |
boolean |
test(ItemStack stack) |
JsonElement |
toJson() |
public static final ItemPredicate ANY
private final NumberRange.IntRange count
private final NumberRange.IntRange durability
private final EnchantmentPredicate[] enchantments
private final EnchantmentPredicate[] storedEnchantments
private final NbtPredicate nbt
public ItemPredicate()
public ItemPredicate(@Nullable Tag<Item> tag, @Nullable Item item, NumberRange.IntRange count, NumberRange.IntRange durability, EnchantmentPredicate[] enchantments, EnchantmentPredicate[] storedEnchantments, @Nullable Potion potion, NbtPredicate nbt)
public boolean test(ItemStack stack)
public static ItemPredicate fromJson(@Nullable JsonElement el)
public JsonElement toJson()
public static ItemPredicate[] deserializeAll(@Nullable JsonElement el)