A block with its properties, e.g. minecraft:oak_log with axis=x. No properties means the block's default state, since 5006 Minecraft doesn't even store them for that one
Record components
nameStringNo description.
propertiesMap<String, String>No description.
Constructors
public BlockState(String name, Map<String, String> properties)Methods
fromNbt(NbtTag)
staticSource
public static BlockState fromNbt(NbtTag tag)Reads a palette entry
| Parameters | ||
|---|---|---|
tag | NbtTag | |
| Returns | ||
BlockState | ||
| Throws | ||
IllegalArgumentException | If it's no block state at all | |
of(String)
staticSource
public static BlockState of(String name)| Parameters | ||
|---|---|---|
name | String | |
| Returns | ||
BlockState | ||
Used by
Methods of other types that accept or return BlockState.