Record Class InventoryChangeTrigger.TriggerInstance.Slots
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.InventoryChangeTrigger.TriggerInstance.Slots
- Enclosing class:
InventoryChangeTrigger.TriggerInstance
public static record InventoryChangeTrigger.TriggerInstance.Slots(MinMaxBounds.Ints occupied, MinMaxBounds.Ints full, MinMaxBounds.Ints empty)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InventoryChangeTrigger.TriggerInstance.Slotsstatic final com.mojang.serialization.Codec<InventoryChangeTrigger.TriggerInstance.Slots> private final MinMaxBounds.IntsThe field for theemptyrecord component.private final MinMaxBounds.IntsThe field for thefullrecord component.private final MinMaxBounds.IntsThe field for theoccupiedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSlots(MinMaxBounds.Ints occupied, MinMaxBounds.Ints full, MinMaxBounds.Ints empty) Creates an instance of aSlotsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionempty()Returns the value of theemptyrecord component.final booleanIndicates whether some other object is "equal to" this one.full()Returns the value of thefullrecord component.final inthashCode()Returns a hash code value for this object.booleanmatches(int p_312470_, int p_312809_, int p_311989_) occupied()Returns the value of theoccupiedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
occupied
The field for theoccupiedrecord component. -
full
The field for thefullrecord component. -
empty
The field for theemptyrecord component. -
CODEC
public static final com.mojang.serialization.Codec<InventoryChangeTrigger.TriggerInstance.Slots> CODEC -
ANY
-
-
Constructor Details
-
Slots
Creates an instance of aSlotsrecord class.- Parameters:
occupied- the value for theoccupiedrecord componentfull- the value for thefullrecord componentempty- the value for theemptyrecord component
-
-
Method Details
-
matches
public boolean matches(int p_312470_, int p_312809_, int p_311989_) -
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). -
occupied
Returns the value of theoccupiedrecord component.- Returns:
- the value of the
occupiedrecord component
-
full
Returns the value of thefullrecord component.- Returns:
- the value of the
fullrecord component
-
empty
Returns the value of theemptyrecord component.- Returns:
- the value of the
emptyrecord component
-