Skip to content

NBT

Provides the value of the NBT if it's a string, or use the count of the NBT if it's not a string.

Type ID: kaya:nbt

Format

Field Type Default Description
source NBT Provider The source to get an NBT from.
path NBT Path The path of the desired NBT to get from the source.

Example

{
    "type": "kaya:nbt",
    "source": {
        "type": "kaya:storage",
        "id": "example:data"// (1)!
    },
    "path": "string"
}
  1. An example data storage with the following contents:

    {value: true, stuff: [1, 2, 3], string: "Hello world!"}
    

This example queries the value of the string NBT from the example:data data storage.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.