Class CustomBlock
java.lang.Object
com.github.imdabigboss.easydatapack.api.blocks.CustomBlock
This class represents a custom block.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class represents a custom block builder.static classThis enum represents the parent of a custom block, the block type used to display our custom block. -
Method Summary
Modifier and TypeMethodDescription@NonNull org.bukkit.inventory.ItemStackCreates the item used to place the block.@NonNull org.bukkit.inventory.ItemStackCreates a drop for the block.intGets the custom model data of the block's item.intGets the dropped amount of the block.intGets the dropped experience of the block.@Nullable org.bukkit.MaterialGets the dropped material of the block.@NonNull org.bukkit.MaterialGets the base block material.@NonNull StringgetName()Gets the name of the block.@NonNull StringGets the namespace key of the block.@NonNull CustomBlock.ParentGets the parent of the block.booleanisDown()Gets the down state of the block.booleanisEast()Gets the east state of the block.booleanisNorth()Gets the north state of the block.booleanisSouth()Gets the east state of the block.booleanisUp()Gets the up state of the block.booleanisWest()Gets the west state of the block.
-
Method Details
-
getName
Gets the name of the block.- Returns:
- the name of the block
-
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
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
-