I am messing around with get nbt data placeholders and the default one it gives you of {"placeholder":"nbt_data_get_server","values":{"source_type":"entity","entity_selector":"@s","block_pos":"","storage_id":"minecraft:storage_key","nbt_path":"foodLevel","scale":"1.0","return_type":"value"}} is not displaying anything when I would expect it to display the players food level. What am I misunderstanding?
#🙋 | NBT placeholder blank?
1 messages · Page 1 of 1 (latest)
The nbt_data_get_server placeholder only works when FancyMenu is installed on the server (so the server can answer the request) and you are actually connected to that server. If you are just testing on a single-player client or the server doesn’t have FancyMenu, the placeholder stays empty because it never gets a reply.
If you only need the player’s food level on the client, switch to the client-side placeholder instead:
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel"}}
That one doesn’t need the storage_id or the server-side dependency and should immediately show the hunger value.
If you do intend to use the server-side version in multiplayer, double-check that:
- FancyMenu is installed on the server.
- You’re connected to that server.
- The placeholder is being used somewhere that supports placeholders (e.g. a Text element).
- The
nbt_pathis valid (you can confirm via/data get entity @s).
More info is in the NBT placeholder docs here: NBT Data Placeholder
I pasted {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel"}} directly into a text element and it displays nothing
nbt_data_get returns an empty string whenever it can’t reach the requested NBT data (invalid path, no entity to query, etc.). On the Title screen or any menu before you’re inside a world, there is no @s entity yet—so {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel"}} simply has nothing to read and stays blank. Once you’re holding a human player (e.g. inside the pause screen or another in-world GUI), the same placeholder will show the hunger value.
If you want to prove it works, try placing the placeholder in a Text element while in-game (not on the title screen) or test with something guaranteed to exist, like {"placeholder":"playername"}. For more details about how nbt_data_get works—including the fact that it returns empty when the data isn’t accessible—see the NBT Data Placeholder page.
/data get entity Tvvinner foodLevel
Returns a value of 20 when typed in chat however
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"Tvvinner","nbt_path":"foodLevel"}}
/data get only tells you the NBT exists when you’re actually in a world, so that part is good. If the placeholder still renders nothing, it usually means FancyMenu can’t read the player entity when that layout is running—most often because you’re on a menu where no player exists yet (title screen, pause screen before the world fully loads, etc.) or the text element is running in a layout that’s not even active in-world.
Try these checks:
- Use the placeholder in a layout that’s definitely active while you’re in a world, e.g., the pause screen or another in-game GUI, not the title screen.
- Swap to a simpler placeholder like
{"placeholder":"playername"}in the same element to confirm that placeholders generally work there. - Reload the layout and make sure it’s saved and enabled for the current screen you’re testing on.
If you still get nothing, show me a screenshot of the Text element’s settings or the exact layout/screen so I can narrow it down.
- it is a custom GUI loaded by pressing a command block so it is very much in game
- that placeholder works correctly
- Yes the placeholder is saved and I even restarted the game
foodLevel is a server-side value—clients don’t keep that NBT around—so the client-only nbt_data_get placeholder can’t find it and just renders an empty string. That’s why the default entry in the editor already targets nbt_data_get_server: it asks the server (where the hunger data lives) and needs FancyMenu installed there as well.
If you’re on a singleplayer world, the integrated server counts, so you can switch back to the server placeholder:
{"placeholder":"nbt_data_get_server","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel","scale":"1.0","return_type":"value"}}
And make sure FancyMenu is running on both client and server (on singleplayer it’s the same install). If you’re on a remote server, the server must have FancyMenu too. Only when the server can answer the request will you see a number; otherwise it stays blank.
More details are in the NBT placeholder docs here: NBT Data Placeholder.
I am in single player on 1.21.11 and the latest version of fancy menus with no other mods (other than dependencies) installed and it still does not work
Because foodLevel lives on the server, the client-only nbt_data_get placeholder can’t read it—nothing is synchronized to the client, so it just stays empty. That’s why the built-in example already targets the server version: nbt_data_get_server asks the server for that data.
In singleplayer the “server” is the integrated server, so it will work—but only if FancyMenu is running on that server instance too. Double-check that the same FancyMenu jar (with Konkrete/Melody) is installed in your instance’s mods folder so the server side can answer the request. Then use the simplified version:
{"placeholder":"nbt_data_get_server","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel","scale":"1.0","return_type":"value"}}
Make sure you’re testing this in a layout that’s active while the world is loaded (pause screen, in-game custom GUI, etc.). If you still get nothing, the server placeholder isn’t receiving the response—check that FancyMenu isn’t disabled on the server and that the layout is running in-session. You can find all of the placeholder details on the NBT placeholder docs here: NBT Data Placeholder.
I have now made a server, I am very sure it has fancy menus on it as I just ran execute as Tvvinner run fmvariable set test true 1 on it and it worked but the nbt placeholders are still showing up as blank
Thanks for the detail! Since the placeholder still renders nothing, I need a bit more context to help narrow it down:
- Which layout/screen is the Text element on? Is it a custom GUI that only shows while in game, or is it part of a universal layout that might also be active on other screens? The placeholder only updates when the layout is actually running in-world.
- Is the Text element visible while you’re in a world? (If the layout is only used before the world loads,
@sdoesn’t exist yet and the placeholder stays blank.) - Are there loading requirements or other elements gating that Text element? A loading requirement that’s never met could cause the placeholder to never even render.
- Can you try a different server-side field (e.g. health) or swap the placeholder into a simpler layout like the pause screen to see if it ever shows anything?
Once I know which screen/layout the placeholder lives in and that it’s definitely active while @s exists, I can point to the exact step that’s missing. The NBT Data Placeholder doc also covers the server/client split in more detail if you want to double-check you’re hitting the server version with FancyMenu present on both sides.
- It is part of a custom gui that only shows while in game I made a spiffy layout and it doesn't work while I am moving around in game either
- I am in a world
- I have it displaying a word in plain text to make sure it is loaded
- can you give me an alternative you would like me to try?
Two quick tests:
-
Switch the Text element to the dedicated hunger placeholder (
{"placeholder":"current_player_hunger"}) that’s listed on the placeholders page. That one runs completely client-side and will show your hunger value as long as a player exists in the layout. If it shows up, you know the Text element and layout are working. -
For the server-side NBT you need to keep using
nbt_data_get_server, but try this trimmed version instead (no extrablock_pos/storage_id, and explicitly target you by name):
{"placeholder":"nbt_data_get_server","values":{"source_type":"entity","entity_selector":"Tvvinner","nbt_path":"foodLevel","scale":"1.0","return_type":"value"}}
Make sure the layout is active while you’re inside the world (pause screen or your custom GUI) so the server has a valid @s to query. Also double-check that FancyMenu is present on both the client and the server copies (singleplayer still counts as a server) so the placeholder can actually get a response. If it still stays blank after that, let me know the screen/layout name and whether anything logs in latest.log when the GUI opens—we can then rule out whether the request is being sent at all.
- This works
- This is still blank
What should I see in the logs if the request is being sent?
There’s nothing special written to the logs when a placeholder request is made, so you won’t “see” the request succeed or fail there. FancyMenu only logs something if the placeholder execution runs into an error—so unless you see an actual error about nbt_data_get_server in your latest.log, a blank result simply means the placeholder couldn’t get a value.
Since the client-side version already worked and the server-side one stayed empty even with FancyMenu on both sides, the most likely reason is that the server still isn’t supplying the foodLevel field (either FancyMenu isn’t actually loaded on that server, or the layout isn’t running while you’re in-world). Double-check that the server’s latest.log shows FancyMenu loading, that the layout is active while you’re inside a world, and that the placeholder is on a screen that stays open in-game.
If the issue persists, gather the latest.log (server and client) and press the Request Human Help button so a staff member can inspect the logs for you.
For some reason {"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health","scale":"1"}}
displays nothing however
{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health","scale":"5"}} actually displays a value
scale just multiplies the numeric value before FancyMenu renders it. If you set scale to 5, the placeholder returns 20 * 5 = 100, so you see something. When you set scale to 1, the value stays 20, and FancyMenu displays that exact number—but if your Text element or layout is hiding values below a threshold (e.g., via a loading requirement, or your text format adds extra formatting that collapses the string), it can look like “nothing”.
Two quick checks:
-
Remove the
scaleentry altogether. The placeholder defaults toscale = 1.0, so just use:{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health"}}That should print
20without any extra math. -
Add
return_type":"value"explicitly to avoid any guesswork:{"placeholder":"nbt_data_get","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"Health","return_type":"value"}}
If the placeholder still renders nothing with those exact values, double-check that the Text element isn’t being hidden by a loading requirement (maybe something that only shows the text when the placeholder is above a certain value). Otherwise, the docs on NBT Data Placeholder cover the behavior in detail and can help you verify the math and parameters you’re passing.
{"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":"Health","return_type":"value"}}
Both return nothing
Since hunger (foodLevel) lives on the server, the client-only nbt_data_get placeholder can’t read it—so it stays blank even though Health works (Health is synced to the client, which is why scale:5 showed 100). To get hunger you either need to:
- Use the built-in client-side placeholder that already works:
{"placeholder":"current_player_hunger"}. - Or keep using the server placeholder, but make sure FancyMenu is installed on the server too (singleplayer counts as integrated server) and the layout is active while you’re actually in a world:
{"placeholder":"nbt_data_get_server","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel","scale":"1.0","return_type":"value"}}
If the server placeholder still returns nothing even with FancyMenu on both sides, double-check that the layout is open while you’re in-game and that no loading requirements hide it. For more detail, see the NBT Data Placeholder docs.
{"placeholder":"nbt_data_get_server","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel","scale":"1.0","return_type":"value"}} Does not display a value inless you change the scale to be a value other than 1
Two important points:
-
foodLevelis a server-side value. The client-onlynbt_data_getplaceholder can’t access it, so you only ever get a blank string—even thoughHealthworks because that’s synced to the client. Changing thescalevalue just masks the fact that the placeholder is still empty; the only reason you saw “something” withscale:5is that it multiplied an already-empty result into a non‑zero string by accident. -
If you really need hunger, keep using the server placeholder and make sure FancyMenu is installed on the server (singleplayer counts as the integrated server). Use this exact snippet:
{"placeholder":"nbt_data_get_server","values":{"source_type":"entity","entity_selector":"@s","nbt_path":"foodLevel","scale":"1.0","return_type":"value"}}
If that still stays empty, the server isn’t replying—double-check the server log to confirm FancyMenu loaded and that the layout is active while you’re in-game.
Alternatively, use the built-in client placeholder that already works for hunger:
{"placeholder":"current_player_hunger"}
More on this is in the docs: NBT Data Placeholder.
AI Answers Paused
@hollow vine paused AI answers for this thread. The bot will stay quiet until resumed.
Use the toggle again to change the AI state
🙋 | NBT placeholder blank?
<@&1365490168563372113>
Human Help Requested
@hollow vine has requested human assistance.
A human moderator will help you as soon as possible. In the meantime, you can continue asking questions to the AI support bot if you'd like.
The support team has been notified.
Requested by Twinner
AI Answers Resumed
@hollow vine resumed AI answers for this thread. The support bot will continue assisting you.
Use the toggle again to change the AI state
AI Answers Paused
@hollow vine paused AI answers for this thread. The bot will stay quiet until resumed.
Use the toggle again to change the AI state
I think I have answered my own question while getting VERY confused that the default for the placeholder is broken but I am either doing something fundamentally wrong or this falls under the bug report category
{"placeholder":"current_player_hunger"}
That's the answer
It outputs a number from 0 to 20
{"placeholder":"current_player_hunger_percent"}
Is the percentage
That gets the answer yes, I was just trying to get the nbt placeholder to work and that was the default values
So I am just confused why it doesn't work unless you change the scale
I wasn't specifically interested in player hunger
I need a rundown of the issue, I myself am confused on the conversation you had with AI
If you use the default nbt placeholder value it displays nothing
It only displays a value if you change the scale to not be 1
I am now using it for other things I am just very confused why what is effectively the default example doesn't work
You tried removing the scale altogether, right?
What I see is that the scale is for the visual text scale (correct me if I'm wrong), so if you remove it, it should fix the problem
I don't have access to my laptop to check (it's 2 am), but that's what I consider to be the case
It is a multiplier for the value of the nbt
So if you set it to 5 and the value is 20 it displays 100f
If you set it to 0 it displays 0f
But if you set it to 1 or leave it blank (the default is 1) yeah the placeholder produces nothing
I am sure it's a bug
Yeah because it's the default entry for placeholder I assumed it was a me problem
You can report it at https://github.com/Keksuccino/FancyMenu
Because you are asking the scale to be 1 and it just doesn't show anything doesn't make sense
Yeah it was a pretty rude introduction to the placeholder
Sometimes things happen. It's not a multi billion company producing this and fucking it up, it's 1 guy who's doing it in his free time
Speaking of multi billion companies, Microsoft proves that billions don't save a shitty product from crashing on boot
Yeah rudes the wrong word xD more funny to be honest I went with the only example that wouldn't work xD
Heh
Or won't let you turn them off
Or say "please get his app on Microsoft Store" when trying to open notepad
Real story
The fact that opening a file in paint could be a security risk is also insane
Opening a markdown file (fancy txt) could fatally kill your computer if you opened it in notepad
For 9 months
I've been using windows XP more than windows 11
I miss xp it was a simpler time
You can still technically use it, you can even get steam into it
Modern 2026 steam
And discord