From c364fa8ccb958c591a2c849d2e7d89951b00a152 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Tue, 25 Mar 2014 14:20:51 -0500 Subject: [PATCH] Support other Encodeables. --- container/implementations/ContainerSecurity.java | 2 +- container/slot/SlotRestrictedInput.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/container/implementations/ContainerSecurity.java b/container/implementations/ContainerSecurity.java index 0d3d0065..3d1b63d5 100644 --- a/container/implementations/ContainerSecurity.java +++ b/container/implementations/ContainerSecurity.java @@ -40,7 +40,7 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE addSlotToContainer( configSlot = new SlotRestrictedInput( PlaceableItemType.BIOMETRIC_CARD, securityBox.configSlot, 0, 37, -33 ) ); - addSlotToContainer( wirelessIn = new SlotRestrictedInput( PlaceableItemType.WIRELESS_TERMINAL, wirelessEncoder, 0, 212, 10 ) ); + addSlotToContainer( wirelessIn = new SlotRestrictedInput( PlaceableItemType.ENCODEABLE_ITEM, wirelessEncoder, 0, 212, 10 ) ); addSlotToContainer( wirelessOut = new SlotOutput( wirelessEncoder, 1, 212, 68, -1 ) ); bindPlayerInventory( ip, 0, 0 ); diff --git a/container/slot/SlotRestrictedInput.java b/container/slot/SlotRestrictedInput.java index 0450103f..84fae5f6 100644 --- a/container/slot/SlotRestrictedInput.java +++ b/container/slot/SlotRestrictedInput.java @@ -11,6 +11,7 @@ import net.minecraftforge.oredict.OreDictionary; import appeng.api.AEApi; import appeng.api.IAppEngApi; import appeng.api.crafting.ICraftingPatternMAC; +import appeng.api.features.INetworkEncodable; import appeng.api.implementations.ICraftingPatternItem; import appeng.api.implementations.items.IBiometricCard; import appeng.api.implementations.items.ISpatialStorageCell; @@ -27,7 +28,7 @@ public class SlotRestrictedInput extends AppEngSlot { STORAGE_CELLS(15), ORE(1 * 16 + 15), STORAGE_COMPONENT(3 * 16 + 15), - WIRELESS_TERMINAL(4 * 16 + 15), TRASH(5 * 16 + 15), VALID_ENCODED_PATTERN_W_OUPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), + ENCODEABLE_ITEM(4 * 16 + 15), TRASH(5 * 16 + 15), VALID_ENCODED_PATTERN_W_OUPUT(7 * 16 + 15), ENCODED_PATTERN_W_OUTPUT(7 * 16 + 15), ENCODED_PATTERN(7 * 16 + 15), BLANK_PATTERN(8 * 16 + 15), POWERED_TOOL(9 * 16 + 15), @@ -187,8 +188,9 @@ public class SlotRestrictedInput extends AppEngSlot if ( i.getItem() instanceof IStorageComponent && ((IStorageComponent) i.getItem()).isStorageComponent( i ) ) return false; return true; - case WIRELESS_TERMINAL: - return AEApi.instance().registries().wireless().isWirelessTerminal( i ); + case ENCODEABLE_ITEM: + return i.getItem() instanceof INetworkEncodable || + AEApi.instance().registries().wireless().isWirelessTerminal( i ); case BIOMETRIC_CARD: return i.getItem() instanceof IBiometricCard; case UPGRADES: