Package net.minecraft.world.level.block
Record Class Block.ShapePairKey
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.Block.ShapePairKey
- Enclosing class:
Block
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final VoxelShape
The field for thefirst
record component.private final VoxelShape
The field for thesecond
record component. -
Constructor Summary
ConstructorsConstructorDescriptionShapePairKey
(VoxelShape first, VoxelShape second) Creates an instance of aShapePairKey
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.
-
-
Constructor Details
-
ShapePairKey
ShapePairKey(VoxelShape first, VoxelShape second) Creates an instance of aShapePairKey
record class.- Parameters:
first
- the value for thefirst
record componentsecond
- the value for thesecond
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
-