Record Class BlockState
java.lang.Object
java.lang.Record
com.zenith.mc.block.BlockState
- Record Components:
id- palette blockstate id
-
Constructor Summary
ConstructorsConstructorDescriptionBlockState(Block block, int id, int x, int y, int z) Creates an instance of aBlockStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.booleanbooleanbooleanfinal StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.intz()Returns the value of thezrecord component.
-
Constructor Details
-
BlockState
Creates an instance of aBlockStaterecord class.- Parameters:
block- the value for theblockrecord componentid- the value for theidrecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord component
-
-
Method Details
-
isSolidBlock
public boolean isSolidBlock() -
isShapeFullBlock
public boolean isShapeFullBlock() -
getCollisionBoxes
-
getInteractionBoxes
-
getLocalizedCollisionBoxes
-
getLocalizedInteractionBoxes
-
isPathfindable
public boolean isPathfindable() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
id
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public int z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-