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
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. |