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
Modifier and TypeFieldDescriptionstatic final InventoryChangeTrigger.TriggerInstance.Slots
static final com.mojang.serialization.Codec<InventoryChangeTrigger.TriggerInstance.Slots>
private final MinMaxBounds.Ints
The field for theempty
record component.private final MinMaxBounds.Ints
The field for thefull
record component.private final MinMaxBounds.Ints
The field for theoccupied
record component. -
Constructor Summary
ConstructorDescriptionSlots
(MinMaxBounds.Ints occupied, MinMaxBounds.Ints full, MinMaxBounds.Ints empty) Creates an instance of aSlots
record class. -
Method Summary
Modifier and TypeMethodDescriptionempty()
Returns the value of theempty
record component.final boolean
Indicates whether some other object is "equal to" this one.full()
Returns the value of thefull
record component.final int
hashCode()
Returns a hash code value for this object.boolean
matches
(int p_312470_, int p_312809_, int p_311989_) occupied()
Returns the value of theoccupied
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
occupied
The field for theoccupied
record component. -
full
The field for thefull
record component. -
empty
The field for theempty
record component. -
CODEC
public static final com.mojang.serialization.Codec<InventoryChangeTrigger.TriggerInstance.Slots> CODEC -
ANY
-
-
Constructor Details
-
Slots
Creates an instance of aSlots
record class.- Parameters:
occupied
- the value for theoccupied
record componentfull
- the value for thefull
record componentempty
- the value for theempty
record 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 theoccupied
record component.- Returns:
- the value of the
occupied
record component
-
full
Returns the value of thefull
record component.- Returns:
- the value of the
full
record component
-
empty
Returns the value of theempty
record component.- Returns:
- the value of the
empty
record component
-