mojira.dev
MC-268172

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:

  1. Give the player an effect above 127

    /effect give @p minecraft:regeneration infinite 128 true
  2. Pause the game

Expected & Observed Results:

❌ - The game crashes.
✔ - The effect would be saved properly, and the game would not crash.

Screenshots/Videos:

[media]

Notes:

  1. Not exclusive to the player.

  2. Crash log:

[media]

Linked issues

Attachments

Comments 1

Can confirm, I gave myself Resistance 255: https://mclo.gs/AO8V6Un . However, the game crashed after I spawned a lot of entities with command block and tried to kill @e them.

[Mod] Jingy

gegy

Confirmed

Platform

Very Important

Commands, Crash

amplifier, crash, effect

24w05a

24w05b

Retrieved