2

Need scoreboard help with Food Healing in 1.21

Hebgbs5/1/25 1:07 pm history
5/13/2025 1:03 am
HoboMaggot
The title was going to be a bit more verbose, but I'd imagine that'd drive some people away even though for _somebody else_ with moderate data pack experience, this would be such a simple solve.

I put Food Healing for 1.20.x into a world for 1.20.5 and updated the datapack through Easy Map Updater, which made the pack function in an already-existing world after updating the save for 1.21.1 (which it says 1.21.5, but it always assumes latest and there isn't significant difference in any of the 1.21 branch).

When trying to use the datapack in a new world for 1.21.1, after dropping it into the datapacks directory for the world, it doesn't work as expected ­— this is because the pack's load function uses scoreboard commands, but it doesn't do anything to write that data into the world's scoreboard.dat file.

People tell me to create objectives and make constants, but I get all dizzy-face when something isn't basically done for me and I've never bothered with this fuss before. I assumed Easy Map Updater would fix scoreboard stuff for me, but I suppose it was a bit much expecting a utility for updating worlds to re-write data packs using the scoreboard function when there is _zero_ context for it, and I don't feel like asking an LLM to do this for me since I already waste enough water as it is myself, let alone somebody else's computer several hundred miles away from my location.

Here's the scoreboard writes it attempts to do, which works in 1.20.x but doesn't in 1.21.x:

gamerule naturalRegeneration false

scoreboard objectives add food_level food {text:"Food Level",color:"blue",type:"text"}
scoreboard objectives add sleep_reg minecraft.custom:minecraft.sleep_in_bed

effect give @s minecraft:saturation 80 0 true
effect give @s minecraft:hunger 10 150 true

So uh… how do I edit load.mcfunction to write the relevant scoreboard data into scoreboard.dat?
Posted by
Hebgbs
Level 50 : Grandmaster Archer
49

Create an account or sign in to comment.

15

ICanGamez
05/12/2025 9:54 pm
He/Him • Level 58 : Grandmaster Blockhead Imposter
Idk if you fixed the command yet but because the scoreboard food_level is not updated to 1.21 and still uses 1.20 data
it will just break the whole load.mcfunction command sadly.
Thats why minecraft is having a hard time pointing to the load file because its an improper mcfunction file with one bad command in it.

All you needa fix is just add quotes to the text and color and type like this! {"text":"Food Level","color":"blue","type":"text"}Hope this helps :3
1
HoboMaggot
05/13/2025 1:03 am
Level 54 : Grandmaster Blob
history
Nope. I can use the datapack itself in 1.21.5.
2
HoboMaggot
05/06/2025 11:38 pm
Level 54 : Grandmaster Blob
Just tested the datapack in 1.21.5 flat world and the datapack works for me.
Do you have a conflicting datapack by any chance?
1
Hebgbs
05/02/2025 7:34 pm
Level 50 : Grandmaster Archer
history
Well, it's a bigger problem anyway;
[Render thread/ERROR] Failed to load function rf:load

This includes the gamerule; natgen is enabled even though the gamemode set it to false.
1
HoboMaggot
05/06/2025 11:39 pm
Level 54 : Grandmaster Blob
natgen was still unchanged because the entire function was ignored due to that error.
1
HoboMaggot
05/02/2025 9:40 pm
Level 54 : Grandmaster Blob
Is there an accompanying error that explains why the function failed to load?
1
Hebgbs
05/02/2025 11:05 pm
Level 50 : Grandmaster Archer
[Render thread/ERROR] Couldn't load tag minecraft:load as it is missing following references: rf:load (from file/food-healing.zip)
1
HoboMaggot
05/03/2025 12:05 am
Level 54 : Grandmaster Blob
nah that doesnt say anything on why rf:load failed to load.
Can you give us the rf:load commands or the file?
1
Hebgbs
05/03/2025 3:25 am
Level 50 : Grandmaster Archer
history
I'll just give the file. Not sure how valid this URL will be, since it's an upload on Discord's servers but figured it would be good a place as any and I don't have to mind it later.
https://cdn.discordapp.com/attachments/1075329115533615144/1368125617249325107/food-healing.zip?ex=681715c5&is=6815c445&hm=5f6ad018dd4b9dd6a56f7a5af2e79f21c8bbc3f33cbc4cfe0a17ca86961f14db&

(Bonus brownies if you can figure out the bot I sent this to.)
1
HoboMaggot
05/05/2025 7:31 am
Level 54 : Grandmaster Blob
history
Cant access it.
Try uploading it to a filehost or copying the commands into here
1
CommandYaw
05/02/2025 4:16 am
He/Him • Level 35 : Artisan Modder
Try replacing
scoreboard objectives add food_level food {text:"Food Level",color:"blue",type:"text"}with
scoreboard objectives add food_level food {"text":"Food Level","color":"blue"}
3
HoboMaggot
05/06/2025 11:36 pm
Level 54 : Grandmaster Blob
history
The type tag sets itself to the default anyways when the scoreboard is made, so the command is just redundant.

Both of these commands will work in 1.21.5
1

Welcome