java.lang.Object
com.github.imdabigboss.easydatapack.api.blocks.CustomBlock

public class CustomBlock extends Object
This class represents a custom block.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    This class represents a custom block builder.
    static class 
    This enum represents the parent of a custom block, the block type used to display our custom block.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull org.bukkit.inventory.ItemStack
    Creates the item used to place the block.
    @NonNull org.bukkit.inventory.ItemStack
    Creates a drop for the block.
    int
    Gets the custom model data of the block's item.
    int
    Gets the dropped amount of the block.
    int
    Gets the dropped experience of the block.
    @Nullable org.bukkit.Material
    Gets the dropped material of the block.
    @NonNull org.bukkit.Material
    Gets the base block material.
    @NonNull String
    Gets the name of the block.
    @NonNull String
    Gets the namespace key of the block.
    Gets the parent of the block.
    boolean
    Gets the down state of the block.
    boolean
    Gets the east state of the block.
    boolean
    Gets the north state of the block.
    boolean
    Gets the east state of the block.
    boolean
    Gets the up state of the block.
    boolean
    Gets the west state of the block.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getName

      public @NonNull String getName()
      Gets the name of the block.
      Returns:
      the name of the block
    • getNamespaceKey

      public @NonNull String getNamespaceKey()
      Gets the namespace key of the block.
      Returns:
      the namespace key of the block
    • getCustomModelData

      public int getCustomModelData()
      Gets the custom model data of the block's item.
      Returns:
      the custom model data of the block's item
    • isUp

      public boolean isUp()
      Gets the up state of the block.
      Returns:
      the up state of the block
    • isDown

      public boolean isDown()
      Gets the down state of the block.
      Returns:
      the down state of the block
    • isNorth

      public boolean isNorth()
      Gets the north state of the block.
      Returns:
      the north state of the block
    • isSouth

      public boolean isSouth()
      Gets the east state of the block.
      Returns:
      the east state of the block
    • isEast

      public boolean isEast()
      Gets the east state of the block.
      Returns:
      the east state of the block
    • isWest

      public boolean isWest()
      Gets the west state of the block.
      Returns:
      the west state of the block
    • getParent

      public @NonNull CustomBlock.Parent getParent()
      Gets the parent of the block.
      Returns:
      the parent of the block
    • getDropExperience

      public int getDropExperience()
      Gets the dropped experience of the block.
      Returns:
      the dropped experience of the block
    • getDropMaterial

      public @Nullable org.bukkit.Material getDropMaterial()
      Gets the dropped material of the block.
      Returns:
      the dropped material of the block
    • getDropAmount

      public int getDropAmount()
      Gets the dropped amount of the block.
      Returns:
      the dropped amount of the block
    • createBlockItem

      public @NonNull org.bukkit.inventory.ItemStack createBlockItem()
      Creates the item used to place the block.
      Returns:
      the item used to place the block
    • createDrop

      public @NonNull org.bukkit.inventory.ItemStack createDrop()
      Creates a drop for the block.
      Returns:
      the drop for the block
    • getMaterial

      public @NonNull org.bukkit.Material getMaterial()
      Gets the base block material.
      Returns:
      the base block material