From 38a91376914b20eb60d856e4275b07b48389ce99 Mon Sep 17 00:00:00 2001 From: Shirona1337 Date: Thu, 21 May 2026 19:43:09 +0800 Subject: [PATCH] refactor: remove unnecessary boxing and rename non-ASCII identifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Drop redundant Integer/Long/Boolean/Float/Double.valueOf(literal) calls (~218 sites across 31 files); rely on autoboxing instead. One chained Double.valueOf(...).toString() in AimAssist preserved. - Rename obfuscation residue identifiers using non-ASCII characters to readable names: * AntiWeb.Phase.{Đ,Ŀ,Ł} -> {IDLE,PLACING,RECYCLING} * AutoOffHand.ItemType.{Đ,Ŀ,Ł} -> {SNOWBALL,GAPPLE,NONE} * FastUse.UseState.{Đ,Ŀ,Ł,ŧ} -> {IDLE,WAITING,SWAPPING,USING} * BlurFactory.BlurType.{Đ,Ŀ,Ł,ŧ} -> {NORMAL,INNER,OUTER,SOLID} * Rotation.Đ -> ASSERTIONS_DISABLED * ESP.Pair.Đ -> of * KeyBindsHud.KeyBindRow.Đ -> update Co-Authored-By: Claude Opus 4.7 --- .../java/shit/zen/config/ValuesConfig.java | 4 +-- .../shit/zen/gui/legacy/NumberComponent.java | 2 +- .../gui/newclickgui/NumberSettingElement.java | 2 +- .../java/shit/zen/gui/panel/CategoryBar.java | 6 ++-- .../shit/zen/gui/panel/ModuleListPanel.java | 8 ++--- .../zen/gui/panel/ScaleSwitchOverlay.java | 2 +- .../shit/zen/gui/panel/SettingsPopup.java | 18 +++++----- .../panel/setting/BooleanSettingRenderer.java | 8 ++--- .../panel/setting/ModeSettingRenderer.java | 16 ++++----- .../setting/MultiSelectSettingRenderer.java | 8 ++--- .../panel/setting/NumberSettingRenderer.java | 4 +-- src/main/java/shit/zen/hud/KeyBindsHud.java | 4 +-- .../zen/modules/impl/combat/AntiBots.java | 2 +- .../shit/zen/modules/impl/combat/AntiKB.java | 4 +-- .../zen/modules/impl/combat/AutoOffHand.java | 18 +++++----- .../zen/modules/impl/combat/AutoSoup.java | 6 ++-- .../zen/modules/impl/combat/AutoThrow.java | 6 ++-- .../zen/modules/impl/exploit/FastPlace.java | 2 +- .../shit/zen/modules/impl/misc/AimAssist.java | 14 ++++---- .../shit/zen/modules/impl/misc/AutoRod.java | 2 +- .../zen/modules/impl/movement/FastUse.java | 36 +++++++++---------- .../modules/impl/movement/TargetStrafe.java | 4 +-- .../shit/zen/modules/impl/player/AntiTNT.java | 2 +- .../zen/modules/impl/player/AntiVoid.java | 2 +- .../shit/zen/modules/impl/player/AntiWeb.java | 24 ++++++------- .../shit/zen/modules/impl/player/AutoMLG.java | 4 +-- .../zen/modules/impl/player/ChestStealer.java | 4 +-- .../modules/impl/player/InventoryManager.java | 36 +++++++++---------- .../shit/zen/modules/impl/player/NoFall.java | 2 +- .../zen/modules/impl/render/AspectRatio.java | 2 +- .../shit/zen/modules/impl/render/ESP.java | 4 +-- .../zen/modules/impl/render/FullBright.java | 2 +- .../zen/modules/impl/render/OldHitting.java | 6 ++-- .../shit/zen/modules/impl/world/AutoPlay.java | 2 +- .../java/shit/zen/render/BlurFactory.java | 2 +- .../shit/zen/utils/game/RotationUtil.java | 4 +-- .../shit/zen/utils/render/ProjectionUtil.java | 2 +- .../shit/zen/utils/rotation/Rotation.java | 6 ++-- 38 files changed, 139 insertions(+), 141 deletions(-) diff --git a/src/main/java/shit/zen/config/ValuesConfig.java b/src/main/java/shit/zen/config/ValuesConfig.java index a9b4e3c..1fc6166 100644 --- a/src/main/java/shit/zen/config/ValuesConfig.java +++ b/src/main/java/shit/zen/config/ValuesConfig.java @@ -96,8 +96,8 @@ extends Config { public void save(BufferedWriter bufferedWriter) throws IOException { for (Module module : ZenClient.getInstance().getModuleManager().getModules()) { if (module instanceof HudElement hudElement) { - bufferedWriter.write(String.format((String)"P:%s:X:%s\n", (Object[])new Object[]{module.getName(), Float.valueOf(hudElement.getX())})); - bufferedWriter.write(String.format((String)"P:%s:Y:%s\n", (Object[])new Object[]{module.getName(), Float.valueOf(hudElement.getY())})); + bufferedWriter.write(String.format((String)"P:%s:X:%s\n", (Object[])new Object[]{module.getName(), hudElement.getX()})); + bufferedWriter.write(String.format((String)"P:%s:Y:%s\n", (Object[])new Object[]{module.getName(), hudElement.getY()})); } module.getSettings().forEach(setting -> { try { diff --git a/src/main/java/shit/zen/gui/legacy/NumberComponent.java b/src/main/java/shit/zen/gui/legacy/NumberComponent.java index e913448..a189a48 100644 --- a/src/main/java/shit/zen/gui/legacy/NumberComponent.java +++ b/src/main/java/shit/zen/gui/legacy/NumberComponent.java @@ -37,7 +37,7 @@ extends SettingComponent { this.updateSliderValue(mouseX, sliderX, sliderWidth); } String name = this.numberSetting.getName(); - String valueText = this.numberSetting.getStep().doubleValue() % 1.0 == 0.0 ? String.format("%d", new Object[]{this.numberSetting.getValue().intValue()}) : String.format("%.2f", new Object[]{Float.valueOf(this.numberSetting.getValue().floatValue())}); + String valueText = this.numberSetting.getStep().doubleValue() % 1.0 == 0.0 ? String.format("%d", new Object[]{this.numberSetting.getValue().intValue()}) : String.format("%.2f", new Object[]{this.numberSetting.getValue().floatValue()}); float textY = (float)rowY + ((float)rowHeight - FontStore.OPENSANS_16.getFontHeight()) / 2.0f; FontStore.OPENSANS_16.drawStringWithShadow(poseStack, name, sliderX, textY, textColor); FontStore.OPENSANS_16.drawStringWithShadow(poseStack, valueText, (float)(panelX + panelWidth - textPadding) - FontStore.OPENSANS_16.getStringWidth(valueText), textY, textColor); diff --git a/src/main/java/shit/zen/gui/newclickgui/NumberSettingElement.java b/src/main/java/shit/zen/gui/newclickgui/NumberSettingElement.java index 4be2670..fd7a4ab 100644 --- a/src/main/java/shit/zen/gui/newclickgui/NumberSettingElement.java +++ b/src/main/java/shit/zen/gui/newclickgui/NumberSettingElement.java @@ -52,7 +52,7 @@ extends SettingElement { this.isTruncated = true; } FontStore.AXIFORMA_REGULAR_14.drawString(poseStack, name, this.x + 6.0f, nameY, ColorUtil.withAlpha(-1, alpha * 0.8f)); - String valueText = String.format("%.2f", new Object[]{Float.valueOf(this.setting.getValue().floatValue())}); + String valueText = String.format("%.2f", new Object[]{this.setting.getValue().floatValue()}); FontStore.AXIFORMA_BOLD_13.drawString(poseStack, valueText, this.x + 120.0f - FontStore.AXIFORMA_BOLD_13.getStringWidth(valueText) - 6.0f, nameY, ColorUtil.withAlpha(-1, alpha * 0.92f)); float progress = this.setting.getValue().floatValue() / this.setting.getMax().floatValue(); progress = Mth.clamp(progress, 0.0f, 1.0f); diff --git a/src/main/java/shit/zen/gui/panel/CategoryBar.java b/src/main/java/shit/zen/gui/panel/CategoryBar.java index 5bb74c7..dbfb62f 100644 --- a/src/main/java/shit/zen/gui/panel/CategoryBar.java +++ b/src/main/java/shit/zen/gui/panel/CategoryBar.java @@ -61,16 +61,16 @@ extends ClientBase { } private void updateCategoryHover(Category category, int iconX, int iconY, int mouseX, int mouseY, int iconSize) { - float current = this.hoverAnimations.getOrDefault(category, Float.valueOf(0.0f)).floatValue(); + float current = this.hoverAnimations.getOrDefault(category, 0.0f).floatValue(); boolean hovered = this.isMouseOverCategory(iconX, iconY, mouseX, mouseY, iconSize); - this.hoverAnimations.put(category, Float.valueOf(LerpUtil.lerp(current, hovered ? 1.0f : 0.0f, 0.12f))); + this.hoverAnimations.put(category, LerpUtil.lerp(current, hovered ? 1.0f : 0.0f, 0.12f)); } private int getCategoryColor(Category category) { if (category == this.selectedCategory) { return -1; } - float hoverAmount = this.hoverAnimations.getOrDefault(category, Float.valueOf(0.0f)).floatValue(); + float hoverAmount = this.hoverAnimations.getOrDefault(category, 0.0f).floatValue(); return this.lerpColor(-7829368, -3355444, hoverAmount); } diff --git a/src/main/java/shit/zen/gui/panel/ModuleListPanel.java b/src/main/java/shit/zen/gui/panel/ModuleListPanel.java index 9395a9d..7d14404 100644 --- a/src/main/java/shit/zen/gui/panel/ModuleListPanel.java +++ b/src/main/java/shit/zen/gui/panel/ModuleListPanel.java @@ -199,12 +199,12 @@ extends ClientBase { private void updateModuleHover(Module module, int rowX, int rowY, int mouseX, int mouseY, float scale) { if (module.isEnabled()) { - this.hoverAnimations.put(module, Float.valueOf(0.0f)); + this.hoverAnimations.put(module, 0.0f); return; } - float current = this.hoverAnimations.getOrDefault(module, Float.valueOf(0.0f)).floatValue(); + float current = this.hoverAnimations.getOrDefault(module, 0.0f).floatValue(); boolean hovered = this.isMouseOverModule(module, rowX, rowY, mouseX, mouseY, scale); - this.hoverAnimations.put(module, Float.valueOf(LerpUtil.lerp(current, hovered ? 1.0f : 0.0f, 0.12f))); + this.hoverAnimations.put(module, LerpUtil.lerp(current, hovered ? 1.0f : 0.0f, 0.12f)); } private int applyAlpha(int color, float alpha) { @@ -260,7 +260,7 @@ extends ClientBase { TextGlow.drawGlowText(bindName, bindX + iconWidth + spacing, drawY - 2.0f, moduleFont, textColor, glowColor, 8.0f * scale); } } else { - float hoverAmount = this.hoverAnimations.getOrDefault(module, Float.valueOf(0.0f)).floatValue(); + float hoverAmount = this.hoverAnimations.getOrDefault(module, 0.0f).floatValue(); int rFrom = 170; int gFrom = 170; int bFrom = 170; diff --git a/src/main/java/shit/zen/gui/panel/ScaleSwitchOverlay.java b/src/main/java/shit/zen/gui/panel/ScaleSwitchOverlay.java index 55974ab..69427c9 100644 --- a/src/main/java/shit/zen/gui/panel/ScaleSwitchOverlay.java +++ b/src/main/java/shit/zen/gui/panel/ScaleSwitchOverlay.java @@ -95,7 +95,7 @@ extends ClientBase { int glowColor = alphaByte << 24 | 0xFFFFFF; TextGlow.drawGlowText(title, titleX, titleY, titleFont, titleColor, glowColor, 10.0f * scale); FontRenderer descFont = FontPresets.axiformaRegular(18.0f * scale); - String description = String.format(Locale.US, "Switching scale from %.0f%% to %.0f%%", new Object[]{Float.valueOf(this.fromScale * 100.0f), Float.valueOf(this.toScale * 100.0f)}); + String description = String.format(Locale.US, "Switching scale from %.0f%% to %.0f%%", new Object[]{this.fromScale * 100.0f, this.toScale * 100.0f}); float descWidth = GlHelper.getStringWidth(description, descFont); float descX = (float)boxX + (boxWidth - descWidth) / 2.0f; float descY = (float)boxY + 75.0f * scale; diff --git a/src/main/java/shit/zen/gui/panel/SettingsPopup.java b/src/main/java/shit/zen/gui/panel/SettingsPopup.java index 3c3148e..c06b851 100644 --- a/src/main/java/shit/zen/gui/panel/SettingsPopup.java +++ b/src/main/java/shit/zen/gui/panel/SettingsPopup.java @@ -44,8 +44,8 @@ extends ClientBase { this.scaleChangeCallback = scaleChangeCallback; this.dropdownOpen.put("language", false); this.dropdownOpen.put("scale", false); - this.dropdownAlpha.put("language", Float.valueOf(0.0f)); - this.dropdownAlpha.put("scale", Float.valueOf(0.0f)); + this.dropdownAlpha.put("language", 0.0f); + this.dropdownAlpha.put("scale", 0.0f); this.dropdownItemHover.put("language", new HashMap<>()); this.dropdownItemHover.put("scale", new HashMap<>()); } @@ -137,7 +137,7 @@ extends ClientBase { int dropdownX = (int)((float)(popupX + popupWidth - dropdownWidth) - 15.0f * scale); int dropdownHeaderHeight = (int)(20.0f * scale); int itemHeight = (int)(18.0f * scale); - float openFactor = this.dropdownAlpha.getOrDefault(key, Float.valueOf(0.0f)).floatValue(); + float openFactor = this.dropdownAlpha.getOrDefault(key, 0.0f).floatValue(); String[] filteredItems = this.filterDropdownItems(items, selectedValue); int expandedHeight = (int)((float)(filteredItems.length * itemHeight) * openFactor); RenderUtil.drawRoundedRect(guiGraphics.pose(), dropdownX, rowY, dropdownWidth, dropdownHeaderHeight + expandedHeight, 4.0f * scale, this.applyAlpha(POPUP_BG_COLOR.getRGB(), openAlpha)); @@ -305,10 +305,10 @@ extends ClientBase { private void updateDropdownAlpha() { for (String key : this.dropdownOpen.keySet()) { boolean open = this.dropdownOpen.getOrDefault(key, false); - float current = this.dropdownAlpha.getOrDefault(key, Float.valueOf(0.0f)).floatValue(); + float current = this.dropdownAlpha.getOrDefault(key, 0.0f).floatValue(); float target = open ? 1.0f : 0.0f; current = Math.abs(current - target) > 0.01f ? LerpUtil.smoothLerp(current, target, 0.22f) : target; - this.dropdownAlpha.put(key, Float.valueOf(current)); + this.dropdownAlpha.put(key, current); } } @@ -330,10 +330,10 @@ extends ClientBase { } private void updateItemHover(Map hoverMap, String key, boolean hovered) { - float current = hoverMap.getOrDefault(key, Float.valueOf(0.0f)).floatValue(); + float current = hoverMap.getOrDefault(key, 0.0f).floatValue(); float target = hovered ? 1.0f : 0.0f; current = Math.abs(current - target) > 0.01f ? LerpUtil.smoothLerp(current, target, 0.28f) : target; - hoverMap.put(key, Float.valueOf(current)); + hoverMap.put(key, current); } private String[] filterDropdownItems(String[] items, String selectedValue) { @@ -353,8 +353,8 @@ extends ClientBase { private int calculatePopupHeight(float scale) { float baseHeight = 200.0f * scale; float itemHeight = 18.0f * scale; - float langExpanded = (float)this.filterDropdownItems(LANGUAGES, this.selectedLanguage).length * itemHeight * this.dropdownAlpha.getOrDefault("language", Float.valueOf(0.0f)).floatValue(); - float scaleExpanded = (float)this.filterDropdownItems(SCALES, this.selectedScale).length * itemHeight * this.dropdownAlpha.getOrDefault("scale", Float.valueOf(0.0f)).floatValue(); + float langExpanded = (float)this.filterDropdownItems(LANGUAGES, this.selectedLanguage).length * itemHeight * this.dropdownAlpha.getOrDefault("language", 0.0f).floatValue(); + float scaleExpanded = (float)this.filterDropdownItems(SCALES, this.selectedScale).length * itemHeight * this.dropdownAlpha.getOrDefault("scale", 0.0f).floatValue(); return (int)(baseHeight + langExpanded + scaleExpanded); } diff --git a/src/main/java/shit/zen/gui/panel/setting/BooleanSettingRenderer.java b/src/main/java/shit/zen/gui/panel/setting/BooleanSettingRenderer.java index bc93f29..c7bc480 100644 --- a/src/main/java/shit/zen/gui/panel/setting/BooleanSettingRenderer.java +++ b/src/main/java/shit/zen/gui/panel/setting/BooleanSettingRenderer.java @@ -32,18 +32,18 @@ implements SettingRenderer { int rowHeight = Math.round(24.0f * scale); int toggleH = toggleHeight = Math.round(10.0f * scale); int rightPadding = Math.round(5.0f * scale); - float toggleAnim = this.toggleAnimations.getOrDefault(booleanSetting, Float.valueOf(booleanSetting.getValue() != false ? 1.0f : 0.0f)).floatValue(); + float toggleAnim = this.toggleAnimations.getOrDefault(booleanSetting, booleanSetting.getValue() != false ? 1.0f : 0.0f).floatValue(); float toggleTarget = booleanSetting.getValue() != false ? 1.0f : 0.0f; toggleAnim = Math.abs(toggleTarget - toggleAnim) > 0.01f ? LerpUtil.smoothLerp(toggleAnim, toggleTarget, 0.25f) : toggleTarget; - this.toggleAnimations.put(booleanSetting, Float.valueOf(toggleAnim)); + this.toggleAnimations.put(booleanSetting, toggleAnim); int toggleWidth = toggleHeight * 2; int toggleX = x + width - toggleWidth - rightPadding; int toggleY = y + (rowHeight - toggleH) / 2; this.updateHoverState(booleanSetting, toggleX, toggleY, mouseX, mouseY, toggleHeight); - float hoverAnim = this.hoverAnimations.getOrDefault(booleanSetting, Float.valueOf(0.0f)).floatValue(); + float hoverAnim = this.hoverAnimations.getOrDefault(booleanSetting, 0.0f).floatValue(); float hoverTarget = this.hoverStates.getOrDefault(booleanSetting, false) != false ? 1.0f : 0.0f; hoverAnim = Math.abs(hoverTarget - hoverAnim) > 0.01f ? LerpUtil.smoothLerp(hoverAnim, hoverTarget, 0.3f) : hoverTarget; - this.hoverAnimations.put(booleanSetting, Float.valueOf(hoverAnim)); + this.hoverAnimations.put(booleanSetting, hoverAnim); FontRenderer nameFont = FontPresets.axiformaRegular(14.0f * scale); float nameY = (float)y + (float)rowHeight / 2.0f - nameFont.getMetrics().capHeight() / 2.0f; TextGlow.drawGlowText(booleanSetting.getName(), x, nameY, nameFont, this.applyAlpha(-1, alpha), this.applyAlpha(new Color(255, 255, 255, 120).getRGB(), alpha), 6.0f * scale); diff --git a/src/main/java/shit/zen/gui/panel/setting/ModeSettingRenderer.java b/src/main/java/shit/zen/gui/panel/setting/ModeSettingRenderer.java index 64b3f19..a59c862 100644 --- a/src/main/java/shit/zen/gui/panel/setting/ModeSettingRenderer.java +++ b/src/main/java/shit/zen/gui/panel/setting/ModeSettingRenderer.java @@ -32,7 +32,7 @@ implements SettingRenderer { } this.updateOpenAnimation(modeSetting); String[] otherModes = Arrays.stream((Object[])modeSetting.getModes()).filter(mode -> !Objects.equals(mode, modeSetting.getValue())).toArray(String[]::new); - float openFactor = this.openAnimations.getOrDefault(modeSetting, Float.valueOf(0.0f)).floatValue(); + float openFactor = this.openAnimations.getOrDefault(modeSetting, 0.0f).floatValue(); int itemHeight = Math.round(16.0f * scale); int expandedHeight = Math.round((float)(otherModes.length * itemHeight) * openFactor); int rowHeight = Math.round(24.0f * scale); @@ -51,7 +51,7 @@ implements SettingRenderer { float selectedX = (float)dropdownX + ((float)dropdownWidth - selectedWidth) / 2.0f; float selectedY = (float)dropdownY + (float)itemHeight / 2.0f - valueFont.getMetrics().capHeight() / 2.0f + 2.0f * scale; TextGlow.drawGlowText(selectedValue, selectedX, selectedY, valueFont, this.applyAlpha(-3355444, alpha), this.applyAlpha(new Color(255, 255, 255, 150).getRGB(), alpha), 10.0f * scale); - float openFactor2 = this.openAnimations.getOrDefault(modeSetting, Float.valueOf(0.0f)).floatValue(); + float openFactor2 = this.openAnimations.getOrDefault(modeSetting, 0.0f).floatValue(); if ((double)openFactor2 > 0.01) { this.itemHoverAnimations.putIfAbsent(modeSetting, new HashMap<>()); Map hoverMap = this.itemHoverAnimations.get(modeSetting); @@ -88,10 +88,10 @@ implements SettingRenderer { } private void updateItemHoverAnim(Map hoverMap, String key, boolean hovered) { - float current = hoverMap.getOrDefault(key, Float.valueOf(0.0f)).floatValue(); + float current = hoverMap.getOrDefault(key, 0.0f).floatValue(); float target = hovered ? 1.0f : 0.0f; current = Math.abs(current - target) > 0.01f ? LerpUtil.smoothLerp(current, target, 0.28f) : target; - hoverMap.put(key, Float.valueOf(current)); + hoverMap.put(key, current); } private float lerpFloat(float from, float to, float t) { @@ -116,11 +116,11 @@ implements SettingRenderer { private void updateOpenAnimation(ModeSetting modeSetting) { boolean open = this.openStates.getOrDefault(modeSetting, false); - float current = this.openAnimations.getOrDefault(modeSetting, Float.valueOf(0.0f)).floatValue(); + float current = this.openAnimations.getOrDefault(modeSetting, 0.0f).floatValue(); if (open) { - this.openAnimations.put(modeSetting, Float.valueOf(LerpUtil.lerp(current, 1.0f, 0.08f))); + this.openAnimations.put(modeSetting, LerpUtil.lerp(current, 1.0f, 0.08f)); } else { - this.openAnimations.put(modeSetting, Float.valueOf(LerpUtil.lerp(current, 0.0f, 0.16f))); + this.openAnimations.put(modeSetting, LerpUtil.lerp(current, 0.0f, 0.16f)); } } @@ -172,7 +172,7 @@ implements SettingRenderer { return Math.round(24.0f * scale); } String[] otherModes = Arrays.stream((Object[])modeSetting.getModes()).filter(mode -> !Objects.equals(mode, modeSetting.getValue())).toArray(String[]::new); - float openFactor = this.openAnimations.getOrDefault(modeSetting, Float.valueOf(0.0f)).floatValue(); + float openFactor = this.openAnimations.getOrDefault(modeSetting, 0.0f).floatValue(); int itemHeight = Math.round(16.0f * scale); int expandedHeight = Math.round((float)(otherModes.length * itemHeight) * openFactor); return Math.round(24.0f * scale) + expandedHeight; diff --git a/src/main/java/shit/zen/gui/panel/setting/MultiSelectSettingRenderer.java b/src/main/java/shit/zen/gui/panel/setting/MultiSelectSettingRenderer.java index d820cf8..7862ecf 100644 --- a/src/main/java/shit/zen/gui/panel/setting/MultiSelectSettingRenderer.java +++ b/src/main/java/shit/zen/gui/panel/setting/MultiSelectSettingRenderer.java @@ -41,8 +41,8 @@ implements SettingRenderer { boolean hovered = mouseX >= x && mouseX <= x + width && mouseY >= optionY && mouseY <= optionY + rowHeight; this.updateAnimation(this.hoverAnimations, option, hovered, 0.28f); this.updateAnimation(this.selectedAnimations, option, selected, 0.25f); - float hoverAmount = this.hoverAnimations.getOrDefault(option, Float.valueOf(0.0f)).floatValue(); - float selectedAmount = this.selectedAnimations.getOrDefault(option, Float.valueOf(0.0f)).floatValue(); + float hoverAmount = this.hoverAnimations.getOrDefault(option, 0.0f).floatValue(); + float selectedAmount = this.selectedAnimations.getOrDefault(option, 0.0f).floatValue(); int boxX = x + width - boxSize - rightPadding; int boxY = optionY + (rowHeight - boxSize) / 2; if (selectedAmount > 0.01f) { @@ -70,10 +70,10 @@ implements SettingRenderer { } private void updateAnimation(Map map, String key, boolean target, float speed) { - float current = map.getOrDefault(key, Float.valueOf(0.0f)).floatValue(); + float current = map.getOrDefault(key, 0.0f).floatValue(); float targetValue = target ? 1.0f : 0.0f; current = Math.abs(targetValue - current) > 0.01f ? LerpUtil.smoothLerp(current, targetValue, speed) : targetValue; - map.put(key, Float.valueOf(current)); + map.put(key, current); } @Override diff --git a/src/main/java/shit/zen/gui/panel/setting/NumberSettingRenderer.java b/src/main/java/shit/zen/gui/panel/setting/NumberSettingRenderer.java index 8001769..5d97e4d 100644 --- a/src/main/java/shit/zen/gui/panel/setting/NumberSettingRenderer.java +++ b/src/main/java/shit/zen/gui/panel/setting/NumberSettingRenderer.java @@ -265,7 +265,7 @@ implements SettingRenderer { } else if (numberSetting.getValue() instanceof Long) { numberSetting.setValue(Math.round(value)); } else if (numberSetting.getValue() instanceof Float) { - numberSetting.setValue(Float.valueOf((float)value)); + numberSetting.setValue((float)value); } else { numberSetting.setValue(value); } @@ -277,7 +277,7 @@ implements SettingRenderer { } else if (numberSetting.getValue() instanceof Long) { numberSetting.setValue(Math.round(value)); } else if (numberSetting.getValue() instanceof Float) { - numberSetting.setValue(Float.valueOf((float)value)); + numberSetting.setValue((float)value); } else { numberSetting.setValue(value); } diff --git a/src/main/java/shit/zen/hud/KeyBindsHud.java b/src/main/java/shit/zen/hud/KeyBindsHud.java index f4c95a3..4f17090 100644 --- a/src/main/java/shit/zen/hud/KeyBindsHud.java +++ b/src/main/java/shit/zen/hud/KeyBindsHud.java @@ -104,7 +104,7 @@ extends HudElement { this.removing = false; } - public void Đ(KeyBindsHud.KeyBindEntry e) { + public void update(KeyBindsHud.KeyBindEntry e) { this.entry = e; this.name = e != null ? e.name : this.module.getName(); this.key = e != null ? e.key : this.module.getBind().getName(); @@ -198,7 +198,7 @@ extends HudElement { KeyBindsHud.KeyBindRow existing = this.removedRows.get(e.getKey()); if (existing != null) { if (existing.removing) existing.cancelRemove(); - existing.Đ(e.getValue()); + existing.update(e.getValue()); continue; } this.rowList.add(new KeyBindsHud.KeyBindRow(this, e.getKey(), e.getValue())); diff --git a/src/main/java/shit/zen/modules/impl/combat/AntiBots.java b/src/main/java/shit/zen/modules/impl/combat/AntiBots.java index 55360e9..21aaf1c 100644 --- a/src/main/java/shit/zen/modules/impl/combat/AntiBots.java +++ b/src/main/java/shit/zen/modules/impl/combat/AntiBots.java @@ -26,7 +26,7 @@ import shit.zen.event.EventTarget; public class AntiBots extends Module { public static AntiBots INSTANCE; - private final NumberSetting newPlayerTimeout = new NumberSetting("Respawn Time", Double.valueOf(2500.0), Double.valueOf(0.0), Double.valueOf(10000.0), Double.valueOf(100.0)); + private final NumberSetting newPlayerTimeout = new NumberSetting("Respawn Time", 2500.0, 0.0, 10000.0, 100.0); private final BooleanSetting debug = new BooleanSetting("Debug", true); private static final Map suspectNames; private static final Map confirmedBotNames; diff --git a/src/main/java/shit/zen/modules/impl/combat/AntiKB.java b/src/main/java/shit/zen/modules/impl/combat/AntiKB.java index 4a91930..a2b3222 100644 --- a/src/main/java/shit/zen/modules/impl/combat/AntiKB.java +++ b/src/main/java/shit/zen/modules/impl/combat/AntiKB.java @@ -34,8 +34,8 @@ extends Module { public final BooleanSetting tryAttack = new BooleanSetting("Try Attack", false, () -> mode.is("Mix")); public final BooleanSetting movementOverride = new BooleanSetting("Movement Override", false, () -> mode.is("Mix")); public final BooleanSetting followDirection = new BooleanSetting("Follow Direction", false, () -> mode.is("Jump Reset")); - public final NumberSetting rotateTicks = new NumberSetting("Rotate Ticks", Integer.valueOf(12), Integer.valueOf(3), Integer.valueOf(20), Integer.valueOf(1), () -> mode.is("Jump Reset") && (this.rotate.getValue() != false || this.followDirection.getValue() != false)); - public final NumberSetting attackAmount = new NumberSetting("Attack amount", Double.valueOf(5.0), Double.valueOf(1.0), Double.valueOf(20.0), Integer.valueOf(1), () -> mode.is("NoXZ")); + public final NumberSetting rotateTicks = new NumberSetting("Rotate Ticks", 12, 3, 20, 1, () -> mode.is("Jump Reset") && (this.rotate.getValue() != false || this.followDirection.getValue() != false)); + public final NumberSetting attackAmount = new NumberSetting("Attack amount", 5.0, 1.0, 20.0, 1, () -> mode.is("NoXZ")); public final BooleanSetting instantAttack = new BooleanSetting("Instant Attack", false, () -> mode.is("NoXZ")); public final BooleanSetting sprintStateCheck = new BooleanSetting("Sprint state check", true, () -> mode.is("NoXZ")); diff --git a/src/main/java/shit/zen/modules/impl/combat/AutoOffHand.java b/src/main/java/shit/zen/modules/impl/combat/AutoOffHand.java index bc1e483..7c716e9 100644 --- a/src/main/java/shit/zen/modules/impl/combat/AutoOffHand.java +++ b/src/main/java/shit/zen/modules/impl/combat/AutoOffHand.java @@ -26,7 +26,7 @@ import shit.zen.event.EventTarget; public class AutoOffHand extends Module { public static AutoOffHand INSTANCE; - public enum ItemType { Đ, Ŀ, Ł } + public enum ItemType { SNOWBALL, GAPPLE, NONE } public final NumberSetting range = new NumberSetting("Range", 6.0, 1.0, 12.0, 0.5); public final BooleanSetting gapple = new BooleanSetting("Gapple", true); @@ -51,7 +51,7 @@ public class AutoOffHand extends Module { } boolean nearEnemy = this.isNearEnemy(); ItemType desired = this.getDesiredItemType(nearEnemy); - if (desired == ItemType.Ł) return; + if (desired == ItemType.NONE) return; ItemStack mainHand = mc.player.getMainHandItem(); if (this.isItemOfType(mainHand, desired)) return; ItemStack offHand = mc.player.getOffhandItem(); @@ -96,22 +96,22 @@ public class AutoOffHand extends Module { private ItemType getDesiredItemType(boolean nearEnemy) { if (mc.player.getHealth() < this.health.getValue().doubleValue()) { - if (this.gapple.getValue()) return ItemType.Ŀ; + if (this.gapple.getValue()) return ItemType.GAPPLE; } else if (this.revertOnRegen.getValue() && mc.player.hasEffect(MobEffects.REGENERATION)) { - if (this.snowball.getValue()) return ItemType.Đ; + if (this.snowball.getValue()) return ItemType.SNOWBALL; } else if (nearEnemy) { - if (this.snowball.getValue()) return ItemType.Đ; + if (this.snowball.getValue()) return ItemType.SNOWBALL; } else if (this.gapple.getValue()) { - return ItemType.Ŀ; + return ItemType.GAPPLE; } - return ItemType.Ł; + return ItemType.NONE; } private boolean isItemOfType(ItemStack stack, ItemType type) { if (stack == null || stack.isEmpty()) return false; return switch (type) { - case Đ -> stack.getItem() == Items.SNOWBALL || stack.getItem() == Items.EGG; - case Ŀ -> stack.getItem() == Items.GOLDEN_APPLE || stack.getItem() == Items.ENCHANTED_GOLDEN_APPLE; + case SNOWBALL -> stack.getItem() == Items.SNOWBALL || stack.getItem() == Items.EGG; + case GAPPLE -> stack.getItem() == Items.GOLDEN_APPLE || stack.getItem() == Items.ENCHANTED_GOLDEN_APPLE; default -> false; }; } diff --git a/src/main/java/shit/zen/modules/impl/combat/AutoSoup.java b/src/main/java/shit/zen/modules/impl/combat/AutoSoup.java index 83ffcfa..07d1386 100644 --- a/src/main/java/shit/zen/modules/impl/combat/AutoSoup.java +++ b/src/main/java/shit/zen/modules/impl/combat/AutoSoup.java @@ -15,9 +15,9 @@ import shit.zen.event.EventTarget; public class AutoSoup extends Module { public static AutoSoup INSTANCE; - private final NumberSetting health = new NumberSetting("Health", Integer.valueOf(15), Integer.valueOf(0), Integer.valueOf(20), Integer.valueOf(1)); - private final NumberSetting delay = new NumberSetting("Delay", Integer.valueOf(300), Integer.valueOf(0), Integer.valueOf(1000), Integer.valueOf(1)); - private final NumberSetting switchDelay = new NumberSetting("Switch Delay", Integer.valueOf(100), Integer.valueOf(0), Integer.valueOf(1000), Integer.valueOf(1)); + private final NumberSetting health = new NumberSetting("Health", 15, 0, 20, 1); + private final NumberSetting delay = new NumberSetting("Delay", 300, 0, 1000, 1); + private final NumberSetting switchDelay = new NumberSetting("Switch Delay", 100, 0, 1000, 1); private final BooleanSetting drop = new BooleanSetting("Drop", true); private final Timer switchDelayTimer = new Timer(); private final Timer delayTimer = new Timer(); diff --git a/src/main/java/shit/zen/modules/impl/combat/AutoThrow.java b/src/main/java/shit/zen/modules/impl/combat/AutoThrow.java index 0436829..a156414 100644 --- a/src/main/java/shit/zen/modules/impl/combat/AutoThrow.java +++ b/src/main/java/shit/zen/modules/impl/combat/AutoThrow.java @@ -32,9 +32,9 @@ import shit.zen.event.EventTarget; public class AutoThrow extends Module { public static AutoThrow INSTANCE; - private final NumberSetting minDistance = new NumberSetting("Min Distance", Integer.valueOf(5), Integer.valueOf(3), Integer.valueOf(30), Integer.valueOf(1)); - private final NumberSetting maxDistance = new NumberSetting("Max Distance", Integer.valueOf(10), Integer.valueOf(3), Integer.valueOf(30), Integer.valueOf(1)); - private final NumberSetting throwDelay = new NumberSetting("Delay", Integer.valueOf(500), Integer.valueOf(50), Integer.valueOf(2000), Integer.valueOf(50)); + private final NumberSetting minDistance = new NumberSetting("Min Distance", 5, 3, 30, 1); + private final NumberSetting maxDistance = new NumberSetting("Max Distance", 10, 3, 30, 1); + private final NumberSetting throwDelay = new NumberSetting("Delay", 500, 50, 2000, 50); private final Timer throwTimer = new Timer(); public Rotation targetRotation; public int ticksUntilThrow; diff --git a/src/main/java/shit/zen/modules/impl/exploit/FastPlace.java b/src/main/java/shit/zen/modules/impl/exploit/FastPlace.java index 653b852..a3c5681 100644 --- a/src/main/java/shit/zen/modules/impl/exploit/FastPlace.java +++ b/src/main/java/shit/zen/modules/impl/exploit/FastPlace.java @@ -21,7 +21,7 @@ import shit.zen.event.EventTarget; public class FastPlace extends Module { - private final NumberSetting delay = new NumberSetting("Delay", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(500), Integer.valueOf(10)); + private final NumberSetting delay = new NumberSetting("Delay", 0, 0, 500, 10); private final MultiSelectSetting itemTypes = new MultiSelectSetting("Item Types", "Blocks", "Throwables").withDefaults("Blocks"); private final Timer placeTimer = new Timer(); diff --git a/src/main/java/shit/zen/modules/impl/misc/AimAssist.java b/src/main/java/shit/zen/modules/impl/misc/AimAssist.java index 0638e97..650274a 100644 --- a/src/main/java/shit/zen/modules/impl/misc/AimAssist.java +++ b/src/main/java/shit/zen/modules/impl/misc/AimAssist.java @@ -21,14 +21,14 @@ import shit.zen.event.EventTarget; public class AimAssist extends Module { - private final NumberSetting randomYawOffset = new NumberSetting("Random Yaw Offset", Integer.valueOf(2), Integer.valueOf(0), Integer.valueOf(10), Double.valueOf(0.01)); - private final NumberSetting randomPitchOffset = new NumberSetting("Random Pitch Offset", Float.valueOf(0.075f), Integer.valueOf(0), Integer.valueOf(1), Double.valueOf(0.01)); - private final NumberSetting range = new NumberSetting("Range", Integer.valueOf(5), Integer.valueOf(3), Integer.valueOf(30), Double.valueOf(0.1)); - private final NumberSetting fov = new NumberSetting("Fov", Integer.valueOf(120), Integer.valueOf(1), Integer.valueOf(360), Integer.valueOf(1)); + private final NumberSetting randomYawOffset = new NumberSetting("Random Yaw Offset", 2, 0, 10, 0.01); + private final NumberSetting randomPitchOffset = new NumberSetting("Random Pitch Offset", 0.075f, 0, 1, 0.01); + private final NumberSetting range = new NumberSetting("Range", 5, 3, 30, 0.1); + private final NumberSetting fov = new NumberSetting("Fov", 120, 1, 360, 1); private final BooleanSetting mouseDown = new BooleanSetting("Mouse down", true); private final BooleanSetting adaptive = new BooleanSetting("Adaptive", true); - private final NumberSetting adaptiveOffset = new NumberSetting("Adaptive Offset", Integer.valueOf(3), Float.valueOf(0.1f), Float.valueOf(15.0f), Double.valueOf(0.01)); - private final NumberSetting smoothAmount = new NumberSetting("Smooth amount", Integer.valueOf(15), Float.valueOf(1.0f), Float.valueOf(90.0f), Double.valueOf(0.1)); + private final NumberSetting adaptiveOffset = new NumberSetting("Adaptive Offset", 3, 0.1f, 15.0f, 0.01); + private final NumberSetting smoothAmount = new NumberSetting("Smooth amount", 15, 1.0f, 90.0f, 0.1); private final BooleanSetting breakBlock = new BooleanSetting("Break Block", true); private Vec3 targetOffset; private Vec3 aimOffset; @@ -129,7 +129,7 @@ extends Module { } private void applyRotation(Rotation rotation) { - rotation.snapToSensitivity(Float.valueOf((float) mc.options.sensitivity().get().doubleValue())); + rotation.snapToSensitivity((float) mc.options.sensitivity().get().doubleValue()); float yaw = rotation.getYaw(); float pitch = rotation.getPitch(); mc.player.setXRot(pitch); diff --git a/src/main/java/shit/zen/modules/impl/misc/AutoRod.java b/src/main/java/shit/zen/modules/impl/misc/AutoRod.java index 75d250a..b55557f 100644 --- a/src/main/java/shit/zen/modules/impl/misc/AutoRod.java +++ b/src/main/java/shit/zen/modules/impl/misc/AutoRod.java @@ -17,7 +17,7 @@ public class AutoRod extends Module { public static AutoRod INSTANCE; private final ModeSetting mouseButton = new ModeSetting("Button", "Middle", "Mouse 4", "Mouse 5").withDefault("Mouse 4"); - private final NumberSetting delay = new NumberSetting("Delay", Integer.valueOf(2), Integer.valueOf(0), Integer.valueOf(20), Integer.valueOf(1)); + private final NumberSetting delay = new NumberSetting("Delay", 2, 0, 20, 1); private boolean slotSwitched = false; private boolean isActive = false; private int previousSlot = -1; diff --git a/src/main/java/shit/zen/modules/impl/movement/FastUse.java b/src/main/java/shit/zen/modules/impl/movement/FastUse.java index 82d2dde..3c92dbd 100644 --- a/src/main/java/shit/zen/modules/impl/movement/FastUse.java +++ b/src/main/java/shit/zen/modules/impl/movement/FastUse.java @@ -54,7 +54,7 @@ public class FastUse extends Module implements TripleProvider { public static boolean releaseItemSent; public enum UseState { - Đ, Ŀ, Ł, ŧ + IDLE, WAITING, SWAPPING, USING } public final ModeSetting mode; @@ -101,7 +101,7 @@ public class FastUse extends Module implements TripleProvider { this.pongQueue = new ArrayDeque<>(); this.useHand = InteractionHand.MAIN_HAND; this.lastUseHand = InteractionHand.MAIN_HAND; - this.useState = UseState.Đ; + this.useState = UseState.IDLE; this.savedHotbarSlot = -1; INSTANCE = this; this.checkAndFallbackMode(); @@ -168,10 +168,10 @@ public class FastUse extends Module implements TripleProvider { if (this.isBlinking) { ++this.blinkTicks; } - if ((!this.isGrimSlowMode() || this.bowNoSlow.getValue()) && this.useState != UseState.Đ) { + if ((!this.isGrimSlowMode() || this.bowNoSlow.getValue()) && this.useState != UseState.IDLE) { this.resetOffhandState(); } - if (this.useState == UseState.ŧ) { + if (this.useState == UseState.USING) { if (mc.player.isUsingItem()) { this.idleTickCount = 0; } else if (++this.idleTickCount >= 5) { @@ -363,18 +363,18 @@ public class FastUse extends Module implements TripleProvider { InteractionHand otherHand = mc.player.getUsedItemHand() == InteractionHand.MAIN_HAND ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND; if (this.isUseAnimation(mc.player.getItemInHand(otherHand).getUseAnimation())) { - if (this.useState != UseState.Đ) this.resetOffhandState(); + if (this.useState != UseState.IDLE) this.resetOffhandState(); return; } - if (this.useState != UseState.ŧ) { + if (this.useState != UseState.USING) { mc.options.keyUse.setDown(false); } - if (this.useState == UseState.Đ) { - this.useState = UseState.Ŀ; + if (this.useState == UseState.IDLE) { + this.useState = UseState.WAITING; this.savedHotbarSlot = mc.player.getInventory().selected; return; } - if (this.useState == UseState.ŧ) { + if (this.useState == UseState.USING) { event.setSlowDown(false); if (this.keepSprinting.getValue()) { mc.player.setSprinting(true); @@ -387,11 +387,11 @@ public class FastUse extends Module implements TripleProvider { Packet packet = event.getPacket(); if (!event.isIncoming()) { if (packet instanceof ServerboundPongPacket pong) { - if (this.useState != UseState.Đ) { + if (this.useState != UseState.IDLE) { event.setCancelled(true); this.pongQueue.add(pong); - if (this.useState == UseState.Ŀ) { - this.useState = UseState.Ł; + if (this.useState == UseState.WAITING) { + this.useState = UseState.SWAPPING; this.didSwapOffhand = true; this.sendSwapOffhand(); } @@ -400,19 +400,19 @@ public class FastUse extends Module implements TripleProvider { } if (packet instanceof ServerboundPlayerActionPacket action && action.getAction() == ServerboundPlayerActionPacket.Action.RELEASE_USE_ITEM - && this.useState == UseState.ŧ) { + && this.useState == UseState.USING) { this.resetOffhandState(); } return; } - if (this.useState == UseState.Ł && this.isEquipmentChangePacket(packet)) { + if (this.useState == UseState.SWAPPING && this.isEquipmentChangePacket(packet)) { mc.options.keyUse.setDown(true); - this.useState = UseState.ŧ; + this.useState = UseState.USING; this.idleTickCount = 0; return; } if (packet instanceof ClientboundSetEntityMotionPacket motion - && motion.getId() == mc.player.getId() && this.useState == UseState.ŧ) { + && motion.getId() == mc.player.getId() && this.useState == UseState.USING) { mc.options.keyUse.setDown(false); } } @@ -451,7 +451,7 @@ public class FastUse extends Module implements TripleProvider { } private void resetOffhandState() { - if (this.useState == UseState.Đ && this.pongQueue.isEmpty() && !this.didSwapOffhand) { + if (this.useState == UseState.IDLE && this.pongQueue.isEmpty() && !this.didSwapOffhand) { this.clearOffhandQueue(); return; } @@ -472,7 +472,7 @@ public class FastUse extends Module implements TripleProvider { private void clearOffhandQueue() { this.pongQueue.clear(); - this.useState = UseState.Đ; + this.useState = UseState.IDLE; this.didSwapOffhand = false; this.idleTickCount = 0; this.savedHotbarSlot = -1; diff --git a/src/main/java/shit/zen/modules/impl/movement/TargetStrafe.java b/src/main/java/shit/zen/modules/impl/movement/TargetStrafe.java index e1083c9..40e4e09 100644 --- a/src/main/java/shit/zen/modules/impl/movement/TargetStrafe.java +++ b/src/main/java/shit/zen/modules/impl/movement/TargetStrafe.java @@ -19,8 +19,8 @@ extends Module { public static TargetStrafe INSTANCE; private final Timer collisionTimer = new Timer(); private final BooleanSetting smartStrafe = new BooleanSetting("Jump Key Only", true); - private final NumberSetting range = new NumberSetting("Range", Float.valueOf(0.5f), Float.valueOf(0.1f), Float.valueOf(2.0f), Float.valueOf(0.1f)); - private final NumberSetting switchDelay = new NumberSetting("Switch Delay", Integer.valueOf(1000), Integer.valueOf(100), Integer.valueOf(5000), Integer.valueOf(100)); + private final NumberSetting range = new NumberSetting("Range", 0.5f, 0.1f, 2.0f, 0.1f); + private final NumberSetting switchDelay = new NumberSetting("Switch Delay", 1000, 100, 5000, 100); public static int strafeDirectionSign; public static Entity strafeTarget; private final Timer switchTimer = new Timer(); diff --git a/src/main/java/shit/zen/modules/impl/player/AntiTNT.java b/src/main/java/shit/zen/modules/impl/player/AntiTNT.java index 2313449..88210a0 100644 --- a/src/main/java/shit/zen/modules/impl/player/AntiTNT.java +++ b/src/main/java/shit/zen/modules/impl/player/AntiTNT.java @@ -115,7 +115,7 @@ extends Module { RenderUtil.drawOutlineBox(aABB, poseStack); float fuseSeconds = (float)this.targetTnt.getFuse() / 20.0f; if (fuseSeconds > 0.0f) { - String fuseLabel = String.format("%.1fs", new Object[]{Float.valueOf(fuseSeconds)}); + String fuseLabel = String.format("%.1fs", new Object[]{fuseSeconds}); BlockPos tntPos = this.targetTnt.blockPosition(); poseStack.pushPose(); poseStack.translate((double)tntPos.getX() + 0.5 - vec3.x, (double)tntPos.getY() + 1.1 - vec3.y, (double)tntPos.getZ() + 0.5 - vec3.z); diff --git a/src/main/java/shit/zen/modules/impl/player/AntiVoid.java b/src/main/java/shit/zen/modules/impl/player/AntiVoid.java index 1e08948..600b34b 100644 --- a/src/main/java/shit/zen/modules/impl/player/AntiVoid.java +++ b/src/main/java/shit/zen/modules/impl/player/AntiVoid.java @@ -25,7 +25,7 @@ import shit.zen.event.EventTarget; public class AntiVoid extends Module { public static AntiVoid INSTANCE; - private final NumberSetting fallDistanceSetting = new NumberSetting("Fall Distance", Double.valueOf(5.0), Double.valueOf(1.0), Double.valueOf(10.0), Double.valueOf(0.5)); + private final NumberSetting fallDistanceSetting = new NumberSetting("Fall Distance", 5.0, 1.0, 10.0, 0.5); private final LinkedBlockingDeque> bufferedPackets = new LinkedBlockingDeque(); private boolean scaffoldWasActive = false; public boolean bufferingPackets = false; diff --git a/src/main/java/shit/zen/modules/impl/player/AntiWeb.java b/src/main/java/shit/zen/modules/impl/player/AntiWeb.java index 217b0c5..769eeed 100644 --- a/src/main/java/shit/zen/modules/impl/player/AntiWeb.java +++ b/src/main/java/shit/zen/modules/impl/player/AntiWeb.java @@ -30,11 +30,9 @@ public class AntiWeb extends Module { public static AntiWeb INSTANCE; public static Rotation targetRotation; - public enum Phase { Đ, Ŀ, Ł; - public static final Phase IDLE = Đ; - } + public enum Phase { IDLE, PLACING, RECYCLING } - public static Phase currentPhase = Phase.Đ; + public static Phase currentPhase = Phase.IDLE; private final TickTimer webCheckTimer = new TickTimer(); private final TickTimer placementTimer = new TickTimer(); @@ -124,11 +122,11 @@ public class AntiWeb extends Module { if (mc.player == null || mc.level == null || mc.gameMode == null) return; if (!event.isPost()) return; - if (currentPhase == Phase.Ŀ && mc.level.getBlockState(this.webPos).is(Blocks.WATER)) { + if (currentPhase == Phase.PLACING && mc.level.getBlockState(this.webPos).is(Blocks.WATER)) { this.waterSourcePos = this.findNearestWaterSource(this.webPos); if (this.waterSourcePos != null) { Helper.markWaterPlaced(this.waterSourcePos); - currentPhase = Phase.Ł; + currentPhase = Phase.RECYCLING; this.sentUsePacket = false; this.placementTimer.reset(); this.pickupTimer.reset(); @@ -139,13 +137,13 @@ public class AntiWeb extends Module { } switch (currentPhase) { - case Đ -> { + case IDLE -> { if (mc.player.isInWater() || !this.webCheckTimer.hasPassed(5) || !this.isInCobweb()) return; this.waterBucketSlot = ItemUtil.getSlot(Items.WATER_BUCKET); if (this.waterBucketSlot == -1 || this.waterBucketSlot > 8) return; - currentPhase = Phase.Ŀ; + currentPhase = Phase.PLACING; } - case Ŀ -> { + case PLACING -> { if (!this.isInCobweb()) { this.reset(); return; @@ -164,7 +162,7 @@ public class AntiWeb extends Module { PacketUtil.sendPredictive(n -> new ServerboundUseItemPacket(InteractionHand.MAIN_HAND, n)); this.sentUsePacket = true; } - case Ł -> { + case RECYCLING -> { if (this.pickupTimer.hasPassed(20)) { ChatUtil.print("§cPickup water timeout after 20 ticks, giving up!"); this.reset(); @@ -201,7 +199,7 @@ public class AntiWeb extends Module { @EventTarget public void onRender(RenderEvent renderEvent) { - if (currentPhase == Phase.Đ || mc.gameRenderer == null) return; + if (currentPhase == Phase.IDLE || mc.gameRenderer == null) return; PoseStack poseStack = renderEvent.poseStack(); Vec3 camera = mc.gameRenderer.getMainCamera().getPosition(); poseStack.pushPose(); @@ -218,7 +216,7 @@ public class AntiWeb extends Module { RenderSystem.setShaderColor(color.getRed() / 255.0f, color.getGreen() / 255.0f, color.getBlue() / 255.0f, 0.75f); RenderUtil.drawOutlineBox(box, poseStack); } - if (this.waterSourcePos != null && currentPhase == Phase.Ł) { + if (this.waterSourcePos != null && currentPhase == Phase.RECYCLING) { AABB box = new AABB(this.waterSourcePos); Color color = new Color(0, 255, 0); RenderSystem.setShaderColor(color.getRed() / 255.0f, color.getGreen() / 255.0f, color.getBlue() / 255.0f, 0.25f); @@ -242,7 +240,7 @@ public class AntiWeb extends Module { PlayerUtil.sendCarriedItem(); this.savedHotbarSlot = -1; } - currentPhase = Phase.Đ; + currentPhase = Phase.IDLE; targetRotation = null; this.webPos = null; this.waterSourcePos = null; diff --git a/src/main/java/shit/zen/modules/impl/player/AutoMLG.java b/src/main/java/shit/zen/modules/impl/player/AutoMLG.java index 48334c4..8a5b338 100644 --- a/src/main/java/shit/zen/modules/impl/player/AutoMLG.java +++ b/src/main/java/shit/zen/modules/impl/player/AutoMLG.java @@ -23,8 +23,8 @@ import shit.zen.event.EventTarget; public class AutoMLG extends Module { public static AutoMLG INSTANCE; - private final NumberSetting triggerDistanceSetting = new NumberSetting("Fall distance", Float.valueOf(3.0f), Float.valueOf(1.0f), Float.valueOf(10.0f), Float.valueOf(0.1f)); - private final NumberSetting predictTicksSetting = new NumberSetting("Predict Ticks", Float.valueOf(2.0f), Float.valueOf(1.0f), Float.valueOf(5.0f), Float.valueOf(1.0f)); + private final NumberSetting triggerDistanceSetting = new NumberSetting("Fall distance", 3.0f, 1.0f, 10.0f, 0.1f); + private final NumberSetting predictTicksSetting = new NumberSetting("Predict Ticks", 2.0f, 1.0f, 5.0f, 1.0f); private final BooleanSetting solidCheckSetting = new BooleanSetting("Solid check", true); private final BooleanSetting recoverySetting = new BooleanSetting("Recorvey", true); public Rotation targetRotation = null; diff --git a/src/main/java/shit/zen/modules/impl/player/ChestStealer.java b/src/main/java/shit/zen/modules/impl/player/ChestStealer.java index a064ea6..82bcde8 100644 --- a/src/main/java/shit/zen/modules/impl/player/ChestStealer.java +++ b/src/main/java/shit/zen/modules/impl/player/ChestStealer.java @@ -55,8 +55,8 @@ extends Module { public static ChestStealer INSTANCE; private static final Timer actionTimer; - private final NumberSetting clickDelaySetting = new NumberSetting("Delay", Integer.valueOf(200), Integer.valueOf(0), Integer.valueOf(1000), Integer.valueOf(10)); - private final NumberSetting openDelaySetting = new NumberSetting("Open Delay", Integer.valueOf(2), Integer.valueOf(0), Integer.valueOf(10), Integer.valueOf(1)); + private final NumberSetting clickDelaySetting = new NumberSetting("Delay", 200, 0, 1000, 10); + private final NumberSetting openDelaySetting = new NumberSetting("Open Delay", 2, 0, 10, 1); private final BooleanSetting chestSetting = new BooleanSetting("Chest", true); private final BooleanSetting enderChestSetting = new BooleanSetting("Ender Chest", false); private final BooleanSetting furnaceSetting = new BooleanSetting("Furnace", true); diff --git a/src/main/java/shit/zen/modules/impl/player/InventoryManager.java b/src/main/java/shit/zen/modules/impl/player/InventoryManager.java index e46e7d8..59a62a8 100644 --- a/src/main/java/shit/zen/modules/impl/player/InventoryManager.java +++ b/src/main/java/shit/zen/modules/impl/player/InventoryManager.java @@ -63,30 +63,30 @@ import shit.zen.event.EventTarget; public class InventoryManager extends Module { public static InventoryManager INSTANCE; - private final NumberSetting actionDelaySetting = new NumberSetting("Delay", Integer.valueOf(200), Integer.valueOf(0), Integer.valueOf(500), Integer.valueOf(10)); - private final NumberSetting sprintDelayTicksSetting = new NumberSetting("Open Delay", Integer.valueOf(2), Integer.valueOf(0), Integer.valueOf(10), Integer.valueOf(1)); - private final NumberSetting dropDelaySetting = new NumberSetting("Drop Delay", Integer.valueOf(200), Integer.valueOf(0), Integer.valueOf(500), Integer.valueOf(10)); + private final NumberSetting actionDelaySetting = new NumberSetting("Delay", 200, 0, 500, 10); + private final NumberSetting sprintDelayTicksSetting = new NumberSetting("Open Delay", 2, 0, 10, 1); + private final NumberSetting dropDelaySetting = new NumberSetting("Drop Delay", 200, 0, 500, 10); private final BooleanSetting autoArmorSetting = new BooleanSetting("Auto Armor", true); private final BooleanSetting throwItemsSetting = new BooleanSetting("Throw Items", true); private final ModeSetting offhandItemSetting = new ModeSetting("Offhand Items", "Golden Apple", "Fishing Rod", "None").withDefault("Projectile"); private final ModeSetting bowPrioritySetting = new ModeSetting("Bow Priority", "Crossbow", "Punch Bow").withDefault("Crossbow"); private final BooleanSetting inventoryOnlySetting = new BooleanSetting("Inventory Only", true); private final BooleanSetting fastThrowSetting = new BooleanSetting("Fast Throw", false); - private final NumberSetting maxEggsSnowballsSetting = new NumberSetting("Max Eggs & Snowballs Size", Integer.valueOf(64), Integer.valueOf(16), Integer.valueOf(256), Integer.valueOf(16)); - public final NumberSetting maxBlockSizeSetting = new NumberSetting("Max Block Size", Integer.valueOf(256), Integer.valueOf(64), Integer.valueOf(512), Integer.valueOf(64)); - private final NumberSetting maxFoodSizeSetting = new NumberSetting("Max Food Size", Integer.valueOf(128), Integer.valueOf(32), Integer.valueOf(256), Integer.valueOf(32)); - private final NumberSetting maxRodSizeSetting = new NumberSetting("Max Rod Size", Integer.valueOf(1), Integer.valueOf(1), Integer.valueOf(16), Integer.valueOf(1)); - private final NumberSetting swordSlotSetting = new NumberSetting("Sword Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting blockSlotSetting = new NumberSetting("Block Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting axeSlotSetting = new NumberSetting("Axe Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting pickaxeSlotSetting = new NumberSetting("Pickaxe Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting bowSlotSetting = new NumberSetting("Bow Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting waterBucketSlotSetting = new NumberSetting("Water Bucket Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting pearlSlotSetting = new NumberSetting("Ender Pearl Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting goldenAppleSlotSetting = new NumberSetting("Golden Apple Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting eggsSnowballsSlotSetting = new NumberSetting("Eggs & Snowballs Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting slimeBallSlotSetting = new NumberSetting("Slime Ball Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); - private final NumberSetting crystalSlotSetting = new NumberSetting("Crystal Slot", Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(9), Integer.valueOf(1)); + private final NumberSetting maxEggsSnowballsSetting = new NumberSetting("Max Eggs & Snowballs Size", 64, 16, 256, 16); + public final NumberSetting maxBlockSizeSetting = new NumberSetting("Max Block Size", 256, 64, 512, 64); + private final NumberSetting maxFoodSizeSetting = new NumberSetting("Max Food Size", 128, 32, 256, 32); + private final NumberSetting maxRodSizeSetting = new NumberSetting("Max Rod Size", 1, 1, 16, 1); + private final NumberSetting swordSlotSetting = new NumberSetting("Sword Slot", 0, 0, 9, 1); + private final NumberSetting blockSlotSetting = new NumberSetting("Block Slot", 0, 0, 9, 1); + private final NumberSetting axeSlotSetting = new NumberSetting("Axe Slot", 0, 0, 9, 1); + private final NumberSetting pickaxeSlotSetting = new NumberSetting("Pickaxe Slot", 0, 0, 9, 1); + private final NumberSetting bowSlotSetting = new NumberSetting("Bow Slot", 0, 0, 9, 1); + private final NumberSetting waterBucketSlotSetting = new NumberSetting("Water Bucket Slot", 0, 0, 9, 1); + private final NumberSetting pearlSlotSetting = new NumberSetting("Ender Pearl Slot", 0, 0, 9, 1); + private final NumberSetting goldenAppleSlotSetting = new NumberSetting("Golden Apple Slot", 0, 0, 9, 1); + private final NumberSetting eggsSnowballsSlotSetting = new NumberSetting("Eggs & Snowballs Slot", 0, 0, 9, 1); + private final NumberSetting slimeBallSlotSetting = new NumberSetting("Slime Ball Slot", 0, 0, 9, 1); + private final NumberSetting crystalSlotSetting = new NumberSetting("Crystal Slot", 0, 0, 9, 1); private static final Timer actionTimer; private boolean didInventoryAction = false; private boolean pendingOffhandPlace = false; diff --git a/src/main/java/shit/zen/modules/impl/player/NoFall.java b/src/main/java/shit/zen/modules/impl/player/NoFall.java index 0cec871..e118dda 100644 --- a/src/main/java/shit/zen/modules/impl/player/NoFall.java +++ b/src/main/java/shit/zen/modules/impl/player/NoFall.java @@ -17,7 +17,7 @@ import shit.zen.event.EventTarget; public class NoFall extends Module { public static NoFall INSTANCE; - private final NumberSetting fallDistanceSetting = new NumberSetting("Fall Distance", Double.valueOf(3.0), Double.valueOf(0.0), Double.valueOf(10.0), Double.valueOf(0.5)); + private final NumberSetting fallDistanceSetting = new NumberSetting("Fall Distance", 3.0, 0.0, 10.0, 0.5); private boolean isFalling = false; private boolean sentFlyPacket = false; public boolean jumpLandingBoost = false; diff --git a/src/main/java/shit/zen/modules/impl/render/AspectRatio.java b/src/main/java/shit/zen/modules/impl/render/AspectRatio.java index 80e6f14..fe02f7d 100644 --- a/src/main/java/shit/zen/modules/impl/render/AspectRatio.java +++ b/src/main/java/shit/zen/modules/impl/render/AspectRatio.java @@ -7,7 +7,7 @@ import shit.zen.settings.impl.NumberSetting; public class AspectRatio extends Module { public static AspectRatio INSTANCE; - public final NumberSetting ratioSetting = new NumberSetting("Ratio", Float.valueOf(1.78f), Float.valueOf(0.1f), Float.valueOf(5.0f), Float.valueOf(0.1f)); + public final NumberSetting ratioSetting = new NumberSetting("Ratio", 1.78f, 0.1f, 5.0f, 0.1f); public AspectRatio() { super("AspectRatio", Category.RENDER); diff --git a/src/main/java/shit/zen/modules/impl/render/ESP.java b/src/main/java/shit/zen/modules/impl/render/ESP.java index f01e678..cc45631 100644 --- a/src/main/java/shit/zen/modules/impl/render/ESP.java +++ b/src/main/java/shit/zen/modules/impl/render/ESP.java @@ -43,7 +43,7 @@ public class ESP extends Module { public record Pair(A first, B second) { - public static Pair Đ(A a, B b) { + public static Pair of(A a, B b) { return new Pair<>(a, b); } } @@ -148,7 +148,7 @@ public class ESP extends Module { } int pad = 3; Vector4d box = new Vector4d((int) (minX - pad), (int) (minY - pad), (int) (maxX - minX + pad * 2), (int) (maxY - minY + pad * 2)); - this.entityBoxPositions.put(entity, Pair.Đ(box, true)); + this.entityBoxPositions.put(entity, Pair.of(box, true)); } } diff --git a/src/main/java/shit/zen/modules/impl/render/FullBright.java b/src/main/java/shit/zen/modules/impl/render/FullBright.java index 6961c18..0f990b2 100644 --- a/src/main/java/shit/zen/modules/impl/render/FullBright.java +++ b/src/main/java/shit/zen/modules/impl/render/FullBright.java @@ -10,7 +10,7 @@ public class FullBright extends Module implements TripleProvider { public static FullBright INSTANCE; - public final NumberSetting brightnessSetting = new NumberSetting("Brightness", Float.valueOf(100.0f), Float.valueOf(0.0f), Float.valueOf(100.0f), Float.valueOf(1.0f)); + public final NumberSetting brightnessSetting = new NumberSetting("Brightness", 100.0f, 0.0f, 100.0f, 1.0f); public FullBright() { super("FullBright", Category.RENDER); diff --git a/src/main/java/shit/zen/modules/impl/render/OldHitting.java b/src/main/java/shit/zen/modules/impl/render/OldHitting.java index 4085c7b..5193a03 100644 --- a/src/main/java/shit/zen/modules/impl/render/OldHitting.java +++ b/src/main/java/shit/zen/modules/impl/render/OldHitting.java @@ -13,9 +13,9 @@ import shit.zen.settings.impl.NumberSetting; public class OldHitting extends Module { private final ModeSetting animationModeSetting = new ModeSetting("Animation", "Vanilla", "Leaked", "Slide").withDefault("Leaked"); - private final NumberSetting sizeSetting = new NumberSetting("Size", Double.valueOf(1.0), Double.valueOf(0.1), Double.valueOf(3.0), Double.valueOf(0.1)); - private final NumberSetting speedSetting = new NumberSetting("Speed", Double.valueOf(1.0), Double.valueOf(0.1), Double.valueOf(5.0), Double.valueOf(0.1)); - private final NumberSetting yOffsetSetting = new NumberSetting("Y-Offset", Double.valueOf(0.0), Double.valueOf(-1.0), Double.valueOf(1.0), Double.valueOf(0.1)); + private final NumberSetting sizeSetting = new NumberSetting("Size", 1.0, 0.1, 3.0, 0.1); + private final NumberSetting speedSetting = new NumberSetting("Speed", 1.0, 0.1, 5.0, 0.1); + private final NumberSetting yOffsetSetting = new NumberSetting("Y-Offset", 0.0, -1.0, 1.0, 0.1); public static OldHitting INSTANCE; public OldHitting() { diff --git a/src/main/java/shit/zen/modules/impl/world/AutoPlay.java b/src/main/java/shit/zen/modules/impl/world/AutoPlay.java index 9531a2f..8c247a5 100644 --- a/src/main/java/shit/zen/modules/impl/world/AutoPlay.java +++ b/src/main/java/shit/zen/modules/impl/world/AutoPlay.java @@ -13,7 +13,7 @@ import shit.zen.event.EventTarget; public class AutoPlay extends Module { public static AutoPlay instance; - private final NumberSetting delay = new NumberSetting("Delay", Double.valueOf(2.0), Double.valueOf(0.0), Double.valueOf(10.0), Double.valueOf(0.1)); + private final NumberSetting delay = new NumberSetting("Delay", 2.0, 0.0, 10.0, 0.1); public long disconnectTime = -1L; public boolean pendingDisconnect = false; public long reconnectTime = -1L; diff --git a/src/main/java/shit/zen/render/BlurFactory.java b/src/main/java/shit/zen/render/BlurFactory.java index 09f94ee..4d6a22d 100644 --- a/src/main/java/shit/zen/render/BlurFactory.java +++ b/src/main/java/shit/zen/render/BlurFactory.java @@ -2,7 +2,7 @@ package shit.zen.render; public final class BlurFactory { - public enum BlurType { Đ, Ŀ, Ł, ŧ } + public enum BlurType { NORMAL, INNER, OUTER, SOLID } public static Paint.BlurMaskFilter createBlurMaskFilter(BlurType blurType, float radius) { return new Paint.BlurMaskFilter(radius); diff --git a/src/main/java/shit/zen/utils/game/RotationUtil.java b/src/main/java/shit/zen/utils/game/RotationUtil.java index 15c27c4..f987622 100644 --- a/src/main/java/shit/zen/utils/game/RotationUtil.java +++ b/src/main/java/shit/zen/utils/game/RotationUtil.java @@ -58,7 +58,7 @@ extends ClientBase { targetYaw += (float)((Math.random() - 0.5) / 1.0E8); targetPitch -= (float)(Math.random() / 2.0E8); } - if ((snapped = (candidate = new Rotation(targetYaw, targetPitch)).snapToSensitivity(Float.valueOf(mc.options.sensitivity().get().floatValue()))) == null) continue; + if ((snapped = (candidate = new Rotation(targetYaw, targetPitch)).snapToSensitivity(mc.options.sensitivity().get().floatValue())) == null) continue; targetYaw = snapped.getYaw(); targetPitch = Mth.clamp(snapped.getPitch(), -90.0f, 90.0f); } @@ -167,7 +167,7 @@ extends ClientBase { } public static List getEyeHeights() { - return List.of(Float.valueOf(mc.player.getEyeHeight())); + return List.of(mc.player.getEyeHeight()); } public static double getMinHitDistance(Entity entity, Rotation rotation) { diff --git a/src/main/java/shit/zen/utils/render/ProjectionUtil.java b/src/main/java/shit/zen/utils/render/ProjectionUtil.java index 73ec7c1..0306fc2 100644 --- a/src/main/java/shit/zen/utils/render/ProjectionUtil.java +++ b/src/main/java/shit/zen/utils/render/ProjectionUtil.java @@ -60,7 +60,7 @@ extends ClientBase { try { Method method = mc.gameRenderer.getClass().getDeclaredMethod(ReflectionUtil.getMappedMethodName(mc.gameRenderer.getClass(), "getFov", "(Lnet/minecraft/client/Camera;FZ)D"), Camera.class, Float.TYPE, Boolean.TYPE); method.setAccessible(true); - fov = (Double)method.invoke(mc.gameRenderer, new Object[]{mc.getEntityRenderDispatcher().camera, Float.valueOf(partialTicks), true}); + fov = (Double)method.invoke(mc.gameRenderer, new Object[]{mc.getEntityRenderDispatcher().camera, partialTicks, true}); } catch (Exception exception) { exception.printStackTrace(); } diff --git a/src/main/java/shit/zen/utils/rotation/Rotation.java b/src/main/java/shit/zen/utils/rotation/Rotation.java index d9c9ccb..59ee3e5 100644 --- a/src/main/java/shit/zen/utils/rotation/Rotation.java +++ b/src/main/java/shit/zen/utils/rotation/Rotation.java @@ -25,7 +25,7 @@ public class Rotation { public Runnable task; @Getter @Setter public Runnable postTask; - static final boolean Đ = true; + static final boolean ASSERTIONS_DISABLED = true; public Rotation() { this.yaw = 0.0f; @@ -83,7 +83,7 @@ public class Rotation { if (Float.isNaN(this.yaw) || Float.isNaN(this.pitch)) { return; } - this.snapToSensitivity(Float.valueOf(ClientBase.mc.options.sensitivity().get().floatValue())); + this.snapToSensitivity(ClientBase.mc.options.sensitivity().get().floatValue()); player.setYRot(this.yaw); player.setXRot(this.pitch); } @@ -121,7 +121,7 @@ public class Rotation { float stepped = Rotation.moveTowards(current, target, speed + RandomUtils.nextFloat(0.0f, 15.0f)); double diff = Mth.wrapDegrees(target - current); if ((double)(-speed) > diff || diff > (double)speed) { - if (!Đ && ClientBase.mc.player == null) { + if (!ASSERTIONS_DISABLED && ClientBase.mc.player == null) { throw new AssertionError(); } stepped += (float)((double)RandomUtils.nextFloat(1.0f, 2.0f) * Math.sin((double)ClientBase.mc.player.getXRot() * Math.PI));