From 3d078538ca113a0bc9bbfce13ce5d425b3e54b1d Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Tue, 15 Jul 2014 21:20:03 -0500 Subject: [PATCH] Added Feature #0638 - Unable to shiftclick patterns out of interface terminal. --- .../ContainerInterfaceTerminal.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/container/implementations/ContainerInterfaceTerminal.java b/container/implementations/ContainerInterfaceTerminal.java index d74b9ca5..8415c58a 100644 --- a/container/implementations/ContainerInterfaceTerminal.java +++ b/container/implementations/ContainerInterfaceTerminal.java @@ -10,6 +10,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; import appeng.api.networking.IGrid; import appeng.api.networking.IGridNode; import appeng.api.networking.security.IActionHost; @@ -158,6 +159,22 @@ public class ContainerInterfaceTerminal extends AEBaseContainer interfaceSlot.addItems( extra ); } + break; + case SHIFT_CLICK: + + IInventory mySlot = slotInv.getWrapper( slot ); + InventoryAdaptor playerInv = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN ); + mySlot.setInventorySlotContents( 0, playerInv.addItems( mySlot.getStackInSlot( 0 ) ) ); + + break; + case MOVE_REGION: + + InventoryAdaptor playerInvAd = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN ); + for (int x = 0; x < inv.server.getSizeInventory(); x++) + { + inv.server.setInventorySlotContents( x, playerInvAd.addItems( inv.server.getStackInSlot( x ) ) ); + } + break; case CREATIVE_DUPLICATE: