From fb3aa53eaf88d3cde56ee771fce1994f27b32d07 Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Thu, 28 Nov 2013 10:13:06 -0500 Subject: [PATCH] Fix several bugs! --- common/mekanism/client/gui/GuiConfiguration.java | 6 ++++++ common/mekanism/client/gui/GuiLogisticalSorter.java | 6 ++++++ common/mekanism/client/gui/GuiTItemStackFilter.java | 5 +++++ common/mekanism/client/gui/GuiTOreDictFilter.java | 5 +++++ .../mekanism/common/network/PacketConfigurationUpdate.java | 5 +++++ .../common/tileentity/TileEntityElectrolyticSeparator.java | 4 ++-- 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/common/mekanism/client/gui/GuiConfiguration.java b/common/mekanism/client/gui/GuiConfiguration.java index cff9c6f96..5c28a91a5 100644 --- a/common/mekanism/client/gui/GuiConfiguration.java +++ b/common/mekanism/client/gui/GuiConfiguration.java @@ -22,6 +22,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; +import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; @@ -266,6 +267,11 @@ public class GuiConfiguration extends GuiMekanism PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.STRICT_INPUT, Object3D.get(tile))); } } + + if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && button == 0) + { + button = 2; + } if(xAxis >= 80 && xAxis <= 96 && yAxis >= 49 && yAxis <= 65) { diff --git a/common/mekanism/client/gui/GuiLogisticalSorter.java b/common/mekanism/client/gui/GuiLogisticalSorter.java index 4167fb3e9..5079a5d43 100644 --- a/common/mekanism/client/gui/GuiLogisticalSorter.java +++ b/common/mekanism/client/gui/GuiLogisticalSorter.java @@ -26,6 +26,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; @@ -191,6 +192,11 @@ public class GuiLogisticalSorter extends GuiMekanism } } + if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && button == 0) + { + button = 2; + } + if(xAxis >= 13 && xAxis <= 29 && yAxis >= 137 && yAxis <= 153) { ArrayList data = new ArrayList(); diff --git a/common/mekanism/client/gui/GuiTItemStackFilter.java b/common/mekanism/client/gui/GuiTItemStackFilter.java index ae6f9f213..ff2f1f5d1 100644 --- a/common/mekanism/client/gui/GuiTItemStackFilter.java +++ b/common/mekanism/client/gui/GuiTItemStackFilter.java @@ -320,6 +320,11 @@ public class GuiTItemStackFilter extends GuiMekanism } } + if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && button == 0) + { + button = 2; + } + if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) { mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F); diff --git a/common/mekanism/client/gui/GuiTOreDictFilter.java b/common/mekanism/client/gui/GuiTOreDictFilter.java index cf4f9d575..0cd74eb23 100644 --- a/common/mekanism/client/gui/GuiTOreDictFilter.java +++ b/common/mekanism/client/gui/GuiTOreDictFilter.java @@ -297,6 +297,11 @@ public class GuiTOreDictFilter extends GuiMekanism } } + if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && button == 0) + { + button = 2; + } + if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) { mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F); diff --git a/common/mekanism/common/network/PacketConfigurationUpdate.java b/common/mekanism/common/network/PacketConfigurationUpdate.java index ed534d6da..f1dc18fdb 100644 --- a/common/mekanism/common/network/PacketConfigurationUpdate.java +++ b/common/mekanism/common/network/PacketConfigurationUpdate.java @@ -160,6 +160,11 @@ public class PacketConfigurationUpdate implements IMekanismPacket dataStream.writeInt(object3D.dimensionId); + if(packetType != ConfigurationPacket.EJECT && packetType != ConfigurationPacket.STRICT_INPUT) + { + dataStream.writeInt(clickType); + } + if(packetType == ConfigurationPacket.SIDE_DATA) { dataStream.writeInt(configIndex); diff --git a/common/mekanism/generators/common/tileentity/TileEntityElectrolyticSeparator.java b/common/mekanism/generators/common/tileentity/TileEntityElectrolyticSeparator.java index 283c19f09..f1f756121 100644 --- a/common/mekanism/generators/common/tileentity/TileEntityElectrolyticSeparator.java +++ b/common/mekanism/generators/common/tileentity/TileEntityElectrolyticSeparator.java @@ -111,13 +111,13 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp { if(inventory[1] != null && hydrogenStored > 0) { - hydrogenStored -= GasUtils.addGas(inventory[0], new GasStack(GasRegistry.getGas("hydrogen"), hydrogenStored)); + hydrogenStored -= GasUtils.addGas(inventory[1], new GasStack(GasRegistry.getGas("hydrogen"), hydrogenStored)); MekanismUtils.saveChunk(this); } if(inventory[2] != null && oxygenStored > 0) { - hydrogenStored -= GasUtils.addGas(inventory[0], new GasStack(GasRegistry.getGas("oxygen"), oxygenStored)); + hydrogenStored -= GasUtils.addGas(inventory[2], new GasStack(GasRegistry.getGas("oxygen"), oxygenStored)); MekanismUtils.saveChunk(this); } }