Record Class Block
java.lang.Object
java.lang.Record
com.zenith.mc.block.Block
- All Implemented Interfaces:
RegistryData
public record Block(int id, String name, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, boolean solidBlock, float destroySpeed, boolean requiresCorrectToolForDrops, EnumSet<BlockTags> blockTags, boolean replaceable, float friction, float speedFactor, float jumpFactor, boolean isAir, @Nullable BlockEntityType blockEntityType)
extends Record
implements RegistryData
-
Constructor Summary
ConstructorsConstructorDescriptionBlock(int id, String name, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, boolean solidBlock, float destroySpeed, boolean requiresCorrectToolForDrops, EnumSet<BlockTags> blockTags, boolean replaceable, float friction, float speedFactor, float jumpFactor, boolean isAir, @Nullable BlockEntityType blockEntityType) Creates an instance of aBlockrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BlockEntityTypeReturns the value of theblockEntityTyperecord component.Returns the value of theblockTagsrecord component.floatReturns the value of thedestroySpeedrecord component.final booleanIndicates whether some other object is "equal to" this one.floatfriction()Returns the value of thefrictionrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.booleanisAir()Returns the value of theisAirrecord component.floatReturns the value of thejumpFactorrecord component.intReturns the value of themapColorIdrecord component.floatReturns the value of themaxHorizontalOffsetrecord component.intReturns the value of themaxStateIdrecord component.floatReturns the value of themaxVerticalOffsetrecord component.intReturns the value of theminStateIdrecord component.name()Returns the value of thenamerecord component.Returns the value of theoffsetTyperecord component.booleanReturns the value of thereplaceablerecord component.booleanReturns the value of therequiresCorrectToolForDropsrecord component.booleanReturns the value of thesolidBlockrecord component.floatReturns the value of thespeedFactorrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Block
public Block(int id, String name, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, boolean solidBlock, float destroySpeed, boolean requiresCorrectToolForDrops, EnumSet<BlockTags> blockTags, boolean replaceable, float friction, float speedFactor, float jumpFactor, boolean isAir, @Nullable BlockEntityType blockEntityType) Creates an instance of aBlockrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentminStateId- the value for theminStateIdrecord componentmaxStateId- the value for themaxStateIdrecord componentmapColorId- the value for themapColorIdrecord componentoffsetType- the value for theoffsetTyperecord componentmaxHorizontalOffset- the value for themaxHorizontalOffsetrecord componentmaxVerticalOffset- the value for themaxVerticalOffsetrecord componentsolidBlock- the value for thesolidBlockrecord componentdestroySpeed- the value for thedestroySpeedrecord componentrequiresCorrectToolForDrops- the value for therequiresCorrectToolForDropsrecord componentblockTags- the value for theblockTagsrecord componentreplaceable- the value for thereplaceablerecord componentfriction- the value for thefrictionrecord componentspeedFactor- the value for thespeedFactorrecord componentjumpFactor- the value for thejumpFactorrecord componentisAir- the value for theisAirrecord componentblockEntityType- the value for theblockEntityTyperecord component
-
-
Method Details
-
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. -
id
public int id()Returns the value of theidrecord component.- Specified by:
idin interfaceRegistryData- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceRegistryData- Returns:
- the value of the
namerecord component
-
minStateId
public int minStateId()Returns the value of theminStateIdrecord component.- Returns:
- the value of the
minStateIdrecord component
-
maxStateId
public int maxStateId()Returns the value of themaxStateIdrecord component.- Returns:
- the value of the
maxStateIdrecord component
-
mapColorId
public int mapColorId()Returns the value of themapColorIdrecord component.- Returns:
- the value of the
mapColorIdrecord component
-
offsetType
Returns the value of theoffsetTyperecord component.- Returns:
- the value of the
offsetTyperecord component
-
maxHorizontalOffset
public float maxHorizontalOffset()Returns the value of themaxHorizontalOffsetrecord component.- Returns:
- the value of the
maxHorizontalOffsetrecord component
-
maxVerticalOffset
public float maxVerticalOffset()Returns the value of themaxVerticalOffsetrecord component.- Returns:
- the value of the
maxVerticalOffsetrecord component
-
solidBlock
public boolean solidBlock()Returns the value of thesolidBlockrecord component.- Returns:
- the value of the
solidBlockrecord component
-
destroySpeed
public float destroySpeed()Returns the value of thedestroySpeedrecord component.- Returns:
- the value of the
destroySpeedrecord component
-
requiresCorrectToolForDrops
public boolean requiresCorrectToolForDrops()Returns the value of therequiresCorrectToolForDropsrecord component.- Returns:
- the value of the
requiresCorrectToolForDropsrecord component
-
blockTags
-
replaceable
public boolean replaceable()Returns the value of thereplaceablerecord component.- Returns:
- the value of the
replaceablerecord component
-
friction
public float friction()Returns the value of thefrictionrecord component.- Returns:
- the value of the
frictionrecord component
-
speedFactor
public float speedFactor()Returns the value of thespeedFactorrecord component.- Returns:
- the value of the
speedFactorrecord component
-
jumpFactor
public float jumpFactor()Returns the value of thejumpFactorrecord component.- Returns:
- the value of the
jumpFactorrecord component
-
isAir
public boolean isAir()Returns the value of theisAirrecord component.- Returns:
- the value of the
isAirrecord component
-
blockEntityType
Returns the value of theblockEntityTyperecord component.- Returns:
- the value of the
blockEntityTyperecord component
-