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 cc
intermediary net/minecraft/class_2073
named net/minecraft/predicate/item/ItemPredicate
official b
intermediary comp_1784
named items
official c
intermediary comp_1785
named count
official d
intermediary comp_1786
named durability
official e
intermediary comp_1787
named enchantments
official f
intermediary comp_1788
named storedEnchantments
official g
intermediary comp_1789
named potions
official h
intermediary comp_2373
named customData
official i
intermediary comp_2374
named components
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ItemPredicate> private final ComponentPredicate
The field for thecomponents
record component.private final NumberRange.IntRange
The field for thecount
record component.private final Optional
<NbtPredicate> The field for thecustomData
record component.private final NumberRange.IntRange
The field for thedurability
record component.private final List
<EnchantmentPredicate> The field for theenchantments
record component.private final Optional
<RegistryEntryList<Item>> The field for theitems
record component.private final Optional
<RegistryEntryList<Potion>> The field for thepotions
record component.private final List
<EnchantmentPredicate> The field for thestoredEnchantments
record 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 thecomponents
record component.count()
Returns the value of thecount
record component.Returns the value of thecustomData
record component.Returns the value of thedurability
record component.Returns the value of theenchantments
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.items()
Returns the value of theitems
record component.potions()
Returns the value of thepotions
record component.Returns the value of thestoredEnchantments
record component.boolean
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
items
The field for theitems
record component. -
count
The field for thecount
record component. -
durability
The field for thedurability
record component. -
enchantments
The field for theenchantments
record component. -
storedEnchantments
The field for thestoredEnchantments
record component. -
potions
The field for thepotions
record component. -
customData
The field for thecustomData
record component. -
components
The field for thecomponents
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lcc;a:Lcom/mojang/serialization/Codec;
intermediary field_45754
Lnet/minecraft/class_2073;field_45754:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/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 a
Lcc;a(Lcrs;)Z
intermediary method_8970
Lnet/minecraft/class_2073;method_8970(Lnet/minecraft/class_1799;)Z
named test
Lnet/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 theitems
record component.- Returns:
- the value of the
items
record component
-
count
Returns the value of thecount
record component.- Returns:
- the value of the
count
record component
-
durability
Returns the value of thedurability
record component.- Returns:
- the value of the
durability
record component
-
enchantments
Returns the value of theenchantments
record component.- Returns:
- the value of the
enchantments
record component
-
storedEnchantments
Returns the value of thestoredEnchantments
record component.- Returns:
- the value of the
storedEnchantments
record component
-
potions
Returns the value of thepotions
record component.- Returns:
- the value of the
potions
record component
-
customData
Returns the value of thecustomData
record component.- Returns:
- the value of the
customData
record component
-
components
Returns the value of thecomponents
record component.- Returns:
- the value of the
components
record component
-