Class CustomBlock.Builder

java.lang.Object
com.github.imdabigboss.easydatapack.api.blocks.CustomBlock.Builder
Enclosing class:
CustomBlock

public static class CustomBlock.Builder extends Object
This class represents a custom block builder.
  • 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 block
      namespaceKey - the namespace key of the block
      customModelData - the custom model data of the block (used for the item texture in the inventory)
      up - up state
      down - down state
      north - north state
      east - east state
      south - south state
      west - west state
      parent - the parent mushroom stem
  • Method Details

    • dropMaterial

      public @NonNull CustomBlock.Builder dropMaterial(@Nullable org.bukkit.Material 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

      public @NonNull CustomBlock.Builder dropAmount(int dropAmount)
      Sets the drop amount of the block.
      Parameters:
      dropAmount - the drop amount of the block
      Returns:
      the builder
    • dropExperience

      public @NonNull CustomBlock.Builder dropExperience(int dropExperience)
      Sets the drop experience of the block.
      Parameters:
      dropExperience - the drop experience of the block
      Returns:
      the builder
    • build

      public @NonNull CustomBlock build()
      Builds the custom block.
      Returns:
      the custom block