mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 23:27:59 +01:00
Use Mojang's code to check if a key is pressed. Fixes #1
This commit is contained in:
parent
c8846b735f
commit
a4444814eb
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue