Game crashes when saving an entity's effect above 127
The game crashes when an entity with an effect level above 128 is saved. The following error is provided in the launcher afterwards:
The game crashed whilst saving entity nbt Error: java.lang.IllegalStateException: Value 128 outside of range [0:127]
Steps to Reproduce:
- Give the player an effect above 127
/effect give @p minecraft:regeneration infinite 128 true - Pause the game
Expected & Observed Results:
- The game crashes.
- The effect would be saved properly, and the game would not crash.
Screenshots/Videos:
Notes:
- Not exclusive to the player.
- Crash log: deobf_crash-2024-01-31_11.05.26-server.txt

2024-01-31, 05:06 PM
2024-02-01, 06:38 PM
2024-02-01, 12:16 PM
9
4