Record Class SlotSelector.TrackingSelector
java.lang.Object
java.lang.Record
net.minecraft.world.item.slot.SlotSelector.TrackingSelector
- All Implemented Interfaces:
SlotSelector
- Enclosing interface:
SlotSelector
public static record SlotSelector.TrackingSelector(SlotSelector slotSelector, int limit, org.apache.commons.lang3.mutable.MutableInt selectedCount)
extends Record
implements SlotSelector
-
Nested Class Summary
Nested classes/interfaces inherited from interface SlotSelector
SlotSelector.FilteringSelector, SlotSelector.TrackingSelector -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thelimitrecord component.private final org.apache.commons.lang3.mutable.MutableIntThe field for theselectedCountrecord component.private final SlotSelectorThe field for theslotSelectorrecord component.Fields inherited from interface SlotSelector
ANY_SLOT, EMPTY_SLOTS, NON_EMPTY_SLOTS -
Constructor Summary
ConstructorsConstructorDescriptionTrackingSelector(SlotSelector slotSelector, int limit, org.apache.commons.lang3.mutable.MutableInt selectedCount) Creates an instance of aTrackingSelectorrecord 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.intlimit()Returns the value of thelimitrecord component.limit(int limit) org.apache.commons.lang3.mutable.MutableIntReturns the value of theselectedCountrecord component.Returns the value of theslotSelectorrecord component.final StringtoString()Returns a string representation of this record class.booleantrySelectSlot(ItemStack itemInSlot)
-
Field Details
-
slotSelector
The field for theslotSelectorrecord component. -
limit
private final int limitThe field for thelimitrecord component. -
selectedCount
private final org.apache.commons.lang3.mutable.MutableInt selectedCountThe field for theselectedCountrecord component.
-
-
Constructor Details
-
TrackingSelector
public TrackingSelector(SlotSelector slotSelector, int limit, org.apache.commons.lang3.mutable.MutableInt selectedCount) Creates an instance of aTrackingSelectorrecord class.- Parameters:
slotSelector- the value for theslotSelectorrecord componentlimit- the value for thelimitrecord componentselectedCount- the value for theselectedCountrecord component
-
-
Method Details
-
trySelectSlot
- Specified by:
trySelectSlotin interfaceSlotSelector
-
filter
- Specified by:
filterin interfaceSlotSelector
-
limit
- Specified by:
limitin interfaceSlotSelector
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
slotSelector
Returns the value of theslotSelectorrecord component.- Returns:
- the value of the
slotSelectorrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
selectedCount
public org.apache.commons.lang3.mutable.MutableInt selectedCount()Returns the value of theselectedCountrecord component.- Returns:
- the value of the
selectedCountrecord component
-