Expand description
Block state IDs for common Minecraft 1.21.4 blocks.
These are the default state IDs from the vanilla data generator. Each block can have multiple states (e.g., grass_block has snowy and non-snowy variants), but we use the default (non-snowy) state.
Constants§
- AIR
- Air — no block, fully transparent.
- BEDROCK
- Bedrock — indestructible bottom layer.
- CHEST
- Chest — default state (facing north, type single, no waterlog).
- CRAFTING_
TABLE - Crafting table — default state (1.21.4 block state ID).
- DIRT
- Dirt — soil block without grass.
- GRASS_
BLOCK - Grass block — dirt with grass on top (default: snowy=false).
- GRAVEL
- Gravel — underwater floor block.
- SAND
- Sand — beach and desert block.
- SNOW_
BLOCK - Snow block — covers high-altitude terrain tops.
- STONE
- Stone — basic underground block.
- WATER
- Water — still water (default state, level 0).
Functions§
- block_
state_ to_ item_ id - Returns the item ID that a block state drops when broken.
- chest_
adjacent_ offsets - Returns the adjacent position for double chest pairing based on facing.
- chest_
double_ types - Given a facing and the offset direction of the adjacent chest, returns (type_for_new, type_for_existing).
- chest_
facing - Extracts the facing index from a chest state (0=north, 1=south, 2=west, 3=east).
- chest_
state - Builds a chest state from facing, type, and waterlogged=false.
- chest_
state_ for_ yaw - Returns the chest block state for a given player yaw (facing the player).
- chest_
type - Extracts the type from a chest state (0=single, 1=left, 2=right).
- is_
chest - Returns true if the block state is any chest variant.
- is_
crafting_ table - Returns true if the block state is a crafting table.
- is_
single_ chest - Returns true if the chest state is a single chest (not part of a double).
- is_
solid - Returns whether a block state ID represents a solid (collidable) block.
- item_
to_ default_ block_ state - Maps a Minecraft item registry ID to the default block state ID.