Skip to content

Check Block Type

Check if a block is of a type or if it's included in a block tag.

Type ID: kaya:check_block_type

Format

Field Type Default Description
key Identifier optional If specified, checks if the block is of this specific type.
tag Block Tag optional If specified, checks if the block is included in this block tag.
block Block Provider The block to check.
Warning

Both key and tag fields should not be present or absent at the same time! Otherwise an error will be thrown.

Example

{
    "type": "kaya:check_block_type",
    "tag": "#minecraft:planks",
    "block": "broken_block"
}

This example will check if the block provided by the kaya:broken_block context parameter is included in the #minecraft:planks block tag.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.