stacc-api

stacc-api

1.6k Downloads

/clear command only removes 2^32-1 items max at a time

James103 opened this issue ยท 4 comments

commented

Stacc 1.16.1 5
Minecraft 1.16.1

When you use the /clear command, it only removes the first 4,294,967,295 items it comes across in your inventory. To reproduce:

  1. /give @p stone 1000000000 (x5)
  2. /clear
  3. Notice a stack of ~705M stone is left in your inventory.
  4. Notice the result - "Removed 4,294,967,295 items from ..." instead of "Removed 5,000,000,000 items from ..."
commented

Closing, as this is a vanilla issue (even though it is only reproducible with mods).

commented

hmmm, that's the unsigned int max, not the signed one, how the hell

commented

I think this one is outside my control, maybe

commented

yeah I think the int max is baked into either the game or Java 8, you might have to change it to do the long max which is 2^64