recordinternalSource
public record BlockState(String name, Map<String, String> properties)

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

nameString

No description.

Accessor: name()
propertiesMap<String, String>

No description.

Accessor: properties()

Constructors

public BlockState(String name, Map<String, String> properties)
Parameters
nameString
propertiesMap<String, String>

Methods

public static BlockState fromNbt(NbtTag tag)
Reads a palette entry
Parameters
tagNbtTag
Returns
BlockState
Throws
IllegalArgumentExceptionIf it's no block state at all
public static BlockState of(String name)
Parameters
nameString
Returns
BlockState

Used by

Methods of other types that accept or return BlockState.