Created
April 21, 2023 15:05
-
-
Save isXander/054670738c2fb2c33a4e587e6fcde2d2 to your computer and use it in GitHub Desktop.
mixin issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void onPress(long window, int button, int action, int modifiers) { | |
boolean bl; | |
if (window != this.minecraft.getWindow().getWindow()) { | |
return; | |
} | |
if (this.minecraft.screen != null) { | |
this.minecraft.setLastInputType(InputType.MOUSE); | |
} | |
boolean bl2 = bl = action == 1; | |
if (Minecraft.ON_OSX && button == 0) { | |
if (bl) { | |
if ((modifiers & 2) == 2) { | |
button = 1; | |
++this.fakeRightMouse; | |
} | |
} else if (this.fakeRightMouse > 0) { | |
button = 1; | |
--this.fakeRightMouse; | |
} | |
} | |
// ... | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BugFix(id = "MC-59810", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, enabled = false, modConflicts = "mcmouser", os = OS.MAC) | |
@Mixin(MouseHandler.class) | |
public class MouseHandlerMixin { | |
@ModifyExpressionValue(method = "onPress", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Minecraft;ON_OSX:Z", opcode = Opcodes.GETFIELD)) | |
private boolean doRightClickEmulation(boolean isMac) { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment