Skip to content

Commit

Permalink
Let AE respect void drawers
Browse files Browse the repository at this point in the history
  • Loading branch information
jaquadro committed May 5, 2015
1 parent 46fea52 commit 61d85d9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import appeng.api.storage.data.IItemList;
import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawer;
import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawerGroup;
import com.jaquadro.minecraft.storagedrawers.storage.IUpgradeProvider;
import net.minecraft.item.ItemStack;

public class DrawerMEInventory implements IMEInventory<IAEItemStack>
Expand Down Expand Up @@ -55,6 +56,9 @@ public IAEItemStack injectItems (IAEItemStack input, Actionable type, BaseAction
}

if (itemsLeft > 0) {
if (group instanceof IUpgradeProvider && ((IUpgradeProvider) group).isVoid())
return null;

IAEItemStack overflow = AEApi.instance().storage().createItemStack(input.getItemStack());
overflow.setStackSize(itemsLeft);
return overflow;
Expand Down

0 comments on commit 61d85d9

Please sign in to comment.