Prevent comp drawer from accepting inventory into invalid slots

This commit is contained in:
Justin Aquadro committed 2015-01-29 23:40:04 -05:00
1 parent 0444809afa
commit 166f5efb86
1 file changed
+10 -2
@@ -63,7 +63,11 @@ public class StorageInventory implements IDrawerInventory
if (slot < lowerThresh || slot >= upperThresh)
return false;
IDrawer drawer = group.getDrawer(getDrawerSlot(slot));
int baseSlot = getDrawerSlot(slot);
if (!group.isDrawerEnabled(baseSlot))
return false;
IDrawer drawer = group.getDrawer(baseSlot);
if (drawer == null)
return false;
@@ -80,7 +84,11 @@ public class StorageInventory implements IDrawerInventory
if (slot < lowerThresh || slot >= upperThresh)
return false;
IDrawer drawer = group.getDrawer(getDrawerSlot(slot));
int baseSlot = getDrawerSlot(slot);
if (!group.isDrawerEnabled(baseSlot))
return false;
IDrawer drawer = group.getDrawer(baseSlot);
if (drawer == null)
return false;