2
Need scoreboard help with Food Healing in 1.21
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:
So uh… how do I edit load.mcfunction to write the relevant scoreboard data into scoreboard.dat?
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?
Create an account or sign in to comment.
15

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
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

Nope. I can use the datapack itself in 1.21.5.

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?
Do you have a conflicting datapack by any chance?

Well, it's a bigger problem anyway;
This includes the gamerule; natgen is enabled even though the gamemode set it to false.
[Render thread/ERROR] Failed to load function rf:load
This includes the gamerule; natgen is enabled even though the gamemode set it to false.

natgen was still unchanged because the entire function was ignored due to that error.

Is there an accompanying error that explains why the function failed to load?

[Render thread/ERROR] Couldn't load tag minecraft:load as it is missing following references: rf:load (from file/food-healing.zip)

nah that doesnt say anything on why rf:load failed to load.
Can you give us the rf:load commands or the file?
Can you give us the rf:load commands or the file?

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.)
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.)

Cant access it.
Try uploading it to a filehost or copying the commands into here
Try uploading it to a filehost or copying the commands into here
view more replies ( 1 )

Try replacing
scoreboard objectives add food_level food {text:"Food Level",color:"blue",type:"text"}
withscoreboard objectives add food_level food {"text":"Food Level","color":"blue"}

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
Both of these commands will work in 1.21.5