Interface BlockType
- All Known Implementing Classes:
BukkitBlockType
public interface BlockType
Represents a type of block.
-
Method Summary
Modifier and TypeMethodDescription@NotNull BlockState
createBlockState
(@NotNull String states) Create aBlockState
of thisBlockType
with the given state string.@NotNull NamespacedKey
getKey()
Get theNamespacedKey
of thisBlockType
.
-
Method Details
-
getKey
Get theNamespacedKey
of thisBlockType
.- Returns:
- the key
-
createBlockState
Create aBlockState
of thisBlockType
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 stateswaterlogged=false
andfacing=north
, thestates
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
-