When a skeleton in powder snow begins to shake, the StrayConversionTime
starts to count down, and this behavior is correct.
However, if you unload the skeleton and load it back in (eg by re-entering the world), the skeleton no longer is converting, and the StrayConversionTime
is set back to -1.
Steps to Reproduce:
Spawn a skeleton in powdered snow
Wait ~8 seconds
Check the skeleton's conversion timer
→ Note value/data get entity @e[type=minecraft:skeleton,limit=1,sort=nearest] StrayConversionTime
Leave, and re-enter the world
Repeat step 3
→ Note value
Expected & Observed Results:
❌ - The first check for the skeleton's `StrayConversionTime` will be in the hundreds starting from 300 and counting down, when the player leaves the world and rejoins, the value will be reset to `-1` indicating that the timer was not properly saved to NBT.
✔ - The skeleton would properly have it's conversion timer saved to NBT data, allowing the player to leave and rejoin the world.
Notes:
Code analysis can be found in the pinned comment of this issue.
It appears there's another timer that's not written to NBT: the time spent in the powder snow. Because it is not written, the skeleton believes it hasn't been in powder snow for at least 3 seconds, and stops the conversion.
Zombies have their respective timer written to NBT asInWaterTime
.This issue has been updated by @unknown on 3/13/2024 to include more information, but retains all information from the original issue description.
Can confirm. Additionally, here is code analysis snowcasing the fix for this:
As described the data needs to be properly written and read in 'addAdditionalSaveData()' and 'readAdditionalSaveData'