keybinds (#56)

* unbind keybind by default and put mod name as category

* use isPressed() instead of getIsPressed()
This commit is contained in:
Alexdoru authored and GitHub committed 2023-01-27 22:31:25 +01:00
1 parent 2690cd2cd8
commit 43c4963f3a
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -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());
}
}