fix items voiding under certain circumstances

This commit is contained in:
PrototypeTrousers
2022-11-22 19:04:42 -03:00
parent bd4f03652e
commit 225a4d5ab6
4 changed files with 15 additions and 3 deletions
@@ -164,7 +164,7 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
if (!is.isEmpty()) {
NBTTagCompound itemTag = new NBTTagCompound();
itemTag.setInteger("Slot", i);
if (is.getCount() > is.getMaxStackSize()) {
if (is.getCount() > Byte.MAX_VALUE) {
itemTag.setInteger("stackSize", stacks.get(i).getCount());
}
stacks.get(i).writeToNBT(itemTag);