Interface BlockType

All Known Implementing Classes:
BukkitBlockType

public interface BlockType
Represents a type of block.
  • Method Details

    • getKey

      @NotNull @NotNull NamespacedKey getKey()
      Get the NamespacedKey of this BlockType.
      Returns:
      the key
    • createBlockState

      @NotNull @NotNull BlockState createBlockState(@NotNull @NotNull String states)
      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");
       
      Parameters:
      states - the states with which to create a BlockState
      Returns:
      the created BlockState
      Throws:
      IllegalArgumentException - if the supplied state string is in an unsupported format and cannot be understood nor parsed correctly by VeinMiner or Minecraft