NBT Data Placeholder

Read entity, block, and storage NBT data.

NBT Data Placeholderslink

FancyMenu provides two NBT placeholders:

PlaceholderRuns onAvailable data
nbt_data_getClientClient-visible entities and block entities
nbt_data_get_serverServerVanilla /data get targets; requires FancyMenu on the server

Client-Side Placeholderlink

{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health"}}

Valueslink

ValueRequiredDescription
source_typeYesentity or block
entity_selectorFor entitiesClient-side selector, UUID, or exact entity name
block_posFor blocksThree absolute integer coordinates, such as 100 64 -200
nbt_pathYesNBT path, such as Health, Pos[0], or Inventory[0].id
scaleNoMultiplies numeric value results; default 1.0
return_typeNovalue, string, snbt, or json; default value

Client-side block positions do not support ~ or ^ coordinates.

Client Entity Selectorslink

SelectorInitial targetsDefault order
@sLocal playerSelf
@pPlayersNearest
@aPlayersClient iteration order
@rPlayersRandom
@eAll client-visible entitiesClient iteration order

@e does not select the nearest entity unless you add sort=nearest. Direct UUID and exact entity-name lookup are also supported.

Supported selector options:

OptionDescription
typeEntity ID; prefix with ! to exclude
nameExact display name; prefix with ! to exclude
tagEntity tag; prefix with ! to exclude
limitPositive result limit
sortnearest, furthest, random, or arbitrary
distanceVanilla distance range, such as ..10 or 5..20
x, y, zSearch origin; accepts absolute values and ~ offsets
dx, dy, dzSearch-box size from the origin

Local ^ coordinates and other vanilla selector options are not supported by the client placeholder.

Example:

{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@e[type=minecraft:zombie,sort=nearest,limit=1,distance=..20]","nbt_path":"Health"}}

Return Typeslink

TypeResult
valueNumeric tags are formatted numerically and apply scale; string tags return their text; other tags return SNBT-like text
stringReturns the tag's string value, or an empty string when the tag has no string value
snbtReturns the tag's SNBT representation
jsonFor compound tags only: returns a serialized Minecraft text component containing pretty NBT output

The client-side json mode is not a direct NBT-to-JSON conversion.

Exampleslink

Player hunger:

{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel"}}

First hotbar item ID:

{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Inventory[{Slot:0b}].id","return_type":"string"}}

Block-entity item count:

{"placeholder":"nbt_data_get","values":{"source_type":"block","block_pos":"100 64 -200","nbt_path":"Items[0].count"}}

Server-Side Placeholderlink

nbt_data_get_server follows the server's /data get behavior and supports:

  • Full server-side entity selectors.
  • Block targets with absolute, relative (~), or local (^) coordinates.
  • Command storage through source_type:"storage".
{"placeholder":"nbt_data_get_server","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health","return_type":"value"}}

The placeholder returns an empty value until the server response arrives. Responses are briefly cached to avoid excessive requests.

Finding NBT Pathslink

Use the matching command without an NBT path to inspect available data:

/data get entity @s
/data get block 100 64 -200

Client-side results are limited to data synchronized to the client. Invalid targets or paths return an empty string and write details to logs/latest.log.