Class BlockProperties.Builder
java.lang.Object
com.github.darksoulq.abyssallib.world.block.BlockProperties.Builder
- Enclosing class:
BlockProperties
Builder for constructing
BlockProperties instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowFortune(boolean value) Enables or disables Fortune support.allowPhysics(boolean value) Sets whether the block accepts vanilla physics updates.build()Builds a newBlockPropertiesinstance.expDrop(int min, int max) Sets the experience drop range for this block.flammable(boolean value) Sets whether the block is flammable.hardness(float value) Sets the hardness of the block.pistonReaction(@NotNull BlockProperties.PistonReaction reaction) Sets the piston reaction for this block.requireSilkTouch(boolean value) Enables or disables Silk Touch support.resistance(float value) Sets the explosion resistance of the block.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
hardness
Sets the hardness of the block.- Parameters:
value- the block's hardness- Returns:
- this builder
-
resistance
Sets the explosion resistance of the block.- Parameters:
value- the resistance value- Returns:
- this builder
-
requireSilkTouch
Enables or disables Silk Touch support.- Parameters:
value- true if Silk Touch is required- Returns:
- this builder
-
allowFortune
Enables or disables Fortune support.- Parameters:
value- true if Fortune affects drops- Returns:
- this builder
-
flammable
Sets whether the block is flammable.- Parameters:
value- true if flammable- Returns:
- this builder
-
allowPhysics
Sets whether the block accepts vanilla physics updates.- Parameters:
value- true to allow physics- Returns:
- this builder
-
expDrop
Sets the experience drop range for this block.- Parameters:
min- minimum XPmax- maximum XP- Returns:
- this builder
-
pistonReaction
public BlockProperties.Builder pistonReaction(@NotNull @NotNull BlockProperties.PistonReaction reaction) Sets the piston reaction for this block.- Parameters:
reaction- theBlockProperties.PistonReaction- Returns:
- this builder
-
build
Builds a newBlockPropertiesinstance.- Returns:
- the properties instance
-