Fix drawers writing out invalid capacity when config base capacities set over 127 stacks.

This commit is contained in:
Justin Aquadro committed 2015-05-23 00:32:49 -04:00
1 parent 164b3ec388
commit 23de102e44
1 file changed
+2 -2
@@ -361,7 +361,7 @@ public abstract class TileEntityDrawers extends TileEntity implements IDrawerGro
upgrades = new ItemStack[upgrades.length];
setDirection(tag.getByte("Dir"));
drawerCapacity = tag.getByte("Cap");
drawerCapacity = tag.getInteger("Cap");
if (!tag.hasKey("Upgrades")) {
readLegacyUpgradeNBT(tag);
@@ -418,7 +418,7 @@ public abstract class TileEntityDrawers extends TileEntity implements IDrawerGro
try {
tag.setByte("Dir", (byte) direction);
tag.setByte("Cap", (byte) drawerCapacity);
tag.setInteger("Cap", drawerCapacity);
NBTTagList upgradeList = new NBTTagList();
for (int i = 0; i < upgrades.length; i++) {