From a4444814eb29c8f1587ca37cf25c6c3248be0980 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 8 Feb 2019 11:50:18 +0200 Subject: [PATCH] Use Mojang's code to check if a key is pressed. Fixes #1 --- .../java/com/minelittlepony/unicopia/input/UKeyHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/input/UKeyHandler.java b/src/main/java/com/minelittlepony/unicopia/input/UKeyHandler.java index d5281172..7215f3d8 100644 --- a/src/main/java/com/minelittlepony/unicopia/input/UKeyHandler.java +++ b/src/main/java/com/minelittlepony/unicopia/input/UKeyHandler.java @@ -2,13 +2,12 @@ package com.minelittlepony.unicopia.input; import java.util.ArrayList; -import org.lwjgl.input.Keyboard; - import com.minelittlepony.unicopia.player.IPlayer; import com.minelittlepony.unicopia.player.PlayerSpeciesList; import com.minelittlepony.unicopia.power.PowersRegistry; import net.minecraft.client.Minecraft; +import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; import net.minecraftforge.fml.client.registry.ClientRegistry; @@ -36,7 +35,7 @@ class UKeyHandler implements IKeyHandler { IPlayer iplayer = PlayerSpeciesList.instance().getPlayer(Minecraft.getMinecraft().player); for (KeyBinding i : bindings) { - if (Keyboard.isKeyDown(i.getKeyCode())) { + if (GameSettings.isKeyDown(i)) { if (!pressed.contains(i)) { pressed.add(i);