Merge pull request #84 from Silent-Client/PREMIUM2

Premium2
This commit is contained in:
kirillsaint 2023-12-31 21:35:14 +06:00 committed by GitHub
commit 46a8dcd93b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 289 additions and 40 deletions

View File

@ -4,11 +4,8 @@
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="delegatedBuild" value="true" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" /> <option name="gradleJvm" value="zulu-1.8 (4)" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" /> <file type="web" url="file://$PROJECT_DIR$" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="zulu-1.8 (3)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

View File

@ -36,6 +36,7 @@ import net.silentclient.client.mods.util.Server;
import net.silentclient.client.mods.util.Utils; import net.silentclient.client.mods.util.Utils;
import net.silentclient.client.premium.PremiumCosmeticsGui; import net.silentclient.client.premium.PremiumCosmeticsGui;
import net.silentclient.client.premium.PremiumUtils; import net.silentclient.client.premium.PremiumUtils;
import net.silentclient.client.skillissue.SkillIssue;
import net.silentclient.client.utils.*; import net.silentclient.client.utils.*;
import net.silentclient.client.utils.animations.AnimationHandler; import net.silentclient.client.utils.animations.AnimationHandler;
import net.silentclient.client.utils.animations.SneakHandler; import net.silentclient.client.utils.animations.SneakHandler;
@ -97,6 +98,7 @@ public class Client {
private AccountManager accountManager; private AccountManager accountManager;
public ServerData lastServerData; public ServerData lastServerData;
public TextUtils textUtils; public TextUtils textUtils;
private SkillIssue skillIssue;
public static void memoryDebug(String paramString) { public static void memoryDebug(String paramString) {
LogManager.getLogger().info("-- Start Memory Debug -- " + paramString); LogManager.getLogger().info("-- Start Memory Debug -- " + paramString);
@ -235,6 +237,7 @@ public class Client {
} }
globalSettings.configsMigrated = true; globalSettings.configsMigrated = true;
globalSettings.save(); globalSettings.save();
new File(Minecraft.getMinecraft().mcDataDir, "SilentClient").delete();
} }
logger.info("STARTING > config-manager"); logger.info("STARTING > config-manager");
configManager = new ConfigManager(); configManager = new ConfigManager();
@ -351,6 +354,9 @@ public class Client {
} }
Client.logger.info("STARTING > text-utils"); Client.logger.info("STARTING > text-utils");
this.textUtils = new TextUtils(Minecraft.getMinecraft().fontRendererObj); this.textUtils = new TextUtils(Minecraft.getMinecraft().fontRendererObj);
logger.info("STARTING > skillissue");
this.skillIssue = new SkillIssue();
logger.info("-------------------------------------------------"); logger.info("-------------------------------------------------");
memoryDebug("CLIENT_POST_INIT"); memoryDebug("CLIENT_POST_INIT");
} }

View File

@ -1,7 +1,10 @@
package net.silentclient.client.cosmetics; package net.silentclient.client.cosmetics;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.silentclient.client.Client; import net.silentclient.client.Client;
import net.silentclient.client.mixin.ducks.AbstractClientPlayerExt;
import net.silentclient.client.utils.Players;
import net.silentclient.client.utils.Requests; import net.silentclient.client.utils.Requests;
import java.io.*; import java.io.*;
@ -68,6 +71,10 @@ public class Outfits {
Client.logger.info("Loading Outfit: " + outfit.name); Client.logger.info("Loading Outfit: " + outfit.name);
Requests.post("https://api.silentclient.net/account/load_outfit", Client.getInstance().getGson().toJson(outfit)); Requests.post("https://api.silentclient.net/account/load_outfit", Client.getInstance().getGson().toJson(outfit));
Client.getInstance().updateUserInformation(); Client.getInstance().updateUserInformation();
Players.reload();
if(Minecraft.getMinecraft().thePlayer != null) {
Players.getPlayerStatus(false, ((AbstractClientPlayerExt) Minecraft.getMinecraft().thePlayer).silent$getNameClear(), EntityPlayer.getUUID(Minecraft.getMinecraft().thePlayer.getGameProfile()), Minecraft.getMinecraft().thePlayer);
}
} }
public static ArrayList<Outfit> getOutfits() { public static ArrayList<Outfit> getOutfits() {

View File

@ -122,7 +122,7 @@ public class SilentResourcePacksGui extends SilentScreen {
scrollHelper.setStep(5); scrollHelper.setStep(5);
scrollHelper.setElementsHeight(availableResourcePacks.size() * 37 + 19); scrollHelper.setElementsHeight(availableResourcePacks.size() * 37 + 19);
scrollHelper.setMaxScroll(blockHeight - 45); scrollHelper.setMaxScroll(blockHeight - 45);
scrollHelper.setSpeed(100); scrollHelper.setSpeed(150);
if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) { if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) {
scrollHelper.setFlag(true); scrollHelper.setFlag(true);
@ -177,6 +177,9 @@ public class SilentResourcePacksGui extends SilentScreen {
private void availableResourcePacksClick(float x, float y, int mouseX, int mouseY) { private void availableResourcePacksClick(float x, float y, int mouseX, int mouseY) {
float itemY = y + 19 + scrollHelper.getScroll(); float itemY = y + 19 + scrollHelper.getScroll();
if(!GuiUtils.blockInOtherBlock(mouseX, mouseY, 2, 2, x, y, 193, blockHeight - 45)) {
return;
}
for(ResourcePackRepository.Entry entry : availableResourcePacks) { for(ResourcePackRepository.Entry entry : availableResourcePacks) {
if((!this.silentInputs.get(0).getValue().trim().equals("") && !entry.getResourcePackName().toLowerCase().contains(this.silentInputs.get(0).getValue().trim().toLowerCase()))) { if((!this.silentInputs.get(0).getValue().trim().equals("") && !entry.getResourcePackName().toLowerCase().contains(this.silentInputs.get(0).getValue().trim().toLowerCase()))) {
@ -201,7 +204,7 @@ public class SilentResourcePacksGui extends SilentScreen {
scrollHelper2.setStep(5); scrollHelper2.setStep(5);
scrollHelper2.setElementsHeight(selectedResourcePacks.size() * 37 + 19); scrollHelper2.setElementsHeight(selectedResourcePacks.size() * 37 + 19);
scrollHelper2.setMaxScroll(blockHeight - 45); scrollHelper2.setMaxScroll(blockHeight - 45);
scrollHelper2.setSpeed(100); scrollHelper2.setSpeed(150);
if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) { if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) {
scrollHelper2.setFlag(true); scrollHelper2.setFlag(true);
} else { } else {
@ -262,6 +265,10 @@ public class SilentResourcePacksGui extends SilentScreen {
float itemY = y + 19 + scrollHelper2.getScroll(); float itemY = y + 19 + scrollHelper2.getScroll();
int packIndex = 0; int packIndex = 0;
if(!GuiUtils.blockInOtherBlock(mouseX, mouseY, 2, 2, x, y, 193, blockHeight - 45)) {
return;
}
for(ResourcePackRepository.Entry entry : selectedResourcePacks) { for(ResourcePackRepository.Entry entry : selectedResourcePacks) {
if(GuiUtils.blockInOtherBlock(x + 3, itemY, 187, 35, x, y, 193, blockHeight - 45)) { if(GuiUtils.blockInOtherBlock(x + 3, itemY, 187, 35, x, y, 193, blockHeight - 45)) {
int i = entry.func_183027_f(); int i = entry.func_183027_f();

View File

@ -3,7 +3,6 @@ package net.silentclient.client.mixin.mixins;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
import net.silentclient.client.Client; import net.silentclient.client.Client;
import net.silentclient.client.cosmetics.StaticResourceLocation; import net.silentclient.client.cosmetics.StaticResourceLocation;
import net.silentclient.client.gui.hud.Watermark; import net.silentclient.client.gui.hud.Watermark;
@ -61,7 +60,7 @@ public abstract class GuiContainerMixin extends GuiScreen {
@Inject(method = "mouseClicked", at = @At("TAIL")) @Inject(method = "mouseClicked", at = @At("TAIL"))
private void silent$checkHotbarClicks(int mouseX, int mouseY, int mouseButton, CallbackInfo ci) { private void silent$checkHotbarClicks(int mouseX, int mouseY, int mouseButton, CallbackInfo ci) {
checkHotbarKeys(mouseButton - 100); // checkHotbarKeys(mouseButton - 100);
} }
@Redirect(method = "drawScreen", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/inventory/GuiContainer;drawDefaultBackground()V")) @Redirect(method = "drawScreen", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/inventory/GuiContainer;drawDefaultBackground()V"))

View File

@ -3,6 +3,7 @@ package net.silentclient.client.mods;
import net.silentclient.client.Client; import net.silentclient.client.Client;
import net.silentclient.client.gui.hud.ScreenPosition; import net.silentclient.client.gui.hud.ScreenPosition;
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils; import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
import net.silentclient.client.gui.util.RenderUtil;
import java.awt.*; import java.awt.*;
@ -33,6 +34,7 @@ public class HudMod extends ModDraggable {
this.addBooleanSetting("Font Shadow", this, true); this.addBooleanSetting("Font Shadow", this, true);
this.addBooleanSetting("Brackets", this, false); this.addBooleanSetting("Brackets", this, false);
this.addBooleanSetting("Fancy Font", this, false); this.addBooleanSetting("Fancy Font", this, false);
this.addBooleanSetting("Rounded Corners", this, false);
} }
public String getText() { public String getText() {
@ -100,13 +102,18 @@ public class HudMod extends ModDraggable {
font.setRenderMode(fancyFont ? CustomFontRenderer.RenderMode.CUSTOM : CustomFontRenderer.RenderMode.DEFAULT); font.setRenderMode(fancyFont ? CustomFontRenderer.RenderMode.CUSTOM : CustomFontRenderer.RenderMode.DEFAULT);
boolean background = Client.getInstance().getSettingsManager().getSettingByName(this, "Background").getValBoolean(); boolean background = Client.getInstance().getSettingsManager().getSettingByName(this, "Background").getValBoolean();
boolean roundedCorners = Client.getInstance().getSettingsManager().getSettingByName(this, "Rounded Corners").getValBoolean();
Color backgroundColor = Client.getInstance().getSettingsManager().getSettingByName(this, "Background Color").getValColor(); Color backgroundColor = Client.getInstance().getSettingsManager().getSettingByName(this, "Background Color").getValColor();
boolean fontShadow = Client.getInstance().getSettingsManager().getSettingByName(this, "Font Shadow").getValBoolean(); boolean fontShadow = Client.getInstance().getSettingsManager().getSettingByName(this, "Font Shadow").getValBoolean();
boolean brackets = Client.getInstance().getSettingsManager().getSettingByName(this, "Brackets").getValBoolean(); boolean brackets = Client.getInstance().getSettingsManager().getSettingByName(this, "Brackets").getValBoolean();
Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "Color").getValColor(); Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "Color").getValColor();
preRender(); preRender();
if(background) { if(background) {
RenderUtils.drawRect(getX(), getY(), this.getRealWidth(), this.getHeight(), backgroundColor.getRGB()); if(roundedCorners) {
RenderUtil.drawRoundedRect(getX(), getY(), this.getRealWidth(), this.getHeight(), 6, backgroundColor.getRGB());
} else {
RenderUtils.drawRect(getX(), getY(), this.getRealWidth(), this.getHeight(), backgroundColor.getRGB());
}
} }
if(!background) { if(!background) {

View File

@ -17,10 +17,7 @@ import net.silentclient.client.mods.staff.DebugNpcMod;
import net.silentclient.client.mods.staff.FPSSpoofer; import net.silentclient.client.mods.staff.FPSSpoofer;
import net.silentclient.client.mods.staff.HitDelayFixMod; import net.silentclient.client.mods.staff.HitDelayFixMod;
import net.silentclient.client.mods.staff.TestMod; import net.silentclient.client.mods.staff.TestMod;
import net.silentclient.client.mods.world.FullBrightMod; import net.silentclient.client.mods.world.*;
import net.silentclient.client.mods.world.PlayerCounterMod;
import net.silentclient.client.mods.world.TimeChangerMod;
import net.silentclient.client.mods.world.WeatherChangerMod;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -184,8 +181,12 @@ public class ModInstances {
mods.add(new FPSSpoofer()); mods.add(new FPSSpoofer());
} }
mods.add(new NewMotionBlurMod()); mods.add(new NewMotionBlurMod());
mods.add(new DonationsAlertsMod()); if(Client.getInstance().getAccount().getUsername().equalsIgnoreCase("fushka")) {
mods.add(new DonationsAlertsMod());
}
mods.add(new QuickPlayMod()); mods.add(new QuickPlayMod());
mods.add(new SoundsMod());
// mods.add(new ItemSizeMod());
} }
public void postInit() { public void postInit() {

View File

@ -10,6 +10,7 @@ import net.silentclient.client.gui.font.SilentFontRenderer;
import net.silentclient.client.gui.hud.ScreenPosition; import net.silentclient.client.gui.hud.ScreenPosition;
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils; import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils; import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
import net.silentclient.client.gui.util.RenderUtil;
import net.silentclient.client.mods.CustomFontRenderer; import net.silentclient.client.mods.CustomFontRenderer;
import net.silentclient.client.mods.ModCategory; import net.silentclient.client.mods.ModCategory;
import net.silentclient.client.mods.ModDraggable; import net.silentclient.client.mods.ModDraggable;
@ -29,7 +30,6 @@ public class KeystrokesMod extends ModDraggable {
@Override @Override
public void setup() { public void setup() {
this.addSliderSetting("Scale", this, 2.20F, 1.0F, 5.0F, false); this.addSliderSetting("Scale", this, 2.20F, 1.0F, 5.0F, false);
setUpdated(true);
ArrayList<String> cpsModes = new ArrayList<>(); ArrayList<String> cpsModes = new ArrayList<>();
cpsModes.add("None"); cpsModes.add("None");
cpsModes.add("Small"); cpsModes.add("Small");
@ -37,6 +37,7 @@ public class KeystrokesMod extends ModDraggable {
this.addBooleanSetting("Font Shadow", this, true); this.addBooleanSetting("Font Shadow", this, true);
this.addBooleanSetting("Fancy Font", this, false); this.addBooleanSetting("Fancy Font", this, false);
this.addBooleanSetting("Background", this, true); this.addBooleanSetting("Background", this, true);
this.addBooleanSetting("Rounded Corners", this, false);
this.addModeSetting("CPS Mode", this, "Small", cpsModes); this.addModeSetting("CPS Mode", this, "Small", cpsModes);
this.addColorSetting("Color", this, new Color(255, 255, 255)); this.addColorSetting("Color", this, new Color(255, 255, 255));
this.addColorSetting("Background Color", this, new Color(0, 0, 0), 127); this.addColorSetting("Background Color", this, new Color(0, 0, 0), 127);
@ -182,7 +183,8 @@ public class KeystrokesMod extends ModDraggable {
Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "Color").getValColor(); Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "Color").getValColor();
Color clickedColor = Client.getInstance().getSettingsManager().getSettingByName(this, "Clicked Color").getValColor(); Color clickedColor = Client.getInstance().getSettingsManager().getSettingByName(this, "Clicked Color").getValColor();
int fadeDelay = Client.getInstance().getSettingsManager().getSettingByName(this, "Fade Delay").getValInt() != 0 ? 100000 / Client.getInstance().getSettingsManager().getSettingByName(this, "Fade Delay").getValInt() : 0; int fadeDelay = Client.getInstance().getSettingsManager().getSettingByName(this, "Fade Delay").getValInt() != 0 ? 100000 / Client.getInstance().getSettingsManager().getSettingByName(this, "Fade Delay").getValInt() : 0;
boolean roundedCorners = Client.getInstance().getSettingsManager().getSettingByName(this, "Rounded Corners").getValBoolean();
for(Key key : mode.getKeys()) { for(Key key : mode.getKeys()) {
String renderString = key.getName(); String renderString = key.getName();
@ -202,13 +204,24 @@ public class KeystrokesMod extends ModDraggable {
setAnimation(key.green, key.isDown() ? clickedBackgroundColor.getGreen() : backgroundColor.getGreen(), fadeDelay); setAnimation(key.green, key.isDown() ? clickedBackgroundColor.getGreen() : backgroundColor.getGreen(), fadeDelay);
setAnimation(key.blue, key.isDown() ? clickedBackgroundColor.getBlue() : backgroundColor.getBlue(), fadeDelay); setAnimation(key.blue, key.isDown() ? clickedBackgroundColor.getBlue() : backgroundColor.getBlue(), fadeDelay);
setAnimation(key.alpha, key.isDown() ? clickedBackgroundColor.getAlpha() : backgroundColor.getAlpha(), fadeDelay); setAnimation(key.alpha, key.isDown() ? clickedBackgroundColor.getAlpha() : backgroundColor.getAlpha(), fadeDelay);
RenderUtils.drawRect( if(roundedCorners) {
0 + key.getX(), RenderUtil.drawRoundedRect(
0 + key.getY(), key.getX(),
key.getWidth(), key.getY(),
key.getHeight(), key.getWidth(),
new Color((int) key.red.getValue(), (int) key.green.getValue(), (int) key.blue.getValue(), (int) key.alpha.getValue()).getRGB() key.getHeight(),
6,
new Color((int) key.red.getValue(), (int) key.green.getValue(), (int) key.blue.getValue(), (int) key.alpha.getValue()).getRGB()
); );
} else {
RenderUtils.drawRect(
key.getX(),
key.getY(),
key.getWidth(),
key.getHeight(),
new Color((int) key.red.getValue(), (int) key.green.getValue(), (int) key.blue.getValue(), (int) key.alpha.getValue()).getRGB()
);
}
ColorUtils.setColor(-1); ColorUtils.setColor(-1);
} }
@ -294,13 +307,24 @@ public class KeystrokesMod extends ModDraggable {
setAnimation(Space.green, Space.isDown() ? clickedBackgroundColor.getGreen() : backgroundColor.getGreen(), fadeDelay); setAnimation(Space.green, Space.isDown() ? clickedBackgroundColor.getGreen() : backgroundColor.getGreen(), fadeDelay);
setAnimation(Space.blue, Space.isDown() ? clickedBackgroundColor.getBlue() : backgroundColor.getBlue(), fadeDelay); setAnimation(Space.blue, Space.isDown() ? clickedBackgroundColor.getBlue() : backgroundColor.getBlue(), fadeDelay);
setAnimation(Space.alpha, Space.isDown() ? clickedBackgroundColor.getAlpha() : backgroundColor.getAlpha(), fadeDelay); setAnimation(Space.alpha, Space.isDown() ? clickedBackgroundColor.getAlpha() : backgroundColor.getAlpha(), fadeDelay);
RenderUtils.drawRect( if(roundedCorners) {
0, RenderUtil.drawRoundedRect(
0 + mode.getHeight() + 2, 0,
mode.getWidth(), 0 + mode.getHeight() + 2,
10, mode.getWidth(),
new Color((int) Space.red.getValue(), (int) Space.green.getValue(), (int) Space.blue.getValue(), (int) Space.alpha.getValue()).getRGB() 10,
6,
new Color((int) Space.red.getValue(), (int) Space.green.getValue(), (int) Space.blue.getValue(), (int) Space.alpha.getValue()).getRGB()
); );
} else {
RenderUtils.drawRect(
0,
0 + mode.getHeight() + 2,
mode.getWidth(),
10,
new Color((int) Space.red.getValue(), (int) Space.green.getValue(), (int) Space.blue.getValue(), (int) Space.alpha.getValue()).getRGB()
);
}
ColorUtils.setColor(-1); ColorUtils.setColor(-1);
} }
font.drawString( font.drawString(

View File

@ -1,15 +1,15 @@
package net.silentclient.client.mods.hud; package net.silentclient.client.mods.hud;
import java.text.DecimalFormat;
import net.silentclient.client.event.EventTarget; import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.EntityAttackEvent; import net.silentclient.client.event.impl.EntityAttackEvent;
import net.silentclient.client.mods.HudMod; import net.silentclient.client.mods.HudMod;
import net.silentclient.client.mods.ModCategory; import net.silentclient.client.mods.ModCategory;
import java.text.DecimalFormat;
public class ReachDisplayMod extends HudMod { public class ReachDisplayMod extends HudMod {
private static final DecimalFormat FORMAT = new DecimalFormat("0.##"); public static final DecimalFormat FORMAT = new DecimalFormat("0.##");
private double distance = 0; private double distance = 0;
private long hitTime = -1; private long hitTime = -1;

View File

@ -30,7 +30,6 @@ public class QuickPlayMod extends Mod {
@Override @Override
public void setup() { public void setup() {
super.setup(); super.setup();
setNewMod(true);
this.addKeybindSetting("Open Menu", this, Keyboard.KEY_MINUS); this.addKeybindSetting("Open Menu", this, Keyboard.KEY_MINUS);
initHypixelModes(); initHypixelModes();
initRuHypixelModes(); initRuHypixelModes();

View File

@ -1,8 +1,5 @@
package net.silentclient.client.mods.player; package net.silentclient.client.mods.player;
import java.awt.Color;
import java.util.ArrayList;
import net.minecraft.client.settings.KeyBinding; import net.minecraft.client.settings.KeyBinding;
import net.silentclient.client.Client; import net.silentclient.client.Client;
import net.silentclient.client.event.EventTarget; import net.silentclient.client.event.EventTarget;
@ -12,6 +9,9 @@ import net.silentclient.client.gui.hud.ScreenPosition;
import net.silentclient.client.mods.HudMod; import net.silentclient.client.mods.HudMod;
import net.silentclient.client.mods.ModCategory; import net.silentclient.client.mods.ModCategory;
import java.awt.*;
import java.util.ArrayList;
public class AutoSprintMod extends HudMod { public class AutoSprintMod extends HudMod {
private boolean toggled = false; private boolean toggled = false;
@ -30,6 +30,7 @@ public class AutoSprintMod extends HudMod {
this.addBooleanSetting("Font Shadow", this, true); this.addBooleanSetting("Font Shadow", this, true);
this.addBooleanSetting("Brackets", this, true); this.addBooleanSetting("Brackets", this, true);
this.addBooleanSetting("Fancy Font", this, false); this.addBooleanSetting("Fancy Font", this, false);
this.addBooleanSetting("Rounded Corners", this, false);
ArrayList<String> options = new ArrayList<String>(); ArrayList<String> options = new ArrayList<String>();
options.add("Toggle"); options.add("Toggle");
options.add("Auto"); options.add("Auto");

View File

@ -7,6 +7,7 @@ import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.ClientTickEvent; import net.silentclient.client.event.impl.ClientTickEvent;
import net.silentclient.client.event.impl.EventCameraRotation; import net.silentclient.client.event.impl.EventCameraRotation;
import net.silentclient.client.event.impl.EventPlayerHeadRotation; import net.silentclient.client.event.impl.EventPlayerHeadRotation;
import net.silentclient.client.event.impl.KeyEvent;
import net.silentclient.client.mods.Mod; import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory; import net.silentclient.client.mods.ModCategory;
import net.silentclient.client.mods.util.Server; import net.silentclient.client.mods.util.Server;
@ -27,6 +28,8 @@ public class PerspectiveMod extends Mod {
public void setup() { public void setup() {
super.setup(); super.setup();
this.addKeybindSetting("Keybind", this, Keyboard.KEY_LMENU); this.addKeybindSetting("Keybind", this, Keyboard.KEY_LMENU);
this.addBooleanSetting("Smooth Camera", this, false);
this.addBooleanSetting("Toggle Perspective", this, false);
} }
@Override @Override
@ -39,16 +42,47 @@ public class PerspectiveMod extends Mod {
@EventTarget @EventTarget
public void updateEvent(ClientTickEvent event) { public void updateEvent(ClientTickEvent event) {
if(!isForceDisabled()) { if(!isForceDisabled() && !Client.getInstance().getSettingsManager().getSettingByName(this, "Toggle Perspective").getValBoolean()) {
if(Client.getInstance().getSettingsManager().getSettingByName(this, "Keybind").isKeyDown()) { if(Client.getInstance().getSettingsManager().getSettingByName(this, "Keybind").isKeyDown()) {
start(); start();
mc.gameSettings.thirdPersonView = 3; mc.gameSettings.thirdPersonView = 3;
if(Client.getInstance().getSettingsManager().getSettingByName(this, "Smooth Camera").getValBoolean()) {
mc.gameSettings.smoothCamera = true;
}
} }
else { else {
if(Client.getInstance().getSettingsManager().getSettingByName(this, "Smooth Camera").getValBoolean()) {
mc.gameSettings.smoothCamera = false;
}
stop(); stop();
} }
} }
} }
boolean toggleAllowed = false;
@EventTarget
public void onKey(KeyEvent event) {
if(!isForceDisabled() && Client.getInstance().getSettingsManager().getSettingByName(this, "Toggle Perspective").getValBoolean()) {
if(event.getKey() == Client.getInstance().getSettingsManager().getSettingByName(this, "Keybind").getKeybind()) {
toggleAllowed = !toggleAllowed;
if(toggleAllowed) {
if(active) {
if(Client.getInstance().getSettingsManager().getSettingByName(this, "Smooth Camera").getValBoolean()) {
mc.gameSettings.smoothCamera = false;
}
stop();
} else {
start();
mc.gameSettings.thirdPersonView = 3;
if(Client.getInstance().getSettingsManager().getSettingByName(this, "Smooth Camera").getValBoolean()) {
mc.gameSettings.smoothCamera = true;
}
}
}
}
}
}
public boolean isActive() { public boolean isActive() {
return this.isEnabled() && !isForceDisabled() && active; return this.isEnabled() && !isForceDisabled() && active;
@ -79,6 +113,7 @@ public class PerspectiveMod extends Mod {
private void start() { private void start() {
if(!active) { if(!active) {
Client.logger.info("perspective active");
active = true; active = true;
previousPerspective = mc.gameSettings.thirdPersonView; previousPerspective = mc.gameSettings.thirdPersonView;
mc.gameSettings.thirdPersonView = 3; mc.gameSettings.thirdPersonView = 3;
@ -90,6 +125,7 @@ public class PerspectiveMod extends Mod {
private void stop() { private void stop() {
if(active) { if(active) {
Client.logger.info("perspective deactive");
active = false; active = false;
mc.gameSettings.thirdPersonView = previousPerspective; mc.gameSettings.thirdPersonView = previousPerspective;
mc.renderGlobal.setDisplayListEntitiesDirty(); mc.renderGlobal.setDisplayListEntitiesDirty();

View File

@ -12,7 +12,6 @@ public class AnimationsMod extends Mod {
@Override @Override
public void setup() { public void setup() {
setUpdated(true);
this.addBooleanSetting("1.7 Item Positions", this, true); this.addBooleanSetting("1.7 Item Positions", this, true);
this.addBooleanSetting("1.7 Bow Pullback", this, true); this.addBooleanSetting("1.7 Bow Pullback", this, true);
this.addBooleanSetting("1.7 Block Animation", this, true); this.addBooleanSetting("1.7 Block Animation", this, true);

View File

@ -0,0 +1,17 @@
package net.silentclient.client.mods.render;
import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory;
public class ItemSizeMod extends Mod {
public ItemSizeMod() {
super("Item Size", ModCategory.MODS, "silentclient/icons/mods/itemsize.png");
}
@Override
public void setup() {
this.addSliderSetting("X", this, 0.75, -1, 1, false);
this.addSliderSetting("Y", this, -0.15, -1, 1, false);
this.addSliderSetting("Z", this, -1, -1, 1, false);
}
}

View File

@ -29,7 +29,7 @@ public class Server {
return false; return false;
} }
try { try {
String serverIp = Minecraft.getMinecraft().getCurrentServerData().serverIP; String serverIp = Minecraft.getMinecraft().getCurrentServerData().serverIP.toLowerCase();
final String regex = "^(?:.*\\.)?hypixel\\.(?:net|io)\\.?"; final String regex = "^(?:.*\\.)?hypixel\\.(?:net|io)\\.?";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE); final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
@ -44,7 +44,7 @@ public class Server {
return false; return false;
} }
try { try {
String serverIp = Minecraft.getMinecraft().getCurrentServerData().serverIP; String serverIp = Minecraft.getMinecraft().getCurrentServerData().serverIP.toLowerCase();
final String regex = "^(?:.*\\.)?ruhypixel\\.(?:net)\\.?"; final String regex = "^(?:.*\\.)?ruhypixel\\.(?:net)\\.?";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE); final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);

View File

@ -0,0 +1,57 @@
package net.silentclient.client.mods.world;
import net.silentclient.client.Client;
import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.EventPlaySound;
import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory;
public class SoundsMod extends Mod {
public SoundsMod() {
super("Sounds", ModCategory.MODS, "silentclient/icons/mods/soundsmod.png");
}
@Override
public void setup() {
this.addSliderSetting("Note", this, 100, 0, 100, true);
this.addSliderSetting("Mobs", this, 100, 0, 100, true);
this.addSliderSetting("Portal", this, 100, 0, 100, true);
this.addSliderSetting("Records", this, 100, 0, 100, true);
this.addSliderSetting("Step", this, 100, 0, 100, true);
this.addSliderSetting("TNT", this, 100, 0, 100, true);
}
@EventTarget
public void onPlaySound(EventPlaySound event) {
float noteVolume = Client.getInstance().getSettingsManager().getSettingByName(this, "Note").getValFloat();
float mobsVolume = Client.getInstance().getSettingsManager().getSettingByName(this, "Mobs").getValFloat();
float recordsVolume = Client.getInstance().getSettingsManager().getSettingByName(this, "Records").getValFloat();
float portalVolume = Client.getInstance().getSettingsManager().getSettingByName(this, "Portal").getValFloat();
float stepVolume = Client.getInstance().getSettingsManager().getSettingByName(this, "Step").getValFloat();
float tntVolume = Client.getInstance().getSettingsManager().getSettingByName(this, "TNT").getValFloat();
if(event.getSoundName().startsWith("note")) {
event.setVolume(noteVolume / 100F);
}
if(event.getSoundName().equals("game.tnt.primed") || event.getSoundName().equals("random.explode") || event.getSoundName().equals("creeper.primed")) {
event.setVolume(tntVolume / 100F);
}
if(event.getSoundName().contains("mob")) {
event.setVolume(mobsVolume / 100F);
}
if(event.getSoundName().startsWith("records")) {
event.setVolume(recordsVolume / 100F);
}
if(event.getSoundName().startsWith("step")) {
event.setVolume(stepVolume / 100F);
}
if(event.getSoundName().startsWith("portal")) {
event.setVolume(portalVolume / 100F);
}
}
}

View File

@ -0,0 +1,21 @@
package net.silentclient.client.skillissue;
import net.silentclient.client.Client;
import net.silentclient.client.skillissue.detections.Detection;
import net.silentclient.client.skillissue.detections.Reach;
import java.util.ArrayList;
public class SkillIssue {
public static final String VERSION = "1.0.0-beta.1";
private final ArrayList<Detection> detections = new ArrayList<>();
public SkillIssue() {
Client.logger.info(String.format("[SkillIssue]: Initialising (v%s)", VERSION));
detections.add(new Reach(this));
}
public ArrayList<Detection> getDetections() {
return detections;
}
}

View File

@ -0,0 +1,41 @@
package net.silentclient.client.skillissue.detections;
import net.minecraft.client.Minecraft;
import net.silentclient.client.Client;
import net.silentclient.client.event.EventManager;
import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.ClientTickEvent;
import net.silentclient.client.skillissue.SkillIssue;
public class Detection {
protected Minecraft mc = Minecraft.getMinecraft();
protected SkillIssue skillIssue;
protected int detections = 0;
protected long lastDetection = 0;
private final String name;
public Detection(SkillIssue skillIssue, String name) {
this.skillIssue = skillIssue;
this.name = name;
EventManager.register(this);
}
public void detect(String data) {
this.detections += 1;
this.lastDetection = System.currentTimeMillis();
Client.logger.warn(String.format("[SkillIssue]: %s Detection: %s (vl: %s)", name, data, detections));
}
@EventTarget
public void updateDetection(ClientTickEvent event) {
if(lastDetection != 0) {
if(System.currentTimeMillis() - lastDetection >= 600000) {
lastDetection = 0;
}
}
}
public String getName() {
return name;
}
}

View File

@ -0,0 +1,29 @@
package net.silentclient.client.skillissue.detections;
import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.EntityAttackEvent;
import net.silentclient.client.mods.hud.ReachDisplayMod;
import net.silentclient.client.skillissue.SkillIssue;
import net.silentclient.client.utils.PlayerUtils;
public class Reach extends Detection {
private long lastHit = 0;
public Reach(SkillIssue skillIssue) {
super(skillIssue, "Reach");
}
@EventTarget
public void totallyNoReachHax(EntityAttackEvent event) {
if(System.currentTimeMillis() - lastHit < 500 || !PlayerUtils.isSurvival()) {
return;
}
if(mc.objectMouseOver != null && mc.objectMouseOver.hitVec != null) {
this.lastHit = System.currentTimeMillis();
double distance = mc.objectMouseOver.hitVec.distanceTo(mc.thePlayer.getPositionEyes(1.0F));
if(distance > 3) {
this.detect("distance: " + ReachDisplayMod.FORMAT.format(distance));
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB