Package cn.nukkit.level.terra.delegate
Record Class PNXBlockType
java.lang.Object
java.lang.Record
cn.nukkit.level.terra.delegate.PNXBlockType
- All Implemented Interfaces:
com.dfsek.terra.api.block.BlockType
,com.dfsek.terra.api.Handle
public record PNXBlockType(BlockState innerBlockState)
extends Record
implements com.dfsek.terra.api.block.BlockType
-
Constructor Summary
ConstructorDescriptionPNXBlockType
(BlockState innerBlockState) Creates an instance of aPNXBlockType
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.com.dfsek.terra.api.block.state.BlockState
final int
hashCode()
Returns a hash code value for this object.Returns the value of theinnerBlockState
record component.boolean
isSolid()
boolean
isWater()
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PNXBlockType
Creates an instance of aPNXBlockType
record class.- Parameters:
innerBlockState
- the value for theinnerBlockState
record component
-
-
Method Details
-
getDefaultState
public com.dfsek.terra.api.block.state.BlockState getDefaultState()- Specified by:
getDefaultState
in interfacecom.dfsek.terra.api.block.BlockType
-
isSolid
public boolean isSolid()- Specified by:
isSolid
in interfacecom.dfsek.terra.api.block.BlockType
-
isWater
public boolean isWater()- Specified by:
isWater
in interfacecom.dfsek.terra.api.block.BlockType
-
getHandle
- Specified by:
getHandle
in interfacecom.dfsek.terra.api.Handle
-
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)
. -
innerBlockState
Returns the value of theinnerBlockState
record component.- Returns:
- the value of the
innerBlockState
record component
-