Fix several bugs!

This commit is contained in:
Aidan Brady 2013-11-28 10:13:06 -05:00
parent 98e864cd8d
commit fb3aa53eaf
6 changed files with 29 additions and 2 deletions

View file

@ -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)
{

View file

@ -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();

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);
}
}