diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemViewer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemViewer.java index d40350b69..92c0f933c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemViewer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemViewer.java @@ -78,7 +78,7 @@ public class TileEntityItemViewer extends TileEntityInventoryBase{ public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction){ SpecificItemHandlerInfo handler = this.getSwitchedIndexHandler(index); if(handler != null){ - if(handler.relayInQuestion.isWhitelisted(stack)){ + if(this.isWhitelisted(handler, stack)){ if(ItemStack.areItemsEqual(handler.handler.getStackInSlot(handler.switchedIndex), stack)){ ItemStack gaveBack = handler.handler.extractItem(handler.switchedIndex, stack.stackSize, true); return gaveBack != null; @@ -88,11 +88,15 @@ public class TileEntityItemViewer extends TileEntityInventoryBase{ return false; } + private boolean isWhitelisted(SpecificItemHandlerInfo handler, ItemStack stack){ + return handler.relayInQuestion.isWhitelisted(stack) && this.getConnectedRelay().isWhitelisted(stack); + } + @Override public boolean isItemValidForSlot(int index, ItemStack stack){ SpecificItemHandlerInfo handler = this.getSwitchedIndexHandler(index); if(handler != null){ - if(handler.relayInQuestion.isWhitelisted(stack)){ + if(this.isWhitelisted(handler, stack)){ ItemStack gaveBack = handler.handler.insertItem(handler.switchedIndex, stack, true); return !ItemStack.areItemStacksEqual(gaveBack, stack); } diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 90df78299..318569e38 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -796,4 +796,4 @@ booklet.actuallyadditions.chapter.spawnerChanger.text.1=The Spawner Change booklet.actuallyadditions.chapter.itemStorage.name=Laser Relay Item Storage booklet.actuallyadditions.chapter.itemStorage.text.1=Additionally to the Laser Relays that transfer RF, there are also Item Laser Relays that are able to transfer items. This works in a verry different way though. To connect Item Laser Relays together works the same as connecting normal ones, however, you need an Item Interface to be able to interact with them. You can place any inventories (such as chests and furnaces) next to the Item Laser Relays, but to be pulled out from or inputted into, there needs to be an Item Interface connected -booklet.actuallyadditions.chapter.itemStorage.text.2=to one of the Item Laser Relays. To input or output items in the system, just pipe them into the interface. If you want a way to make a storage system with this, there are also Advanced Item Laser Relays, in which, by sneak-right-clicking them, you can specify which items are allowed and disallowed to enter or exit inventories connected to this particular relay. However, its white- and blacklists won't effect the items transferred by Item Interfaces when placed next to them. \ No newline at end of file +booklet.actuallyadditions.chapter.itemStorage.text.2=to one of the Item Laser Relays. To input or output items in the system, just pipe them into the interface. If you want a way to make a storage system with this, there are also Advanced Item Laser Relays, in which, by sneak-right-clicking them, you can specify which items are allowed and disallowed to enter or exit inventories connected to this particular relay. When placing an advanced relay next to an Item Interface, this effect also applies. \ No newline at end of file