Class BlockProperties
java.lang.Object
com.github.darksoulq.abyssallib.world.block.BlockProperties
Defines the physical and interaction behavior of a custom block.
This class uses a builder pattern to configure immutable properties such as hardness, resistance, tool requirements, drops, and reactions to world events.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructingBlockPropertiesinstances.static enumEnum representing how a block reacts to piston movement. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanWhether the block supports the Fortune enchantment.final booleanWhether the block allows vanilla physics updates.final floatHardness of the block, used to determine break speed.final booleanWhether the block is flammable and can be destroyed by fire.final intMaximum experience dropped when broken.final intMinimum experience dropped when broken.How the block reacts to pistons.final booleanWhether the block supports Silk Touch to drop itself.final floatResistance of the block to explosions. -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockProperties.Builderof()Creates a newBlockProperties.Builderfor defining custom block properties.
-
Field Details
-
hardness
public final float hardnessHardness of the block, used to determine break speed. -
resistance
public final float resistanceResistance of the block to explosions. -
requireSilkTouch
public final boolean requireSilkTouchWhether the block supports Silk Touch to drop itself. -
allowFortune
public final boolean allowFortuneWhether the block supports the Fortune enchantment. -
isFlammable
public final boolean isFlammableWhether the block is flammable and can be destroyed by fire. -
allowPhysics
public final boolean allowPhysicsWhether the block allows vanilla physics updates. -
minExp
public final int minExpMinimum experience dropped when broken. -
maxExp
public final int maxExpMaximum experience dropped when broken. -
pistonReaction
How the block reacts to pistons.
-
-
Method Details
-
of
Creates a newBlockProperties.Builderfor defining custom block properties.- Returns:
- a new builder instance
-