From fecf067a8ca42c9a4b949db86f1220f7d179a659 Mon Sep 17 00:00:00 2001 From: kirillsaint Date: Fri, 4 Aug 2023 17:37:29 +0600 Subject: [PATCH 1/2] Zoom Mod Fixes --- .../silentclient/client/keybinds/KeyBindManager.java | 10 ++++++++++ .../net/silentclient/client/mods/player/ZoomMod.java | 2 +- .../assets/minecraft/silentclient/configs/BedWars.txt | 2 +- .../minecraft/silentclient/configs/Minigames.txt | 2 +- .../assets/minecraft/silentclient/configs/PvP.txt | 2 +- .../assets/minecraft/silentclient/configs/Survival.txt | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/silentclient/client/keybinds/KeyBindManager.java b/src/main/java/net/silentclient/client/keybinds/KeyBindManager.java index 1df6344..19466ab 100644 --- a/src/main/java/net/silentclient/client/keybinds/KeyBindManager.java +++ b/src/main/java/net/silentclient/client/keybinds/KeyBindManager.java @@ -1,7 +1,9 @@ package net.silentclient.client.keybinds; +import net.minecraft.client.Minecraft; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; +import net.silentclient.client.mixin.SilentClientTweaker; import org.apache.commons.lang3.ArrayUtils; import org.lwjgl.input.Keyboard; @@ -13,6 +15,14 @@ public class KeyBindManager { public KeyBinding ZOOM = new KeyBinding("Silent Client - Zoom", Keyboard.KEY_C, "Silent Client"); public KeyBindManager(GameSettings gameSettings) { + if(SilentClientTweaker.hasOptifine) { + try { + this.unregisterKeybind(gameSettings, (KeyBinding) GameSettings.class.getField("ofKeyBindZoom").get(Minecraft.getMinecraft().gameSettings)); + } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) { + e.printStackTrace(); + } + } + this.registerKeyBind(gameSettings, CLICKGUI); this.registerKeyBind(gameSettings, PERSPECTIVE); this.registerKeyBind(gameSettings, ZOOM); diff --git a/src/main/java/net/silentclient/client/mods/player/ZoomMod.java b/src/main/java/net/silentclient/client/mods/player/ZoomMod.java index ddd663c..694cdf9 100644 --- a/src/main/java/net/silentclient/client/mods/player/ZoomMod.java +++ b/src/main/java/net/silentclient/client/mods/player/ZoomMod.java @@ -12,7 +12,7 @@ import org.lwjgl.input.Keyboard; public class ZoomMod extends Mod { public ZoomMod() { - super("Zoom", ModCategory.MODS, "silentclient/icons/mods/customzoom.png"); + super("Zoom", ModCategory.MODS, "silentclient/icons/mods/customzoom.png", true); } private SimpleAnimation zoomAnimation = new SimpleAnimation(0.0F); diff --git a/src/main/resources/assets/minecraft/silentclient/configs/BedWars.txt b/src/main/resources/assets/minecraft/silentclient/configs/BedWars.txt index f94a820..34121cf 100644 --- a/src/main/resources/assets/minecraft/silentclient/configs/BedWars.txt +++ b/src/main/resources/assets/minecraft/silentclient/configs/BedWars.txt @@ -36,7 +36,7 @@ MOD:Auto Tip:false MOD:Level Head:false MOD:Nick Hider:false MOD:Time Changer:false -MOD:Zoom:false +MOD:Zoom:true MOD:Combo Counter:false POS:Combo Counter:0.0:0.0 MOD:Hit Color:false diff --git a/src/main/resources/assets/minecraft/silentclient/configs/Minigames.txt b/src/main/resources/assets/minecraft/silentclient/configs/Minigames.txt index b21f1bf..8805666 100644 --- a/src/main/resources/assets/minecraft/silentclient/configs/Minigames.txt +++ b/src/main/resources/assets/minecraft/silentclient/configs/Minigames.txt @@ -36,7 +36,7 @@ MOD:Auto Tip:false MOD:Level Head:false MOD:Nick Hider:false MOD:Time Changer:false -MOD:Zoom:false +MOD:Zoom:true MOD:Combo Counter:false POS:Combo Counter:0.0:0.0 MOD:Hit Color:false diff --git a/src/main/resources/assets/minecraft/silentclient/configs/PvP.txt b/src/main/resources/assets/minecraft/silentclient/configs/PvP.txt index 63988d9..2544e64 100644 --- a/src/main/resources/assets/minecraft/silentclient/configs/PvP.txt +++ b/src/main/resources/assets/minecraft/silentclient/configs/PvP.txt @@ -36,7 +36,7 @@ MOD:Auto Tip:false MOD:Level Head:false MOD:Nick Hider:false MOD:Time Changer:false -MOD:Zoom:false +MOD:Zoom:true MOD:Combo Counter:false POS:Combo Counter:0.0:0.0 MOD:Hit Color:false diff --git a/src/main/resources/assets/minecraft/silentclient/configs/Survival.txt b/src/main/resources/assets/minecraft/silentclient/configs/Survival.txt index a0da445..9caf5f7 100644 --- a/src/main/resources/assets/minecraft/silentclient/configs/Survival.txt +++ b/src/main/resources/assets/minecraft/silentclient/configs/Survival.txt @@ -36,7 +36,7 @@ MOD:Auto Tip:false MOD:Level Head:false MOD:Nick Hider:false MOD:Time Changer:false -MOD:Zoom:false +MOD:Zoom:true MOD:Combo Counter:false POS:Combo Counter:0.0:0.0 MOD:Hit Color:false From 850b968e063d27de36db2cb959b765da732dc97b Mon Sep 17 00:00:00 2001 From: kirillsaint Date: Fri, 4 Aug 2023 22:45:51 +0600 Subject: [PATCH 2/2] New Roles --- .../silentclient/client/utils/types/PlayerResponse.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/silentclient/client/utils/types/PlayerResponse.java b/src/main/java/net/silentclient/client/utils/types/PlayerResponse.java index 955dec9..4e4035e 100644 --- a/src/main/java/net/silentclient/client/utils/types/PlayerResponse.java +++ b/src/main/java/net/silentclient/client/utils/types/PlayerResponse.java @@ -57,6 +57,9 @@ public class PlayerResponse extends AbstractReply { public int claimed_premium_cosmetics; public FavoriteCosmetics favorite_cosmetics; public int is_senior_tester; + public int is_senior_tech_support; + public int is_tech_support; + public int is_jr_admin; public int is_tester_manager; public BigInteger discord_id; @@ -206,7 +209,7 @@ public class PlayerResponse extends AbstractReply { } public boolean isStaff() { - return is_staff == 1 || isAdmin() || isDev() || isTester() || isManager() || isSeniorTester() || isTesterManager(); + return is_staff == 1 || isAdmin() || isDev() || isTester() || isManager() || isSeniorTester() || isTesterManager() || is_senior_tech_support == 1 || is_tech_support == 1; } public boolean isSeniorTester() { @@ -222,7 +225,7 @@ public class PlayerResponse extends AbstractReply { } public boolean isAdmin() { - return is_admin == 1; + return is_admin == 1 || is_jr_admin == 1; } public boolean isDev() {