Mojira Archive
MC-269680

Game crashes when trying to save after modifying item stack to have a max_stack_size below its current stack size

When modifying an item stack to have a maximum stack size below its current stack size the game crashes the next time it tries to save.

How to reproduce:

1. Give yourself a stack of stone (/give @s minecraft:stone 64) and select it in your hotbar.
2. Modify the max_stack_size component to 32:
/item modify entity @s weapon {function:set_components, components: {"minecraft:max_stack_size":32}}
3. Notice the chat message: "Can't deliver chat message, check server logs: Replaced a slot on <playername> with [Stone]". The game logs are attached
4. Pause the game to cause it to save.
5. The game crashes. The crash log is attached.

 

Note that when you split up the stack between steps 3 and 4 to be below the new max_stack_size, the crash does not happen and the stacks do have the new max_stack_size.

Fixed

jacobsjo

[Mojang] Gegy

2024-03-20, 11:17 PM

2024-04-08, 07:59 AM

2024-04-08, 07:59 AM

4

1

Confirmed

Very Important

Platform

Commands, Items

24w12a, 24w13a, 24w14a

1.20.5 Pre-Release 1