11package nekiplay .meteorplus .mixin .meteorclient .modules ;
22
33
4- import meteordevelopment .meteorclient .events .meteor .MouseButtonEvent ;
4+ import meteordevelopment .meteorclient .events .meteor .MouseClickEvent ;
55import meteordevelopment .meteorclient .settings .BoolSetting ;
66import meteordevelopment .meteorclient .settings .Setting ;
77import meteordevelopment .meteorclient .settings .SettingGroup ;
1616import org .spongepowered .asm .mixin .injection .At ;
1717import org .spongepowered .asm .mixin .injection .Inject ;
1818import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
19+ import net .minecraft .client .gui .Click ;
20+ import net .minecraft .client .input .MouseInput ;
1921
2022import static meteordevelopment .meteorclient .MeteorClient .mc ;
2123import static nekiplay .meteorplus .MeteorPlusAddon .HUD_TITLE ;
@@ -40,10 +42,10 @@ public MiddleClickExtraMixin() {
4042 .build ()
4143 );
4244
43- @ Inject (method = "onMouseButton " , at = @ At ("HEAD" ), cancellable = true )
44- private void onMouseButton ( MouseButtonEvent event , CallbackInfo ci ) {
45- if (event .action == KeyAction .Press && event .button == 2 && mc .currentScreen == null ) {
46- if (event .action != KeyAction .Press || event .button != GLFW_MOUSE_BUTTON_MIDDLE ) return ;
45+ @ Inject (method = "onMouseClick " , at = @ At ("HEAD" ), cancellable = true )
46+ private void onMouseClick ( MouseClickEvent event , CallbackInfo ci ) {
47+ if (event .action == KeyAction .Press && event .button () == 2 && mc .currentScreen == null ) {
48+ if (event .action != KeyAction .Press || event .button () != 2 ) return ;
4749 if (noInventory .get () && mc .currentScreen != null ) {
4850 ci .cancel ();
4951 }
0 commit comments