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, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops, EnumSet<BlockTags> blockTags, @Nullable BlockEntityType blockEntityType)
extends Record
implements RegistryData
-
Constructor Summary
ConstructorsConstructorDescriptionBlock(int id, String name, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops) Block(int id, String name, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops, EnumSet<BlockTags> blockTags) Block(int id, String name, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops, EnumSet<BlockTags> blockTags, @Nullable BlockEntityType blockEntityType) Creates an instance of aBlockrecord class.Block(int id, String name, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops, BlockEntityType blockEntityType) -
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.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.booleanisBlock()Returns the value of theisBlockrecord 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 therequiresCorrectToolForDropsrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Block
public Block(int id, String name, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops) -
Block
public Block(int id, String name, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops, BlockEntityType blockEntityType) -
Block
public Block(int id, String name, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops, EnumSet<BlockTags> blockTags) -
Block
public Block(int id, String name, boolean isBlock, int minStateId, int maxStateId, int mapColorId, BlockOffsetType offsetType, float maxHorizontalOffset, float maxVerticalOffset, float destroySpeed, boolean requiresCorrectToolForDrops, EnumSet<BlockTags> blockTags, @Nullable BlockEntityType blockEntityType) Creates an instance of aBlockrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentisBlock- the value for theisBlockrecord 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 componentdestroySpeed- the value for thedestroySpeedrecord componentrequiresCorrectToolForDrops- the value for therequiresCorrectToolForDropsrecord componentblockTags- the value for theblockTagsrecord 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
-
isBlock
public boolean isBlock()Returns the value of theisBlockrecord component.- Returns:
- the value of the
isBlockrecord 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
-
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
-
blockEntityType
Returns the value of theblockEntityTyperecord component.- Returns:
- the value of the
blockEntityTyperecord component
-