Record Class BlockInfo
java.lang.Object
java.lang.Record
io.hymods.lib.data.BlockInfo
public record BlockInfo(com.hypixel.hytale.math.vector.Vector3i position, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType type)
extends Record
Information about a block
-
Constructor Summary
ConstructorsConstructorDescriptionBlockInfo(com.hypixel.hytale.math.vector.Vector3i position, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType type) Creates an instance of aBlockInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisAir()booleanisSolid()com.hypixel.hytale.math.vector.Vector3iposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockTypetype()Returns the value of thetyperecord component.
-
Constructor Details
-
BlockInfo
public BlockInfo(com.hypixel.hytale.math.vector.Vector3i position, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType type) Creates an instance of aBlockInforecord class.- Parameters:
position- the value for thepositionrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
isAir
public boolean isAir()- Returns:
- true if the block is air
-
isSolid
public boolean isSolid()- Returns:
- true if the block is solid
-
toString
-
hashCode
-
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). -
position
public com.hypixel.hytale.math.vector.Vector3i position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
type
public com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-