When I used:
/give CucumberCatYT minecraft:tnt 500000000
the game crashed.
How to fix:
in the next update, the /give count shouldn't be able to exceed the players inventory slots.
Linked issues
is duplicated by 1
Comments 13
i probably dont have the same setup as you do so mine crashed at 1 million
probably to do with sending too many item packets to the player, easy limit could be added similar to the /weather [type] [ticks]
What basically happens is that all items that do not fit in the inventory get dropped as in item, and you know, dropping MAX_INT items is not something the game likes at the moment.
Looks like it's a simple fix, you just have to find the max number in the code and turn it down, but i'm not a coder so i don't know for sure. I tried to stop world hunger with mass bread and the game didn't like it, ha.
Maybe items that are thrown on the ground (entities) could stack higher than 64 and are stacked back to 64 when they go into a player's inventory. And the amount added to the player's inventory is simply deducted from the pile of thrown items and when you /give it gives just summons the items as an entity with a tag that sets the number of items it accounts for. E.G: Thrown items could stack to something like 32767 meaning that 100000 tnt could be 4 entities instead of about 1500? Not sure if Mojang will fix this though, as you can just not give yourself thousands of items although this would fix any lag caused by thrown unstackables also, as thrown unstackables could also stack to something like 32767.
The maximum stack for items is 127 because it is 7 bits. I suppose it could be possible for dropped items to exceed this limit?
The feature of having no limit something I like, but mot the crash, I noticed enchantments changed max value from 16bit to 32bit, and that would be great if done to dropped items to, from 8bit to 32bit.
About unstackable items, since /give provides same data to all of them, that could be done to, we already got to have 2147483647 items on a stack, the value on NBT said a negative number, but the game was able to know the value, on single player, with a bundle dupe that has been patched.
Unstackable items can stack, just not with /give (There might be a command, or maybe you need to have inventory editors?) They still can exist ingame once you have a stack of an unstackable item though. Same thing with item stacks to 127. And yeah I'm guessing that more than 127 would make the NBT render it as negative because the last bit is designated to defining the parity and it makes more sense to have 8 bits than 7.
Hi!
I can confirm.