Mojira Archive
MC-275874

Pasting this specific command in the command block crashes the game

Pasting the following command in a command block crashes the game:

give @p minecraft:bundle[minecraft:bundle_contents=[{count:99,id:"minecraft:bundle",components:{"minecraft:bundle_contents":[{count:99,id:"minecraft:bundle",components:{"minecraft:bundle_contents":[{count:99,id:"minecraft:bundle",components:{"minecraft:bundle_contents":[{count:99,id:"minecraft:bundle",components:{"minecraft:bundle_contents":[{count:99,id:"minecraft:stone"}]}}]}}]}}]}}]]

This simply gives the player a bundle containing 99 bundles that contain 99 bundles that contain 99 bundles that contain 99 bundles of 99 stones. This command is expected to me to not work, as the bundles in the previous versions which show the number of items even when exceeding 64, intended or not, seem to show a number which is at least the number of total stones in the bundle instead of 99 that is just the number of items in it, as it was also the case when I did the same recursion for fewer depths; therefore, the bundle should show there are at least 99^5 items in the bundle, which exceeds the maximum integer limit. I haven't take a look into the source code myself yet, but maybe it still stores the value in a variable which it showed previously, and only shows that the bundle is full when that variable's value is not smaller than 64. Interestingly, a command block with the following command being set can be placed, as I also did with the following command, and I could even power the command block being placed without crashing the game, but could not get a bundle as expected:

setblock ~ ~1 ~ minecraft:command_block{Command:"give @p minecraft:bundle[minecraft:bundle_contents=[{count:99,id:\"minecraft:bundle\",components:{\"minecraft:bundle_contents\":[{count:99,id:\"minecraft:bundle\",components:{\"minecraft:bundle_contents\":[{count:99,id:\"minecraft:bundle\",components:{\"minecraft:bundle_contents\":[{count:99,id:\"minecraft:bundle\",components:{\"minecraft:bundle_contents\":[{count:99,id:\"minecraft:stone\"}]}}]}}]}}]}}]]"}

When opening the setblock-ed command block and pressing "Cancel", I get "Network Protocol Error"; however when I move the cursor before doing so, the game crashes. Nevertheless, I couldn't crash my server, even if the bug is server-side in some way.

Fixed

Arian

[Mojang] slicedlime

2024-08-22, 02:20 PM

2024-12-14, 05:44 PM

2024-10-10, 02:26 PM

2

1

Confirmed

Very Important

Platform

Commands, Crash

bundle

1.21.1, 24w34a

1.21.2 Pre-Release 3