mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-18 19:29:29 +00:00
keybinds (#56)
* unbind keybind by default and put mod name as category * use isPressed() instead of getIsPressed()
This commit is contained in:
1 parent
2690cd2cd8
commit
43c4963f3a
2 files changed
+3
-2
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package emt.client;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -9,7 +10,7 @@ public class EMTKeys {
|
||||
public static KeyBinding keyUnequip;
|
||||
|
||||
public static void registerKeys() {
|
||||
keyUnequip = new KeyBinding(EMTTextHelper.localize("gui.EMT.key.unequip"), Keyboard.KEY_Z, "EMT");
|
||||
keyUnequip = new KeyBinding(EMTTextHelper.localize("gui.EMT.key.unequip"), Keyboard.KEY_NONE, EMT.NAME);
|
||||
ClientRegistry.registerKeyBinding(keyUnequip);
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class EMTClientEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void clientTick(ClientTickEvent e) {
|
||||
if (EMTKeys.keyUnequip.getIsKeyPressed()) {
|
||||
if (EMTKeys.keyUnequip.isPressed()) {
|
||||
EMT.INSTANCE.sendToServer(new PacketEMTKeys());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user