GTNewHorizons / lwjgl3ify

A mod to run Minecraft 1.7.10 using LWJGL3 and Java 17+
GNU Lesser General Public License v3.0
170 stars 37 forks source link

Ping mod doesn't work with LWJGL3ify #182

Open brandyyn opened 1 month ago

brandyyn commented 1 month ago

there’s an issue in some mods, for example the ping mod where you press the button to bring up a radial ping menu in game to ping a block, in Java 8 it stops your camera from moving and you can select the type of ping you want, with lwjgl3ify it moves your entire camera with your mouse on screen and menu open, so you will turn away from the block you’re trying to ping and ping another block or the air etc I was told by the maintainer that they can’t fix it and it’s an issue on lwjgl3ifys side

https://github.com/user-attachments/assets/b4f673cf-4adc-437b-83f2-64fa7b8982f3

happens with both: https://github.com/GirafiStudios/Ping OR https://github.com/GTMEGA/Ping

here's the code for the mod:

public class GuiPingSelect {

public static boolean active = false;

public static long activatedAt = 0;

public static void activate() {
    Minecraft mc = Minecraft.getMinecraft();
    mc.inGameHasFocus = false;
    mc.mouseHelper.ungrabMouseCursor();
    active = true;
    activatedAt = System.nanoTime();
}

public static void deactivate() {
    Minecraft mc = Minecraft.getMinecraft();
    if (mc.currentScreen == null) {
        mc.inGameHasFocus = true;
        mc.mouseHelper.grabMouseCursor();
    }
    active = false;
}