Package net.minecraft.predicate.item
Record Class ItemPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.item.ItemPredicate
- Record Components:
tag-items-count-durability-enchantments-storedEnchantments-potion-nbt-
public record ItemPredicate(Optional<TagKey<Item>> tag, Optional<RegistryEntryList<Item>> items, NumberRange.IntRange count, NumberRange.IntRange durability, List<EnchantmentPredicate> enchantments, List<EnchantmentPredicate> storedEnchantments, Optional<RegistryEntry<Potion>> potion, Optional<NbtPredicate> nbt)
extends Record
- Mappings:
Namespace Name official bzintermediary net/minecraft/class_2073named net/minecraft/predicate/item/ItemPredicateofficial bintermediary comp_1783named tagofficial cintermediary comp_1784named itemsofficial dintermediary comp_1785named countofficial eintermediary comp_1786named durabilityofficial fintermediary comp_1787named enchantmentsofficial gintermediary comp_1788named storedEnchantmentsofficial hintermediary comp_1789named potionofficial iintermediary comp_1790named nbt
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NumberRange.IntRangeThe field for thecountrecord component.private final NumberRange.IntRangeThe field for thedurabilityrecord component.private final List<EnchantmentPredicate>The field for theenchantmentsrecord component.static final com.mojang.serialization.Codec<ItemPredicate>private static final com.mojang.serialization.Codec<RegistryEntryList<Item>>private final Optional<RegistryEntryList<Item>>The field for theitemsrecord component.private final Optional<NbtPredicate>The field for thenbtrecord component.private final Optional<RegistryEntry<Potion>>The field for thepotionrecord component.private final List<EnchantmentPredicate>The field for thestoredEnchantmentsrecord component.The field for thetagrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionItemPredicate(Optional<TagKey<Item>> optional, Optional<RegistryEntryList<Item>> optional2, NumberRange.IntRange count, NumberRange.IntRange durability, List<EnchantmentPredicate> list, List<EnchantmentPredicate> list2, Optional<RegistryEntry<Potion>> optional3, Optional<NbtPredicate> optional4) -
Method Summary
Modifier and TypeMethodDescriptioncount()Returns the value of thecountrecord component.static List<ItemPredicate>Returns the value of thedurabilityrecord component.Returns the value of theenchantmentsrecord component.final booleanIndicates whether some other object is "equal to" this one.static Optional<ItemPredicate>final inthashCode()Returns a hash code value for this object.items()Returns the value of theitemsrecord component.static JsonElementmethod_53164(List<ItemPredicate> list) (package private) static Optional<ItemPredicate>method_53165(Optional<TagKey<Item>> optional, Optional<RegistryEntryList<Item>> optional2, NumberRange.IntRange intRange, NumberRange.IntRange intRange2, List<EnchantmentPredicate> list, List<EnchantmentPredicate> list2, Optional<RegistryEntry<Potion>> optional3, Optional<NbtPredicate> optional4) nbt()Returns the value of thenbtrecord component.potion()Returns the value of thepotionrecord component.Returns the value of thestoredEnchantmentsrecord component.tag()Returns the value of thetagrecord component.booleantoJson()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
tag
The field for thetagrecord component. -
items
The field for theitemsrecord component. -
count
The field for thecountrecord component. -
durability
The field for thedurabilityrecord component. -
enchantments
The field for theenchantmentsrecord component. -
storedEnchantments
The field for thestoredEnchantmentsrecord component. -
potion
The field for thepotionrecord component. -
nbt
The field for thenbtrecord component. -
field_45755
- Mappings:
Namespace Name Mixin selector official jLbz;j:Lcom/mojang/serialization/Codec;intermediary field_45755Lnet/minecraft/class_2073;field_45755:Lcom/mojang/serialization/Codec;named field_45755Lnet/minecraft/predicate/item/ItemPredicate;field_45755:Lcom/mojang/serialization/Codec;
-
field_45754
- Mappings:
Namespace Name Mixin selector official aLbz;a:Lcom/mojang/serialization/Codec;intermediary field_45754Lnet/minecraft/class_2073;field_45754:Lcom/mojang/serialization/Codec;named field_45754Lnet/minecraft/predicate/item/ItemPredicate;field_45754:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
ItemPredicate
public ItemPredicate(Optional<TagKey<Item>> optional, Optional<RegistryEntryList<Item>> optional2, NumberRange.IntRange count, NumberRange.IntRange durability, List<EnchantmentPredicate> list, List<EnchantmentPredicate> list2, Optional<RegistryEntry<Potion>> optional3, Optional<NbtPredicate> optional4) - Mappings:
Namespace Name Mixin selector official <init>Lbz;<init>(Ljava/util/Optional;Ljava/util/Optional;Lcj$d;Lcj$d;Ljava/util/List;Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Vintermediary <init>Lnet/minecraft/class_2073;<init>(Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/class_2096$class_2100;Lnet/minecraft/class_2096$class_2100;Ljava/util/List;Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Vnamed <init>Lnet/minecraft/predicate/item/ItemPredicate;<init>(Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/predicate/NumberRange$IntRange;Lnet/minecraft/predicate/NumberRange$IntRange;Ljava/util/List;Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)V
-
-
Method Details
-
method_53165
static Optional<ItemPredicate> method_53165(Optional<TagKey<Item>> optional, Optional<RegistryEntryList<Item>> optional2, NumberRange.IntRange intRange, NumberRange.IntRange intRange2, List<EnchantmentPredicate> list, List<EnchantmentPredicate> list2, Optional<RegistryEntry<Potion>> optional3, Optional<NbtPredicate> optional4) - Mappings:
Namespace Name Mixin selector official aLbz;a(Ljava/util/Optional;Ljava/util/Optional;Lcj$d;Lcj$d;Ljava/util/List;Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;intermediary method_53165Lnet/minecraft/class_2073;method_53165(Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/class_2096$class_2100;Lnet/minecraft/class_2096$class_2100;Ljava/util/List;Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;named method_53165Lnet/minecraft/predicate/item/ItemPredicate;method_53165(Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/predicate/NumberRange$IntRange;Lnet/minecraft/predicate/NumberRange$IntRange;Ljava/util/List;Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;
-
test
- Mappings:
Namespace Name Mixin selector official aLbz;a(Lciy;)Zintermediary method_8970Lnet/minecraft/class_2073;method_8970(Lnet/minecraft/class_1799;)Znamed testLnet/minecraft/predicate/item/ItemPredicate;test(Lnet/minecraft/item/ItemStack;)Z
-
fromJson
- Mappings:
Namespace Name Mixin selector official aLbz;a(Lcom/google/gson/JsonElement;)Ljava/util/Optional;intermediary method_8969Lnet/minecraft/class_2073;method_8969(Lcom/google/gson/JsonElement;)Ljava/util/Optional;named fromJsonLnet/minecraft/predicate/item/ItemPredicate;fromJson(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
-
toJson
- Mappings:
Namespace Name Mixin selector official aLbz;a()Lcom/google/gson/JsonElement;intermediary method_8971Lnet/minecraft/class_2073;method_8971()Lcom/google/gson/JsonElement;named toJsonLnet/minecraft/predicate/item/ItemPredicate;toJson()Lcom/google/gson/JsonElement;
-
method_53164
- Mappings:
Namespace Name Mixin selector official aLbz;a(Ljava/util/List;)Lcom/google/gson/JsonElement;intermediary method_53164Lnet/minecraft/class_2073;method_53164(Ljava/util/List;)Lcom/google/gson/JsonElement;named method_53164Lnet/minecraft/predicate/item/ItemPredicate;method_53164(Ljava/util/List;)Lcom/google/gson/JsonElement;
-
deserializeAll
- Mappings:
Namespace Name Mixin selector official bLbz;b(Lcom/google/gson/JsonElement;)Ljava/util/List;intermediary method_8972Lnet/minecraft/class_2073;method_8972(Lcom/google/gson/JsonElement;)Ljava/util/List;named deserializeAllLnet/minecraft/predicate/item/ItemPredicate;deserializeAll(Lcom/google/gson/JsonElement;)Ljava/util/List;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-
items
Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-
count
Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
durability
Returns the value of thedurabilityrecord component.- Returns:
- the value of the
durabilityrecord component
-
enchantments
Returns the value of theenchantmentsrecord component.- Returns:
- the value of the
enchantmentsrecord component
-
storedEnchantments
Returns the value of thestoredEnchantmentsrecord component.- Returns:
- the value of the
storedEnchantmentsrecord component
-
potion
Returns the value of thepotionrecord component.- Returns:
- the value of the
potionrecord component
-
nbt
Returns the value of thenbtrecord component.- Returns:
- the value of the
nbtrecord component
-