mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-18 07:53:07 +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 com.mojang.blaze3d.platform.InputConstants;
|
||||
import com.simibubi.create.AllKeys;
|
||||
|
||||
import net.minecraft.client.KeyMapping;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -27,11 +28,12 @@ public class ControlsUtil {
|
|||
}
|
||||
|
||||
public static boolean isActuallyPressed(KeyMapping kb) {
|
||||
return InputConstants.isKeyDown(Minecraft.getInstance()
|
||||
.getWindow()
|
||||
.getWindow(),
|
||||
kb.getKey()
|
||||
.getValue());
|
||||
InputConstants.Key key = kb.getKey();
|
||||
if (key.getType() == InputConstants.Type.MOUSE) {
|
||||
return AllKeys.isMouseButtonDown(key.getValue());
|
||||
} else {
|
||||
return AllKeys.isKeyDown(key.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue