Added Space Clicking in AE Inventories.

This commit is contained in:
AlgorithmX2
2014-02-26 21:56:00 -06:00
parent ef729e7365
commit 076ddd548f
3 changed files with 71 additions and 0 deletions
+25
View File
@@ -18,6 +18,7 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@@ -156,6 +157,30 @@ public abstract class AEBaseGui extends GuiContainer
return;
}
if ( Keyboard.isKeyDown( Keyboard.KEY_SPACE ) )
{
IAEItemStack stack = null;
if ( slot instanceof SlotME )
stack = ((SlotME) slot).getAEStack();
PacketInventoryAction p;
try
{
int slotNum = inventorySlots.inventorySlots.size();
if ( !(slot instanceof SlotME) && slot != null )
slotNum = slot.slotNumber;
p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, stack );
NetworkHandler.instance.sendToServer( p );
}
catch (IOException e)
{
AELog.error( e );
}
return;
}
if ( slot instanceof SlotME )
{
InventoryAction action = null;