mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-13 08:54:08 +00:00
Merge pull request #183 from Nentify/master
Do not drop drawer contents if the drawer has the creative vending upgrade
This commit is contained in:
commit
d7f6d5d0bb
1 file changed
+11
-9
@@ -465,17 +465,19 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
dropBlockAsItem(world, x, y, z, stack);
|
||||
}
|
||||
|
||||
for (int i = 0; i < tile.getDrawerCount(); i++) {
|
||||
if (!tile.isDrawerEnabled(i))
|
||||
continue;
|
||||
if (!tile.isVending()) {
|
||||
for (int i = 0; i < tile.getDrawerCount(); i++) {
|
||||
if (!tile.isDrawerEnabled(i))
|
||||
continue;
|
||||
|
||||
IDrawer drawer = tile.getDrawer(i);
|
||||
while (drawer.getStoredItemCount() > 0) {
|
||||
ItemStack stack = tile.takeItemsFromSlot(i, drawer.getStoredItemStackSize());
|
||||
if (stack == null || stack.stackSize == 0)
|
||||
break;
|
||||
IDrawer drawer = tile.getDrawer(i);
|
||||
while (drawer.getStoredItemCount() > 0) {
|
||||
ItemStack stack = tile.takeItemsFromSlot(i, drawer.getStoredItemStackSize());
|
||||
if (stack == null || stack.stackSize == 0)
|
||||
break;
|
||||
|
||||
dropStackInBatches(world, x, y, z, stack);
|
||||
dropStackInBatches(world, x, y, z, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user