mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-18 16:02:19 +01:00
Update ControlsUtil.java
This commit is contained in:
parent
0088f4f3f3
commit
1b39fd3241
1 changed files with 7 additions and 5 deletions
|
@ -3,6 +3,7 @@ package com.simibubi.create.foundation.utility;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import com.mojang.blaze3d.platform.InputConstants;
|
import com.mojang.blaze3d.platform.InputConstants;
|
||||||
|
import com.simibubi.create.AllKeys;
|
||||||
|
|
||||||
import net.minecraft.client.KeyMapping;
|
import net.minecraft.client.KeyMapping;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -27,11 +28,12 @@ public class ControlsUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isActuallyPressed(KeyMapping kb) {
|
public static boolean isActuallyPressed(KeyMapping kb) {
|
||||||
return InputConstants.isKeyDown(Minecraft.getInstance()
|
InputConstants.Key key = kb.getKey();
|
||||||
.getWindow()
|
if (key.getType() == InputConstants.Type.MOUSE) {
|
||||||
.getWindow(),
|
return AllKeys.isMouseButtonDown(key.getValue());
|
||||||
kb.getKey()
|
} else {
|
||||||
.getValue());
|
return AllKeys.isKeyDown(key.getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue