Record Class SlotsPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.SlotsPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SlotsPredicate> private final Map<SlotRange, ItemPredicate> The field for theslotsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSlotsPredicate(Map<SlotRange, ItemPredicate> slots) Creates an instance of aSlotsPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(SlotProvider slotProvider) private static booleanmatchSlots(SlotProvider slotProvider, ItemPredicate test, it.unimi.dsi.fastutil.ints.IntList slots) slots()Returns the value of theslotsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
slots
The field for theslotsrecord component. -
CODEC
-
-
Constructor Details
-
SlotsPredicate
Creates an instance of aSlotsPredicaterecord class.- Parameters:
slots- the value for theslotsrecord component
-
-
Method Details
-
matches
-
matchSlots
private static boolean matchSlots(SlotProvider slotProvider, ItemPredicate test, it.unimi.dsi.fastutil.ints.IntList slots) -
toString
-
hashCode
-
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). -
slots
Returns the value of theslotsrecord component.- Returns:
- the value of the
slotsrecord component
-