Package org.cloudburstmc.server.block
Record Class BlockAttributes
java.lang.Object
java.lang.Record
org.cloudburstmc.server.block.BlockAttributes
public record BlockAttributes(boolean fallable, float friction, float hardness, float resistance, boolean solid, boolean pushesOutItems, float translucency, int burnChance, int burnAbility, int filterLight, boolean experimental, boolean flammable, boolean replaceable, int emitLight, boolean diggable, boolean powerSource, boolean breakFalling, boolean blockWater, boolean canBeSilkTouched, boolean blockSolid, boolean blockMotion, boolean comparatorSignal, boolean pushUpFalling, boolean waterlogFlowing, boolean waterlogSolid, org.cloudburstmc.api.util.AxisAlignedBB boundingBox, org.cloudburstmc.api.item.ToolType targetTool)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockAttributes(boolean fallable, float friction, float hardness, float resistance, boolean solid, boolean pushesOutItems, float translucency, int burnChance, int burnAbility, int filterLight, boolean experimental, boolean flammable, boolean replaceable, int emitLight, boolean diggable, boolean powerSource, boolean breakFalling, boolean blockWater, boolean canBeSilkTouched, boolean blockSolid, boolean blockMotion, boolean comparatorSignal, boolean pushUpFalling, boolean waterlogFlowing, boolean waterlogSolid, org.cloudburstmc.api.util.AxisAlignedBB boundingBox, org.cloudburstmc.api.item.ToolType targetTool)Creates an instance of aBlockAttributesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theblockMotionrecord component.booleanReturns the value of theblockSolidrecord component.booleanReturns the value of theblockWaterrecord component.org.cloudburstmc.api.util.AxisAlignedBBReturns the value of theboundingBoxrecord component.booleanReturns the value of thebreakFallingrecord component.intReturns the value of theburnAbilityrecord component.intReturns the value of theburnChancerecord component.booleanReturns the value of thecanBeSilkTouchedrecord component.booleanReturns the value of thecomparatorSignalrecord component.booleandiggable()Returns the value of thediggablerecord component.intReturns the value of theemitLightrecord component.booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexperimentalrecord component.booleanfallable()Returns the value of thefallablerecord component.intReturns the value of thefilterLightrecord component.booleanReturns the value of theflammablerecord component.floatfriction()Returns the value of thefrictionrecord component.floathardness()Returns the value of thehardnessrecord component.inthashCode()Returns a hash code value for this object.booleanReturns the value of thepowerSourcerecord component.booleanReturns the value of thepushesOutItemsrecord component.booleanReturns the value of thepushUpFallingrecord component.booleanReturns the value of thereplaceablerecord component.floatReturns the value of theresistancerecord component.booleansolid()Returns the value of thesolidrecord component.org.cloudburstmc.api.item.ToolTypeReturns the value of thetargetToolrecord component.toString()Returns a string representation of this record class.floatReturns the value of thetranslucencyrecord component.booleanReturns the value of thewaterlogFlowingrecord component.booleanReturns the value of thewaterlogSolidrecord component.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
BlockAttributes
public BlockAttributes(boolean fallable, float friction, float hardness, float resistance, boolean solid, boolean pushesOutItems, float translucency, int burnChance, int burnAbility, int filterLight, boolean experimental, boolean flammable, boolean replaceable, int emitLight, boolean diggable, boolean powerSource, boolean breakFalling, boolean blockWater, boolean canBeSilkTouched, boolean blockSolid, boolean blockMotion, boolean comparatorSignal, boolean pushUpFalling, boolean waterlogFlowing, boolean waterlogSolid, org.cloudburstmc.api.util.AxisAlignedBB boundingBox, org.cloudburstmc.api.item.ToolType targetTool)Creates an instance of aBlockAttributesrecord class.- Parameters:
fallable- the value for thefallablerecord componentfriction- the value for thefrictionrecord componenthardness- the value for thehardnessrecord componentresistance- the value for theresistancerecord componentsolid- the value for thesolidrecord componentpushesOutItems- the value for thepushesOutItemsrecord componenttranslucency- the value for thetranslucencyrecord componentburnChance- the value for theburnChancerecord componentburnAbility- the value for theburnAbilityrecord componentfilterLight- the value for thefilterLightrecord componentexperimental- the value for theexperimentalrecord componentflammable- the value for theflammablerecord componentreplaceable- the value for thereplaceablerecord componentemitLight- the value for theemitLightrecord componentdiggable- the value for thediggablerecord componentpowerSource- the value for thepowerSourcerecord componentbreakFalling- the value for thebreakFallingrecord componentblockWater- the value for theblockWaterrecord componentcanBeSilkTouched- the value for thecanBeSilkTouchedrecord componentblockSolid- the value for theblockSolidrecord componentblockMotion- the value for theblockMotionrecord componentcomparatorSignal- the value for thecomparatorSignalrecord componentpushUpFalling- the value for thepushUpFallingrecord componentwaterlogFlowing- the value for thewaterlogFlowingrecord componentwaterlogSolid- the value for thewaterlogSolidrecord componentboundingBox- the value for theboundingBoxrecord componenttargetTool- the value for thetargetToolrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
fallable
public boolean fallable()Returns the value of thefallablerecord component.- Returns:
- the value of the
fallablerecord component
-
friction
public float friction()Returns the value of thefrictionrecord component.- Returns:
- the value of the
frictionrecord component
-
hardness
public float hardness()Returns the value of thehardnessrecord component.- Returns:
- the value of the
hardnessrecord component
-
resistance
public float resistance()Returns the value of theresistancerecord component.- Returns:
- the value of the
resistancerecord component
-
solid
public boolean solid()Returns the value of thesolidrecord component.- Returns:
- the value of the
solidrecord component
-
pushesOutItems
public boolean pushesOutItems()Returns the value of thepushesOutItemsrecord component.- Returns:
- the value of the
pushesOutItemsrecord component
-
translucency
public float translucency()Returns the value of thetranslucencyrecord component.- Returns:
- the value of the
translucencyrecord component
-
burnChance
public int burnChance()Returns the value of theburnChancerecord component.- Returns:
- the value of the
burnChancerecord component
-
burnAbility
public int burnAbility()Returns the value of theburnAbilityrecord component.- Returns:
- the value of the
burnAbilityrecord component
-
filterLight
public int filterLight()Returns the value of thefilterLightrecord component.- Returns:
- the value of the
filterLightrecord component
-
experimental
public boolean experimental()Returns the value of theexperimentalrecord component.- Returns:
- the value of the
experimentalrecord component
-
flammable
public boolean flammable()Returns the value of theflammablerecord component.- Returns:
- the value of the
flammablerecord component
-
replaceable
public boolean replaceable()Returns the value of thereplaceablerecord component.- Returns:
- the value of the
replaceablerecord component
-
emitLight
public int emitLight()Returns the value of theemitLightrecord component.- Returns:
- the value of the
emitLightrecord component
-
diggable
public boolean diggable()Returns the value of thediggablerecord component.- Returns:
- the value of the
diggablerecord component
-
powerSource
public boolean powerSource()Returns the value of thepowerSourcerecord component.- Returns:
- the value of the
powerSourcerecord component
-
breakFalling
public boolean breakFalling()Returns the value of thebreakFallingrecord component.- Returns:
- the value of the
breakFallingrecord component
-
blockWater
public boolean blockWater()Returns the value of theblockWaterrecord component.- Returns:
- the value of the
blockWaterrecord component
-
canBeSilkTouched
public boolean canBeSilkTouched()Returns the value of thecanBeSilkTouchedrecord component.- Returns:
- the value of the
canBeSilkTouchedrecord component
-
blockSolid
public boolean blockSolid()Returns the value of theblockSolidrecord component.- Returns:
- the value of the
blockSolidrecord component
-
blockMotion
public boolean blockMotion()Returns the value of theblockMotionrecord component.- Returns:
- the value of the
blockMotionrecord component
-
comparatorSignal
public boolean comparatorSignal()Returns the value of thecomparatorSignalrecord component.- Returns:
- the value of the
comparatorSignalrecord component
-
pushUpFalling
public boolean pushUpFalling()Returns the value of thepushUpFallingrecord component.- Returns:
- the value of the
pushUpFallingrecord component
-
waterlogFlowing
public boolean waterlogFlowing()Returns the value of thewaterlogFlowingrecord component.- Returns:
- the value of the
waterlogFlowingrecord component
-
waterlogSolid
public boolean waterlogSolid()Returns the value of thewaterlogSolidrecord component.- Returns:
- the value of the
waterlogSolidrecord component
-
boundingBox
public org.cloudburstmc.api.util.AxisAlignedBB boundingBox()Returns the value of theboundingBoxrecord component.- Returns:
- the value of the
boundingBoxrecord component
-
targetTool
public org.cloudburstmc.api.item.ToolType targetTool()Returns the value of thetargetToolrecord component.- Returns:
- the value of the
targetToolrecord component
-