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">
<option name="linkedExternalProjectsSettings">
<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="gradleJvm" value="1.8" />
<option name="gradleJvm" value="zulu-1.8 (4)" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</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" />
</component>
</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.premium.PremiumCosmeticsGui;
import net.silentclient.client.premium.PremiumUtils;
import net.silentclient.client.skillissue.SkillIssue;
import net.silentclient.client.utils.*;
import net.silentclient.client.utils.animations.AnimationHandler;
import net.silentclient.client.utils.animations.SneakHandler;
@ -97,6 +98,7 @@ public class Client {
private AccountManager accountManager;
public ServerData lastServerData;
public TextUtils textUtils;
private SkillIssue skillIssue;
public static void memoryDebug(String paramString) {
LogManager.getLogger().info("-- Start Memory Debug -- " + paramString);
@ -235,6 +237,7 @@ public class Client {
}
globalSettings.configsMigrated = true;
globalSettings.save();
new File(Minecraft.getMinecraft().mcDataDir, "SilentClient").delete();
}
logger.info("STARTING > config-manager");
configManager = new ConfigManager();
@ -351,6 +354,9 @@ public class Client {
}
Client.logger.info("STARTING > text-utils");
this.textUtils = new TextUtils(Minecraft.getMinecraft().fontRendererObj);
logger.info("STARTING > skillissue");
this.skillIssue = new SkillIssue();
logger.info("-------------------------------------------------");
memoryDebug("CLIENT_POST_INIT");
}

View File

@ -1,7 +1,10 @@
package net.silentclient.client.cosmetics;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
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 java.io.*;
@ -68,6 +71,10 @@ public class Outfits {
Client.logger.info("Loading Outfit: " + outfit.name);
Requests.post("https://api.silentclient.net/account/load_outfit", Client.getInstance().getGson().toJson(outfit));
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() {

View File

@ -122,7 +122,7 @@ public class SilentResourcePacksGui extends SilentScreen {
scrollHelper.setStep(5);
scrollHelper.setElementsHeight(availableResourcePacks.size() * 37 + 19);
scrollHelper.setMaxScroll(blockHeight - 45);
scrollHelper.setSpeed(100);
scrollHelper.setSpeed(150);
if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) {
scrollHelper.setFlag(true);
@ -177,6 +177,9 @@ public class SilentResourcePacksGui extends SilentScreen {
private void availableResourcePacksClick(float x, float y, int mouseX, int mouseY) {
float itemY = y + 19 + scrollHelper.getScroll();
if(!GuiUtils.blockInOtherBlock(mouseX, mouseY, 2, 2, x, y, 193, blockHeight - 45)) {
return;
}
for(ResourcePackRepository.Entry entry : availableResourcePacks) {
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.setElementsHeight(selectedResourcePacks.size() * 37 + 19);
scrollHelper2.setMaxScroll(blockHeight - 45);
scrollHelper2.setSpeed(100);
scrollHelper2.setSpeed(150);
if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) {
scrollHelper2.setFlag(true);
} else {
@ -262,6 +265,10 @@ public class SilentResourcePacksGui extends SilentScreen {
float itemY = y + 19 + scrollHelper2.getScroll();
int packIndex = 0;
if(!GuiUtils.blockInOtherBlock(mouseX, mouseY, 2, 2, x, y, 193, blockHeight - 45)) {
return;
}
for(ResourcePackRepository.Entry entry : selectedResourcePacks) {
if(GuiUtils.blockInOtherBlock(x + 3, itemY, 187, 35, x, y, 193, blockHeight - 45)) {
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.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
import net.silentclient.client.Client;
import net.silentclient.client.cosmetics.StaticResourceLocation;
import net.silentclient.client.gui.hud.Watermark;
@ -61,7 +60,7 @@ public abstract class GuiContainerMixin extends GuiScreen {
@Inject(method = "mouseClicked", at = @At("TAIL"))
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"))

View File

@ -3,6 +3,7 @@ package net.silentclient.client.mods;
import net.silentclient.client.Client;
import net.silentclient.client.gui.hud.ScreenPosition;
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
import net.silentclient.client.gui.util.RenderUtil;
import java.awt.*;
@ -33,6 +34,7 @@ public class HudMod extends ModDraggable {
this.addBooleanSetting("Font Shadow", this, true);
this.addBooleanSetting("Brackets", this, false);
this.addBooleanSetting("Fancy Font", this, false);
this.addBooleanSetting("Rounded Corners", this, false);
}
public String getText() {
@ -100,14 +102,19 @@ public class HudMod extends ModDraggable {
font.setRenderMode(fancyFont ? CustomFontRenderer.RenderMode.CUSTOM : CustomFontRenderer.RenderMode.DEFAULT);
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();
boolean fontShadow = Client.getInstance().getSettingsManager().getSettingByName(this, "Font Shadow").getValBoolean();
boolean brackets = Client.getInstance().getSettingsManager().getSettingByName(this, "Brackets").getValBoolean();
Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "Color").getValColor();
preRender();
if(background) {
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) {
font.drawString((brackets ? "[" : "") + getTextForRender() + (brackets ? "]" : ""), getTextX(), getTextY(), color.getRGB(), fontShadow);

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.HitDelayFixMod;
import net.silentclient.client.mods.staff.TestMod;
import net.silentclient.client.mods.world.FullBrightMod;
import net.silentclient.client.mods.world.PlayerCounterMod;
import net.silentclient.client.mods.world.TimeChangerMod;
import net.silentclient.client.mods.world.WeatherChangerMod;
import net.silentclient.client.mods.world.*;
import java.util.ArrayList;
import java.util.Collections;
@ -184,8 +181,12 @@ public class ModInstances {
mods.add(new FPSSpoofer());
}
mods.add(new NewMotionBlurMod());
if(Client.getInstance().getAccount().getUsername().equalsIgnoreCase("fushka")) {
mods.add(new DonationsAlertsMod());
}
mods.add(new QuickPlayMod());
mods.add(new SoundsMod());
// mods.add(new ItemSizeMod());
}
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.lite.clickgui.utils.GlUtils;
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.ModCategory;
import net.silentclient.client.mods.ModDraggable;
@ -29,7 +30,6 @@ public class KeystrokesMod extends ModDraggable {
@Override
public void setup() {
this.addSliderSetting("Scale", this, 2.20F, 1.0F, 5.0F, false);
setUpdated(true);
ArrayList<String> cpsModes = new ArrayList<>();
cpsModes.add("None");
cpsModes.add("Small");
@ -37,6 +37,7 @@ public class KeystrokesMod extends ModDraggable {
this.addBooleanSetting("Font Shadow", this, true);
this.addBooleanSetting("Fancy Font", this, false);
this.addBooleanSetting("Background", this, true);
this.addBooleanSetting("Rounded Corners", this, false);
this.addModeSetting("CPS Mode", this, "Small", cpsModes);
this.addColorSetting("Color", this, new Color(255, 255, 255));
this.addColorSetting("Background Color", this, new Color(0, 0, 0), 127);
@ -182,6 +183,7 @@ public class KeystrokesMod extends ModDraggable {
Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "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;
boolean roundedCorners = Client.getInstance().getSettingsManager().getSettingByName(this, "Rounded Corners").getValBoolean();
for(Key key : mode.getKeys()) {
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.blue, key.isDown() ? clickedBackgroundColor.getBlue() : backgroundColor.getBlue(), fadeDelay);
setAnimation(key.alpha, key.isDown() ? clickedBackgroundColor.getAlpha() : backgroundColor.getAlpha(), fadeDelay);
if(roundedCorners) {
RenderUtil.drawRoundedRect(
key.getX(),
key.getY(),
key.getWidth(),
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(
0 + key.getX(),
0 + key.getY(),
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);
}
@ -294,6 +307,16 @@ public class KeystrokesMod extends ModDraggable {
setAnimation(Space.green, Space.isDown() ? clickedBackgroundColor.getGreen() : backgroundColor.getGreen(), fadeDelay);
setAnimation(Space.blue, Space.isDown() ? clickedBackgroundColor.getBlue() : backgroundColor.getBlue(), fadeDelay);
setAnimation(Space.alpha, Space.isDown() ? clickedBackgroundColor.getAlpha() : backgroundColor.getAlpha(), fadeDelay);
if(roundedCorners) {
RenderUtil.drawRoundedRect(
0,
0 + mode.getHeight() + 2,
mode.getWidth(),
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,
@ -301,6 +324,7 @@ public class KeystrokesMod extends ModDraggable {
10,
new Color((int) Space.red.getValue(), (int) Space.green.getValue(), (int) Space.blue.getValue(), (int) Space.alpha.getValue()).getRGB()
);
}
ColorUtils.setColor(-1);
}
font.drawString(

View File

@ -1,15 +1,15 @@
package net.silentclient.client.mods.hud;
import java.text.DecimalFormat;
import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.EntityAttackEvent;
import net.silentclient.client.mods.HudMod;
import net.silentclient.client.mods.ModCategory;
import java.text.DecimalFormat;
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 long hitTime = -1;

View File

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

View File

@ -1,8 +1,5 @@
package net.silentclient.client.mods.player;
import java.awt.Color;
import java.util.ArrayList;
import net.minecraft.client.settings.KeyBinding;
import net.silentclient.client.Client;
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.ModCategory;
import java.awt.*;
import java.util.ArrayList;
public class AutoSprintMod extends HudMod {
private boolean toggled = false;
@ -30,6 +30,7 @@ public class AutoSprintMod extends HudMod {
this.addBooleanSetting("Font Shadow", this, true);
this.addBooleanSetting("Brackets", this, true);
this.addBooleanSetting("Fancy Font", this, false);
this.addBooleanSetting("Rounded Corners", this, false);
ArrayList<String> options = new ArrayList<String>();
options.add("Toggle");
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.EventCameraRotation;
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.ModCategory;
import net.silentclient.client.mods.util.Server;
@ -27,6 +28,8 @@ public class PerspectiveMod extends Mod {
public void setup() {
super.setup();
this.addKeybindSetting("Keybind", this, Keyboard.KEY_LMENU);
this.addBooleanSetting("Smooth Camera", this, false);
this.addBooleanSetting("Toggle Perspective", this, false);
}
@Override
@ -39,17 +42,48 @@ public class PerspectiveMod extends Mod {
@EventTarget
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()) {
start();
mc.gameSettings.thirdPersonView = 3;
if(Client.getInstance().getSettingsManager().getSettingByName(this, "Smooth Camera").getValBoolean()) {
mc.gameSettings.smoothCamera = true;
}
}
else {
if(Client.getInstance().getSettingsManager().getSettingByName(this, "Smooth Camera").getValBoolean()) {
mc.gameSettings.smoothCamera = false;
}
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() {
return this.isEnabled() && !isForceDisabled() && active;
}
@ -79,6 +113,7 @@ public class PerspectiveMod extends Mod {
private void start() {
if(!active) {
Client.logger.info("perspective active");
active = true;
previousPerspective = mc.gameSettings.thirdPersonView;
mc.gameSettings.thirdPersonView = 3;
@ -90,6 +125,7 @@ public class PerspectiveMod extends Mod {
private void stop() {
if(active) {
Client.logger.info("perspective deactive");
active = false;
mc.gameSettings.thirdPersonView = previousPerspective;
mc.renderGlobal.setDisplayListEntitiesDirty();

View File

@ -12,7 +12,6 @@ public class AnimationsMod extends Mod {
@Override
public void setup() {
setUpdated(true);
this.addBooleanSetting("1.7 Item Positions", this, true);
this.addBooleanSetting("1.7 Bow Pullback", 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;
}
try {
String serverIp = Minecraft.getMinecraft().getCurrentServerData().serverIP;
String serverIp = Minecraft.getMinecraft().getCurrentServerData().serverIP.toLowerCase();
final String regex = "^(?:.*\\.)?hypixel\\.(?:net|io)\\.?";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
@ -44,7 +44,7 @@ public class Server {
return false;
}
try {
String serverIp = Minecraft.getMinecraft().getCurrentServerData().serverIP;
String serverIp = Minecraft.getMinecraft().getCurrentServerData().serverIP.toLowerCase();
final String regex = "^(?:.*\\.)?ruhypixel\\.(?:net)\\.?";
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