I noticed a bug when I tried to play my world in the latest version (currently world is saved in version 1.12.2).
Problem is that the most Scoreboard values are not showing.
After checking the scoreboard.dat in nbt-explorer I discovered what the problem is:
In 1.14.x names and structure of the stats-file changed, so the stats must now be accessed with a different name / path.
The scoreboard file seems to be not updated when opening the world, and in still contains the old names, which are now "invalid".
Expected behavior:
When opening a older world in version 1.14.x, the scoreboards should be displayed like before updating the world
Actual behavior:
Scoreboard file is untouched from the update
All "old" stats-names in the scoreboard-file are not "invalid" and they are removed the next time you execute any /scoreboard- command
Result is, that the invalid objective-names are not shown in 1.14 (or higher) version of this world
When you try to add or modify objectives the "old" will be completely removed from the scoreboard.dat what results in loosing your statistics
How to test:
Create or open any world saved before version 1.13
Create any scoreboard objectives and assign displayslot
leave the world and restart game in the latest version (or any other affected version)
open and/or convert the world to this version
check your scoreboard (look at your screen), and you will see nothing, try
/scoreboard objectives list
and all objectives (which are no dummy objectives) will be gone
How to fix:
When opening scoreboard file check if it contains a "DataVersion"
if it does NOT contain this, it is saved before 1.14 and needs update
To Update the files simply walk overall objectives and check for old stat names and replace them to the new syntax of 1.14
e.g. replace
stat.leaveGame
to
minecraft.custom:minecraft.leave_game
stat.mineBlock.minecraft.iron_ore
to
minecraft.mined:minecraft.iron_ore
I tried to use the "optimize world" Option with a backup of my world, the result was the same, Scoreboard file was NOT Updated.
I made another test with the minecraft-server.jar--> same issue, scoreboard is not updated.
Update:
Steps to reproduce in 1.16:
Open or Create a World in any version below 1.16 and run:
/scoreboard objectives add Pigman minecraft.killed:minecraft.zombie_pigman
/scoreboard objectives setdisplay sidebar Pigman
/scoreboard players add @p Pigman 1
You will see the scoreboard for your player on the sidebar
Close game, and open the world in 1.16 (e.g. 1.16.5)
You will see, scoreboard is no longer shown
run/scoreboard players list @s
A message shows "Error while executing the command"
After you leave the world the scoreboard entry will be removed from your scoreboard.dat
The reason is for this error is just simple: when a Item (or Monster) that was used in a scoreboard is renamed in an update (like zombie_pigman and zombified_piglin in 1.16) the scoreboard objective becomes invalid.
Linked issues
Attachments
Comments 7
@unknown
I added more details ro reproduce the issue.
I could reproduce it from
1.12.2 -> 1.16.5
1.15.2 -> 1.16.5
1.12.2 -> 1.17.1
1.12.2
> 1.18rc3
I attached the scoreboard file from 1.12 and my version where I manually renamed the objectives to 1.13.
To make it clear, what the game should to on each world convert:
When any stats are renamed (e.g. because monsters or items are renamed) the game should check the scoreboard if it contains objectives with the names of the stats from the old version and rename them to the name of the new version.
e.g. in when converting 1.12 (or older) -> 1.13 (or newer)
rename objective CriteriaName
stat.mineBlock.minecraft.iron_ore
to
minecraft.mined:minecraft.iron_ore
when converting 1.15 (or older) -> 1.16 (or newer)
rename objective CriteriaName
minecraft.killed:minecraft.zombie_pigman
to
minecraft.killed:minecraft.zombified_piglin
This bug still exists in version 1.14.3