mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-14 07:35:10 +01:00
port: The Copper Age (1.21.9)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package eu.midnightdust.midnightcontrols.fabric.event;
|
||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
||||
import net.fabricmc.fabric.api.client.screen.v1.ScreenMouseEvents;
|
||||
import net.minecraft.client.gui.Click;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
|
||||
import static eu.midnightdust.midnightcontrols.client.MidnightControlsClient.clickInterceptor;
|
||||
@@ -13,9 +14,9 @@ public class MouseClickListener implements ScreenMouseEvents.AllowMouseClick {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowMouseClick(Screen screen, double mouseX, double mouseY, int button) {
|
||||
public boolean allowMouseClick(Screen screen, Click click) {
|
||||
if(MidnightControlsConfig.virtualKeyboard) {
|
||||
clickInterceptor.intercept(screen, mouseX, mouseY);
|
||||
clickInterceptor.intercept(screen, click);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -33,8 +34,4 @@ public class MouseClickListener implements ScreenMouseEvents.AllowMouseClick {
|
||||
public int hashCode() {
|
||||
return screen.hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user