mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-21 12:32:24 +00:00
undoing the "baubles hotkey closes all inventories" change
undoing the "baubles hotkey closes all inventories" change. It was messing with anything that allows text input
This commit is contained in:
1 parent
4b782a9e99
commit
6b72c66f0a
5 files changed
+21
-23
No files matched your search
@@ -137,5 +137,16 @@ public class GuiPlayerExpanded extends InventoryEffectRenderer {
|
||||
this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char par1, int par2) {
|
||||
if (par2 == Baubles.proxy.keyHandler.key.getKeyCode())
|
||||
{
|
||||
this.mc.thePlayer.closeScreen();
|
||||
} else
|
||||
super.keyTyped(par1, par2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -20,13 +20,13 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
|
||||
@Mod(modid = Baubles.MODID, name = Baubles.MODNAME, version = Baubles.VERSION, dependencies="required-after:Forge@[10.12.0.1034,);")
|
||||
@Mod(modid = Baubles.MODID, name = Baubles.MODNAME, version = Baubles.VERSION, dependencies="required-after:Forge@[10.12.0.1046,);")
|
||||
|
||||
public class Baubles {
|
||||
|
||||
public static final String MODID = "Baubles";
|
||||
public static final String MODNAME = "Baubles";
|
||||
public static final String VERSION = "1.0.0.8";
|
||||
public static final String VERSION = "1.0.0.9";
|
||||
|
||||
@SidedProxy(clientSide = "baubles.client.ClientProxy", serverSide = "baubles.common.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package baubles.common.event;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -25,29 +22,16 @@ public class KeyHandler {
|
||||
public KeyHandler() {
|
||||
ClientRegistry.registerKeyBinding(key);
|
||||
}
|
||||
|
||||
boolean keyDown = false;
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void playerTick(PlayerTickEvent event) {
|
||||
if (event.side == Side.SERVER) return;
|
||||
if (event.phase == Phase.START ) {
|
||||
if (GameSettings.isKeyDown(key))
|
||||
{
|
||||
if (!keyDown) {
|
||||
if (FMLClientHandler.instance().getClient().inGameHasFocus) {
|
||||
Baubles.packetPipeline.sendToServer(new PacketOpenBaublesInventory(event.player));
|
||||
} else
|
||||
if (Minecraft.getMinecraft().currentScreen!=null &&
|
||||
Minecraft.getMinecraft().currentScreen instanceof GuiContainer){
|
||||
Minecraft.getMinecraft().thePlayer.closeScreen();
|
||||
}
|
||||
}
|
||||
keyDown = true;
|
||||
} else {
|
||||
keyDown = false;
|
||||
}
|
||||
if (key.getIsKeyPressed() && FMLClientHandler.instance().getClient().inGameHasFocus) {
|
||||
Baubles.packetPipeline.sendToServer(new PacketOpenBaublesInventory(event.player));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user