[1.21.1] value must be non-negative crash
PikachuGabe opened this issue ยท 2 comments
Bug description
Whenever a player dies with an item on them with a negative durability or max durability(unsure which yet) the attempt at creative a grave causes a "value must be non-negative number" exception and thus crash. Easiest way to test is likely using the allthemodium mod and getting an allthemodium pickaxe(as that's what caused a crash on my server)
Could be collecting a grave with a negative damage and max damage item instead of just dying with one as I cannot get on my pc to test.
Minecraft version
1.21.1
Mod version
1.21.1-1.0.23
Mod loader and version
Neoforge 21.1.42
Steps to reproduce
1: Download allthemodium mod(optional)
2: Get an item from allthemodium that has negative damage and max damage, in my case an allthemodium pickaxe, or give yourself an item with negative damage and max damage specified in its nbt
3: Die
4: If that doesnt crash, try collecting the grave.
Expected behavior
The grave generates like normal and can be collected to get all of the items back.
Log files
crash-2024-09-12_20.31.36-server.txt 2024-09-12-1.log
Screenshots
No response
This is not an issue with the gravestone mod. We use the vanilla way of saving items. If the item is invalid it will crash. It doesn't matter if the inventory is a gravestone or something else. Please report this issue to the mod that allows items to have negative durability.