Fix crash when opening GUIs with text fields

This commit is contained in:
tterrag1098 committed 2015-04-05 12:30:15 -04:00
1 parent f95895a38d
commit 0511a0e2a2
3 files changed
+2 -5

No files matched your search

@@ -7,6 +7,7 @@ import net.minecraft.client.gui.GuiTextField;
import com.google.common.base.Strings;
import cpw.mods.fml.relauncher.ReflectionHelper;
import crazypants.gui.IGuiScreen;
public class TextFieldEIO extends GuiTextField {
@@ -45,7 +46,7 @@ public class TextFieldEIO extends GuiTextField {
static {
try {
canLoseFocus = GuiTextField.class.getDeclaredField("canLoseFocus");
canLoseFocus = ReflectionHelper.findField(GuiTextField.class, "canLoseFocus", "field_146212_n", "n");
canLoseFocus.setAccessible(true);
} catch (Exception e) {
throw new RuntimeException(e);
@@ -198,9 +198,6 @@ public class GuiCapBank extends GuiContainerBase {
@Override
protected void keyTyped(char par1, int par2) {
super.keyTyped(par1, par2);
if(par1 == 'e') {
super.keyTyped(par1, 1);
}
updateInputOutput();
}
@@ -34,7 +34,6 @@ import crazypants.enderio.machine.capbank.network.InventoryImpl;
import crazypants.enderio.machine.capbank.network.NetworkUtil;
import crazypants.enderio.machine.capbank.packet.PacketNetworkIdRequest;
import crazypants.enderio.network.PacketHandler;
import crazypants.enderio.power.IInternalPowerHandler;
import crazypants.enderio.power.IInternalPowerReceiver;
import crazypants.enderio.power.IPowerInterface;
import crazypants.enderio.power.IPowerStorage;