Class BukkitBlockType

java.lang.Object
wtf.choco.veinminer.platform.world.BukkitBlockType
All Implemented Interfaces:
BlockType

public final class BukkitBlockType extends Object implements BlockType
A Bukkit implementation of BlockType.
  • Method Details

    • getKey

      @NotNull public @NotNull NamespacedKey getKey()
      Description copied from interface: BlockType
      Get the NamespacedKey of this BlockType.
      Specified by:
      getKey in interface BlockType
      Returns:
      the key
    • createBlockState

      @NotNull public @NotNull BlockState createBlockState(@NotNull @NotNull String states)
      Description copied from interface: BlockType
      Create a BlockState of this BlockType with the given state string.

      The states string should contain only the comma-delimited states of a block, excluding its type and the square brackets that surround the states in typical Minecraft command inputs. For instance, to create a blockstate with the states waterlogged=false and facing=north, the states string should be "waterlogged=false,facing=north" (excluding the quotation marks).

       createBlockState("waterlogged=false,facing=north");
       createBlockState("facing=south");
       createBlockState("waterlogged=true,type=double");
       
      Specified by:
      createBlockState in interface BlockType
      Parameters:
      states - the states with which to create a BlockState
      Returns:
      the created BlockState
    • getMaterial

      @NotNull public @NotNull Material getMaterial()
      Get the Bukkit Material represented by this BukkitBlockType.
      Returns:
      the material
    • of

      @NotNull public static @NotNull BlockType of(@NotNull @NotNull Material material)
      Get a BlockType for the given Material.
      Parameters:
      material - the material
      Returns:
      the block type
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object