NBT
Compares two NBT elements and its contents if it's a list.
Type ID: kaya:nbt
Format
| Field | Type | Default | Description |
|---|---|---|---|
first |
NBT Provider | The first NBT to compare to. | |
second |
NBT Provider | The second NBT to be compared. |
Example
{
"type": "kaya:nbt",
"first": {
"Item": {
"components": {
"minecraft:custom_data": {
"example:data": {
"striker": true
}
}
}
}
},
"second": {
"type": "kaya:entity",
"entity": "projectile"
}
}
This example compares the NBT of the entity from the kaya:projectile_entity context parameter to the first NBT, essentially checking if the entity has an item that has the minecraft:custom_data item component that contains an example:data NBT compound with striker: 1b.
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |