Package net.minecraft.predicate.item
Record Class ItemPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.item.ItemPredicate
- Record Components:
items-count-durability-enchantments-storedEnchantments-potions-customData-components-
public record ItemPredicate(Optional<RegistryEntryList<Item>> items, NumberRange.IntRange count, NumberRange.IntRange durability, List<EnchantmentPredicate> enchantments, List<EnchantmentPredicate> storedEnchantments, Optional<RegistryEntryList<Potion>> potions, Optional<NbtPredicate> customData, ComponentPredicate components)
extends Record
- Mappings:
Namespace Name official ccintermediary net/minecraft/class_2073named net/minecraft/predicate/item/ItemPredicateofficial bintermediary comp_1784named itemsofficial cintermediary comp_1785named countofficial dintermediary comp_1786named durabilityofficial eintermediary comp_1787named enchantmentsofficial fintermediary comp_1788named storedEnchantmentsofficial gintermediary comp_1789named potionsofficial hintermediary comp_2373named customDataofficial iintermediary comp_2374named components
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ItemPredicate> private final ComponentPredicateThe field for thecomponentsrecord component.private final NumberRange.IntRangeThe field for thecountrecord component.private final Optional<NbtPredicate> The field for thecustomDatarecord component.private final NumberRange.IntRangeThe field for thedurabilityrecord component.private final List<EnchantmentPredicate> The field for theenchantmentsrecord component.private final Optional<RegistryEntryList<Item>> The field for theitemsrecord component.private final Optional<RegistryEntryList<Potion>> The field for thepotionsrecord component.private final List<EnchantmentPredicate> The field for thestoredEnchantmentsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionItemPredicate(Optional<RegistryEntryList<Item>> optional, NumberRange.IntRange intRange, NumberRange.IntRange intRange2, List<EnchantmentPredicate> list, List<EnchantmentPredicate> list2, Optional<RegistryEntryList<Potion>> optional2, Optional<NbtPredicate> optional3, ComponentPredicate componentPredicate) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentsrecord component.count()Returns the value of thecountrecord component.Returns the value of thecustomDatarecord component.Returns the value of thedurabilityrecord component.Returns the value of theenchantmentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.items()Returns the value of theitemsrecord component.potions()Returns the value of thepotionsrecord component.Returns the value of thestoredEnchantmentsrecord component.booleanfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
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. -
potions
The field for thepotionsrecord component. -
customData
The field for thecustomDatarecord component. -
components
The field for thecomponentsrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLcc;a:Lcom/mojang/serialization/Codec;intermediary field_45754Lnet/minecraft/class_2073;field_45754:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/predicate/item/ItemPredicate;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
ItemPredicate
public ItemPredicate(Optional<RegistryEntryList<Item>> optional, NumberRange.IntRange intRange, NumberRange.IntRange intRange2, List<EnchantmentPredicate> list, List<EnchantmentPredicate> list2, Optional<RegistryEntryList<Potion>> optional2, Optional<NbtPredicate> optional3, ComponentPredicate componentPredicate)
-
-
Method Details
-
test
- Mappings:
Namespace Name Mixin selector official aLcc;a(Lcrs;)Zintermediary method_8970Lnet/minecraft/class_2073;method_8970(Lnet/minecraft/class_1799;)Znamed testLnet/minecraft/predicate/item/ItemPredicate;test(Lnet/minecraft/item/ItemStack;)Z
-
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). -
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
-
potions
Returns the value of thepotionsrecord component.- Returns:
- the value of the
potionsrecord component
-
customData
Returns the value of thecustomDatarecord component.- Returns:
- the value of the
customDatarecord component
-
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-