mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 05:31:32 +01:00
FIxed Mouse Buttons issue
This commit is contained in:
parent
cdf1e9bcf7
commit
639c71d5b8
@ -48,7 +48,7 @@ public class KeystrokesMod extends ModDraggable {
|
||||
this.addBooleanSetting("Replace Names With Arrow", this, false);
|
||||
}
|
||||
|
||||
public static enum KeystrokesMode {
|
||||
public enum KeystrokesMode {
|
||||
|
||||
WASD(Key.W, Key.A, Key.S, Key.D),
|
||||
WASD_MOUSE(Key.W, Key.A, Key.S, Key.D, Key.LMB, Key.RMB);
|
||||
@ -57,7 +57,7 @@ public class KeystrokesMod extends ModDraggable {
|
||||
private int width;
|
||||
private int height;
|
||||
|
||||
private KeystrokesMode(Key... keysIn) {
|
||||
KeystrokesMode(Key... keysIn) {
|
||||
this.keys = keysIn;
|
||||
|
||||
for(Key key : keys) {
|
||||
@ -111,14 +111,18 @@ public class KeystrokesMod extends ModDraggable {
|
||||
}
|
||||
|
||||
public boolean isDown() {
|
||||
if(Minecraft.getMinecraft().currentScreen != null) {
|
||||
return false;
|
||||
try {
|
||||
if(Minecraft.getMinecraft().currentScreen != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this == Key.LMB || this == Key.RMB) {
|
||||
return Mouse.isButtonDown(this == Key.LMB ? 0 : 1);
|
||||
}
|
||||
return Keyboard.isKeyDown(keyBind.getKeyCode());
|
||||
} catch (Exception err) {
|
||||
return keyBind.isKeyDown();
|
||||
}
|
||||
|
||||
if(this == Key.LMB || this == Key.RMB) {
|
||||
return Mouse.isButtonDown(this == Key.LMB ? 0 : 1);
|
||||
}
|
||||
return Keyboard.isKeyDown(keyBind.getKeyCode());
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
|
Loading…
Reference in New Issue
Block a user