Update GameSettingsMixin.java

This commit is contained in:
kirillsaint 2023-09-06 22:56:58 +06:00
parent bc4cad3df1
commit 4a903509a8

View File

@ -7,6 +7,7 @@ import net.minecraft.client.settings.KeyBinding;
import net.silentclient.client.Client;
import net.silentclient.client.keybinds.KeyBindManager;
import net.silentclient.client.mixin.ducks.GameSettingsExt;
import net.silentclient.client.mods.player.ZoomMod;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.spongepowered.asm.mixin.Mixin;
@ -52,7 +53,7 @@ public class GameSettingsMixin implements GameSettingsExt {
*/
@Overwrite
public static boolean isKeyDown(KeyBinding key) {
if(key.getKeyDescription().equalsIgnoreCase("of.key.zoom") && Client.getInstance().getModInstances().getZoomMod().isActive()) {
if(Client.getInstance().getModInstances().getZoomMod().isEnabled() && key.getKeyDescription().equalsIgnoreCase("of.key.zoom") && key.getKeyCode() == Client.getInstance().getSettingsManager().getSettingByClass(ZoomMod.class, "Keybind").getKeybind()) {
return false;
}
int keyCode = key.getKeyCode();