Possible bug with insertNewCustomItem(itemname, 0, quantity);

A small new update is available now!
  • Hi @red51


    It looks like if I create a custom item with a stack size larger than 64 (in my case 100 - I use them for coin stacks) whenever you add items to a players inventory it will only add maximum 64 items even if the value of quantity is higher.


    Code
    inventory.insertNewCustomItem(itemname, 0, quantity);
  • Sorry for the late response! I'll check out what's going on there :)


    About the stack sizes: Unfortunately we cannot use larger stacks atm, since the "stack" variable is stored as a signed byte, so the biggest possible value is 127 (and we capped stacks at 64)... changing this would require us to update all chests and inventories in existing worlds, and since there is always a chance that this goes wrong, we try to avoid that :D Although we could increase the max stack size to 100 at least.

  • I heard somewhere that in the future planks and beams etc. will cost higher mats for bigger beams etc. maybe it makes sense to set stacksize to a double value. That way we could have stone/wood in m³ where 1m³ would be 1 current stone maybe. And for example counting leather in m² or stuff in gram makes sense for weighted inventory in a hardcore survival world :D

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!