Compare commits

..
1 Commits
Author SHA1 Message Date
Alexdoru 43c4963f3a keybinds (#56)
* unbind keybind by default and put mod name as category

* use isPressed() instead of getIsPressed()
2023-01-27 22:31:25 +01:00
2 changed files with 3 additions and 2 deletions

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