Record Class FlowingFluid.BlockStatePairKey
java.lang.Object
java.lang.Record
net.minecraft.world.level.material.FlowingFluid.BlockStatePairKey
- Enclosing class:
FlowingFluid
static record FlowingFluid.BlockStatePairKey(BlockState first, BlockState second, Direction direction)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Direction
The field for thedirection
record component.private final BlockState
The field for thefirst
record component.private final BlockState
The field for thesecond
record component. -
Constructor Summary
ConstructorsConstructorDescriptionBlockStatePairKey
(BlockState first, BlockState second, Direction direction) Creates an instance of aBlockStatePairKey
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirection
record component.boolean
Indicates whether some other object is "equal to" this one.first()
Returns the value of thefirst
record component.int
hashCode()
Returns a hash code value for this object.second()
Returns the value of thesecond
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
first
The field for thefirst
record component. -
second
The field for thesecond
record component. -
direction
The field for thedirection
record component.
-
-
Constructor Details
-
BlockStatePairKey
BlockStatePairKey(BlockState first, BlockState second, Direction direction) Creates an instance of aBlockStatePairKey
record class.- Parameters:
first
- the value for thefirst
record componentsecond
- the value for thesecond
record componentdirection
- the value for thedirection
record component
-
-
Method Details
-
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)
. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
first
Returns the value of thefirst
record component.- Returns:
- the value of the
first
record component
-
second
Returns the value of thesecond
record component.- Returns:
- the value of the
second
record component
-
direction
Returns the value of thedirection
record component.- Returns:
- the value of the
direction
record component
-