mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-12 16:37:28 +00:00
Fix controller not starting empty slot when existing slot is full
This commit is contained in:
1 parent
0bebb18c91
commit
2191df7918
1 file changed
+14
-4
@@ -782,8 +782,13 @@ public class TileEntityController extends TileEntity implements IDrawerGroup, IP
|
||||
continue;
|
||||
|
||||
IDrawerInventory candidateInventory = candidateGroup.getDrawerInventory();
|
||||
if (candidateInventory.canInsertItem(candidate.slot, stack))
|
||||
return false;
|
||||
if (candidateInventory.canInsertItem(candidate.slot, stack)) {
|
||||
IDrawer drawer = candidateGroup.getDrawer(candidate.slot);
|
||||
if (drawer instanceof IVoidable && ((IVoidable) drawer).isVoid())
|
||||
return false;
|
||||
if (drawer.getRemainingCapacity() > 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -889,8 +894,13 @@ public class TileEntityController extends TileEntity implements IDrawerGroup, IP
|
||||
continue;
|
||||
|
||||
IDrawerInventory candidateInventory = candidateGroup.getDrawerInventory();
|
||||
if (candidateInventory.isItemValidForSlot(candidate.slot, stack))
|
||||
return false;
|
||||
if (candidateInventory.isItemValidForSlot(candidate.slot, stack)) {
|
||||
IDrawer drawer = candidateGroup.getDrawer(candidate.slot);
|
||||
if (drawer instanceof IVoidable && ((IVoidable) drawer).isVoid())
|
||||
return false;
|
||||
if (drawer.getRemainingCapacity() > 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user