mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Changed some advanced laser relay functionality
This commit is contained in:
parent
44ed2dcda1
commit
a8717e6191
2 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -796,4 +796,4 @@ booklet.actuallyadditions.chapter.spawnerChanger.text.1=The <item>Spawner Change
|
|||
|
||||
booklet.actuallyadditions.chapter.itemStorage.name=Laser Relay Item Storage
|
||||
booklet.actuallyadditions.chapter.itemStorage.text.1=Additionally to the <item>Laser Relays<r> that transfer RF, there are also <item>Item Laser Relays<r> that are able to transfer items. This works in a <imp>verry different way<r> though. <n>To connect <item>Item Laser Relays<r> together works the same as connecting normal ones, however, you need an <item>Item Interface<r> to be able to interact with them. <n>You can place <imp>any inventories<r> (such as chests and furnaces) next to the <item>Item Laser Relays<r>, but to be pulled out from or inputted into, there needs to be an <item>Item Interface<r> connected
|
||||
booklet.actuallyadditions.chapter.itemStorage.text.2=to one of the <item>Item Laser Relay<r>s. To input or output items in the system, just <imp>pipe them into the interface<r>. <n>If you want a way to make a storage system with this, there are also <item>Advanced Item Laser Relays<r>, in which, by <imp>sneak-right-clicking<r> them, you can specify which items are <imp>allowed and disallowed<r> to enter or exit inventories connected to this particular relay. However, its white- and blacklists <imp>won't effect the items transferred by Item Interfaces<r> when placed next to them.
|
||||
booklet.actuallyadditions.chapter.itemStorage.text.2=to one of the <item>Item Laser Relay<r>s. To input or output items in the system, just <imp>pipe them into the interface<r>. <n>If you want a way to make a storage system with this, there are also <item>Advanced Item Laser Relays<r>, in which, by <imp>sneak-right-clicking<r> them, you can specify which items are <imp>allowed and disallowed<r> to enter or exit inventories connected to this particular relay. When placing an advanced relay next to an <item>Item Interface<r>, this effect also applies.
|
Loading…
Reference in a new issue