Skip to main content

Add Block (Block Action Type)

Places a block at the action's position, but only if the block already there can be replaced, the way air, water or short grass can. apoli:set_block overwrites whatever is there, while this action leaves solid blocks alone.

Type ID: apoli:add_block

Fields

FieldTypeDefaultDescription
blockIdentifierrequiredThe ID of the block to place. It takes a plain block ID, so the block is always placed in its default state.
nbtNBToptionalBlock entity data for the placed block, such as a chest's contents. It only applies to blocks that have a block entity.

To change a property of the placed block, such as which way it faces, follow this action with apoli:modify_block_state.

Examples

"block_action": {
    "type": "apoli:add_block",
    "block": "minecraft:coal_ore"
}

This places a coal ore block at the position, if the block there can be replaced.