These placeholders are available in FancyMenu v3.8.0+.
The Client NBT Data Get and Server NBT Data Get placeholders allows you to retrieve NBT (Named Binary Tag) data from entities and blocks in Minecraft, similar to the /data get command. This is extremely useful for creating dynamic layouts that respond to game state, player stats, or world conditions.
This placeholder is particularly powerful for modded gameplay, as it can access custom NBT data that mods add to entities and players. Whether you're playing with magic mods that add mana systems, RPG mods with custom stats, or technology mods with energy values, you can display these modded values in your UI layouts.
These placeholders extracts specific values from NBT data structures using NBT paths. You can retrieve player health, hunger, inventory items, block states, modded attributes like mana or energy, and much more.
The client-side version of the placeholder has the big advantage that it works purely client-side, so you don't need FancyMenu on the server, but this also makes it a lot more limited, because not everything related to NBT data is visible to all clients all the time.
The server-side version requires FancyMenu to be installed on the server, but this gives it full support for basically everything that is stored as NBT.
This page will focus on the client-side version (nbt_data_get), but everything works very similar for the server-side version (nbt_data_get_server) too.
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health"}}
| Value | Description | Options |
|---|---|---|
source_type |
The type of data source | entity or block |
nbt_path |
The NBT path to query | e.g. Health, foodLevel, Pos[0], Inventory[0].id |
Depending on your source_type, you'll need one of these:
| Value | Required When | Description | Format |
|---|---|---|---|
entity_selector |
source_type is entity |
Selects which entity to query | @s (self), @p (nearest player), @e (nearest entity), UUID, or entity name |
block_pos |
source_type is block |
The block's coordinates | x y z (e.g. 100 64 -200) |
| Value | Description | Default | Options |
|---|---|---|---|
scale |
Scale factor for numeric values | 1.0 |
Any decimal number |
return_type |
How to format the returned data | value |
value (numeric/size), string (text), snbt (formatted NBT), json (JSON format) |
value - Returns numeric values or sizes (default)
string - Returns the actual string value of the NBT data
snbt - Returns the data in SNBT (Stringified NBT) format
json - Returns the data in JSON format (only for compound tags)
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health"}}
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel"}}
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Pos[0]"}}
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Inventory[{Slot:0b}].id","return_type":"string"}}
{"placeholder":"nbt_data_get","values":{"source_type":"block","block_pos":"100 64 -200","nbt_path":"Items[0].Count"}}
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health","scale":"5"}}
/data get Command (Recommended)The easiest way to discover available NBT paths is to use the /data get command in-game without specifying a path:
/data get entity @p/data get block <x> <y> <z>This will display all available NBT data for that target, showing you the exact paths you can use.
When you run /data get entity @p, you'll see output similar to this:
Player616 has the following entity data: {Brain: {memories: {}},
HurtByTimestamp: 0, SleepTimer: 0s, Invulnerable: 0b, FallFlying:
0b, PortalCooldown: 0, AbsorptionAmount: 0.0f, abilities:
{invulnerable: 1b, mayfly: 1b, instabuild: 1b, walkSpeed: 0.1f,
mayBuild: 1b, flying: 1b, flySpeed: 0.05f}, FallDistance: 0.0f,
recipeBook: {recipes: ["minecraft:crafting_table"]},
DeathTime: 0s, XpSeed: -380875747, XpTotal: 0, UUID: [I; 1379890089, -1732753738,
-2135065633, -718799804], playerGameType: 1, seenCredits:
0b, Motion: [0.0d, 0.0d, 0.0d], Health: 20.0f, foodSaturationLevel:
5.0f, ...}
To extract a valid path from this output:
Simple values - Use the key name directly:
Health: 20.0f → Path: Health{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health"}}Nested values - Use dot notation to access nested data:
abilities: {walkSpeed: 0.1f} → Path: abilities.walkSpeed{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"abilities.walkSpeed"}}Array values - Use brackets with index numbers:
Motion: [0.0d, 0.0d, 0.0d] → Path for Y motion: Motion[1]{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Motion[1]"}}For easier NBT path discovery, consider installing the NBT Autocomplete mod:
Health - Current health (float)foodLevel - Hunger level (int, 0-20)foodSaturationLevel - Saturation level (float)XpLevel - Experience level (int)XpP - Experience progress (float, 0.0-1.0)Pos[0], Pos[1], Pos[2] - X, Y, Z coordinatesInventory - Player inventory arraySelectedItemSlot - Currently selected hotbar slot (int, 0-8)Items - Container contents (chests, furnaces, etc.)CustomName - Custom name of the blockLock - Lock string for containersplayerMana, mana.current, or similarenergy, forgeEnergy, or energyStorage.energycustomStats.strength, rpgAttributes.levelTo find modded NBT paths, use /data get entity @p while the mod is active and look for the custom tags added by the mod.
/data getscale parameter to convert values to percentages or other useful formats/data get to discover custom NBT paths