Class CustomBlock.Builder
java.lang.Object
com.github.imdabigboss.easydatapack.api.blocks.CustomBlock.Builder
- Enclosing class:
- CustomBlock
This class represents a custom block builder.
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(@NonNull String name, @NonNull String namespaceKey, int customModelData, boolean up, boolean down, boolean north, boolean east, boolean south, boolean west, @NonNull CustomBlock.Parent parent)Creates a new custom block builder. -
Method Summary
Modifier and TypeMethodDescription@NonNull CustomBlockbuild()Builds the custom block.@NonNull CustomBlock.BuilderdropAmount(int dropAmount)Sets the drop amount of the block.@NonNull CustomBlock.BuilderdropExperience(int dropExperience)Sets the drop experience of the block.@NonNull CustomBlock.BuilderdropMaterial(@Nullable org.bukkit.Material dropMaterial)Sets the drop material of the block.
-
Constructor Details
-
Builder
public Builder(@NonNull String name, @NonNull String namespaceKey, int customModelData, boolean up, boolean down, boolean north, boolean east, boolean south, boolean west, @NonNull CustomBlock.Parent parent)Creates a new custom block builder.- Parameters:
name- the name of the blocknamespaceKey- the namespace key of the blockcustomModelData- the custom model data of the block (used for the item texture in the inventory)up- up statedown- down statenorth- north stateeast- east statesouth- south statewest- west stateparent- the parent mushroom stem
-
-
Method Details
-
dropMaterial
Sets the drop material of the block.- Parameters:
dropMaterial- the drop material of the block, set to null to drop the block itself- Returns:
- the builder
-
dropAmount
Sets the drop amount of the block.- Parameters:
dropAmount- the drop amount of the block- Returns:
- the builder
-
dropExperience
Sets the drop experience of the block.- Parameters:
dropExperience- the drop experience of the block- Returns:
- the builder
-
build
Builds the custom block.- Returns:
- the custom block
-