Skip to content

Block

Encodes the block as NBT and uses it as the provided value.

Type ID: kaya:block

Info

The block is encoded in the following format:

#   The 'entity' NBT is only present if the block is a block entity
{pos: [<int>, <int>, <int>], state: {Name: "<block_id>", Properties: { /* block state properties */ }}, entity: {id: "<block_entity_id">, /* data of the block entity */}}

Format

Field Type Default Description
block Block Provider The block to encode as NBT.

Example

{
    "type": "kaya:block",
    "block": "selected_block"
}

This example encodes the block provided by the kaya:selected_block context parameter and provides it as the NBT value.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.