From feb7d7be95f6188c3c6c604dba8ff54ad3061fba Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Mon, 11 Aug 2014 22:56:33 -0500 Subject: [PATCH] Storage Bus no longer shows items that cannot be extracted. --- me/storage/MEMonitorIInventory.java | 2 +- util/inv/AdaptorIInventory.java | 8 ++++++-- util/inv/ItemSlot.java | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/me/storage/MEMonitorIInventory.java b/me/storage/MEMonitorIInventory.java index e4874111..3ccddb0e 100644 --- a/me/storage/MEMonitorIInventory.java +++ b/me/storage/MEMonitorIInventory.java @@ -165,7 +165,7 @@ public class MEMonitorIInventory implements IMEInventory, IMEMonit for (ItemSlot is : adaptor) { CachedItemStack old = memory.get( is.slot ); - ItemStack newIS = is == null ? null : is.getItemStack(); + ItemStack newIS = is == null || is.isExtractable == false ? null : is.getItemStack(); ItemStack oldIS = old == null ? null : old.itemStack; if ( isDiffrent( newIS, oldIS ) ) diff --git a/util/inv/AdaptorIInventory.java b/util/inv/AdaptorIInventory.java index 90e5b162..d23a20ee 100644 --- a/util/inv/AdaptorIInventory.java +++ b/util/inv/AdaptorIInventory.java @@ -341,8 +341,12 @@ public class AdaptorIInventory extends InventoryAdaptor @Override public ItemSlot next() { - is.slot = x; - is.setItemStack( i.getStackInSlot( x++ ) ); + ItemStack iss = i.getStackInSlot( x ); + + is.isExtractable = canRemoveStackFromSlot( x, iss ); + is.setItemStack( iss ); + + is.slot = x++; return is; } diff --git a/util/inv/ItemSlot.java b/util/inv/ItemSlot.java index dd301edf..ba7604a3 100644 --- a/util/inv/ItemSlot.java +++ b/util/inv/ItemSlot.java @@ -13,6 +13,8 @@ public class ItemSlot private IAEItemStack aeitemstack; private ItemStack itemStack; + public boolean isExtractable; + public void setItemStack(ItemStack is) { aeitemstack = null;