Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0354e0a
Turning insane
Leonn170709 Jul 5, 2026
bab7981
It starts
Leonn170709 Jul 5, 2026
975929f
Launches and works. Not usable tho
Leonn170709 Jul 5, 2026
732c2b0
ihate shaders
Leonn170709 Jul 6, 2026
c9ed766
I hate rendering and shaders (desperate try)
Leonn170709 Jul 6, 2026
d30c5bd
Added more esp modes (I hate rendering V2)
Leonn170709 Jul 6, 2026
1e5ff05
Delet delet delet. (Shoudl have been in ignore lol)
Leonn170709 Jul 6, 2026
b3dfe48
Remove claude files (cleaner now)
Leonn170709 Jul 6, 2026
4a7e825
Now they are in gitignore
Leonn170709 Jul 6, 2026
eb114c4
Create TODO.md
Leonn170709 Jul 6, 2026
50361ee
Add Meteor-style AntiHunger implementation alongside the legacy one
Leonn170709 Jul 7, 2026
bcf5ee2
Add Meteor's Packet/UpdatedNCP/OldNCP crit modes to Criticals
Leonn170709 Jul 7, 2026
0f1cff3
Make ClickGUI category windows scrollable
Leonn170709 Jul 7, 2026
d01e9fa
Add a configurable Scale setting to the ClickGui module
Leonn170709 Jul 7, 2026
482216e
Wrap ClickGUI category tabs into a new column instead of running off-…
Leonn170709 Jul 7, 2026
88ad9cf
Flight: zero fall distance every tick, fix Y/Z typo in Packet AntiKick
Leonn170709 Jul 7, 2026
9794406
Add NoGround mode to Nofall
Leonn170709 Jul 7, 2026
b6e9c93
Add a Friends menu tab
Leonn170709 Jul 7, 2026
d59adb1
Fix unreadable/mismatched module descriptions
Leonn170709 Jul 7, 2026
8607b3e
Only handle module keybinds/quick-prefix while no screen is open
Leonn170709 Jul 7, 2026
0adbd58
Fix PacketFly's Packet mode and Ambience's sky color/thunder tracking
Leonn170709 Jul 7, 2026
d35996c
Fix text field focus, Ambience chunk staleness, and Xray face culling
Leonn170709 Jul 7, 2026
ea45690
Implement Ambience's End Skybox toggle
Leonn170709 Jul 7, 2026
d762671
Massive improvements (still working on crystal aura)
Leonn170709 Jul 7, 2026
9102dc3
Used meteors air place. Optimized Support placing
Leonn170709 Jul 7, 2026
fe217fc
Fix shader render
Leonn170709 Jul 7, 2026
2ac9cfb
Updated New Chunks to use palette and fixed shader renderer again
Leonn170709 Jul 7, 2026
a64c590
Make commands a bit better
Leonn170709 Jul 9, 2026
8923b6e
Update CmdModuleSettings.java
Leonn170709 Jul 9, 2026
3f70eb7
Fix saves and the search bar keybind
Leonn170709 Jul 12, 2026
70d307b
Blocked server bypass
Leonn170709 Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ bin/

# fabric

run/
run/
/commands
/.claude
CLAUDE.md
9 changes: 9 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# TODO

- [x] Port `NewerNewChunks` from Trouser-Streak into the existing `New Chunks` module.
- Source: https://github.com/etianl/Trouser-Streak/blob/main/src/main/java/pwn/noobs/trouserstreak/modules/NewerNewChunks.java
- [x] Keep the current implementation as an **Old** mode.
- [x] Add the Trouser-Streak implementation as a **New** mode.
- [x] Reuse existing settings wherever possible instead of duplicating them.
- [x] Simplify the settings by removing unnecessary options and combining equivalent ones where appropriate.
- [x] Preserve all functionality from both implementations.
20 changes: 12 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
plugins {
id "fabric-loom" version "1.1-SNAPSHOT"
id "net.fabricmc.fabric-loom-remap" version "1.17-SNAPSHOT"
id "maven-publish"
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
base {
archivesName = project.archives_base_name
}
version = project.mod_version
group = project.maven_group

Expand Down Expand Up @@ -44,20 +43,25 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
// Minecraft 1.20.5 (1.20.5-pre1) upwards uses Java 21.
it.options.release = 21
// ponytail: raised during the 1.21.11 port to see all errors per pass instead of the first 100; revert once green.
it.options.compilerArgs << "-Xmaxerrs" << "10000"
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

jar {
from("LICENSE") {
rename { "${it}-${project.archivesBaseName}"}
rename { "${it}-${project.archives_base_name}"}
}
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/use

minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.17
minecraft_version=1.21.11
yarn_mappings=1.21.11+build.6
loader_version=0.19.3

# Mod Properties
mod_version = 1.2.6
maven_group = org.bleachhack
archives_base_name = bleachhack

# Fabric api
# fabric_version = 0.76.0+1.19.4
# fabric_version = 0.141.4+1.21.11
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Empty file modified gradlew
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/main/java/org/bleachhack/BleachHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void onInitialize() {
BleachFileHelper.readFriends();

if (Option.GENERAL_CHECK_FOR_UPDATES.getValue()) {
updateJson = BleachOnlineMang.getResourceAsync("update/" + SharedConstants.getGameVersion().getName().replace(' ', '_') + ".json", BodyHandlers.ofString())
updateJson = BleachOnlineMang.getResourceAsync("update/" + SharedConstants.getGameVersion().name().replace(' ', '_') + ".json", BodyHandlers.ofString())
.thenApply(s -> BleachJsonHelper.parseOrNull(s, JsonObject.class));
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bleachhack/command/CommandManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void callCommand(String input) {

BleachLogger.info(
text.styled(style -> style
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, c.getHelpTooltip()))));
.withHoverEvent(new HoverEvent.ShowText(c.getHelpTooltip()))));
} catch (Exception e) {
e.printStackTrace();

Expand Down
40 changes: 30 additions & 10 deletions src/main/java/org/bleachhack/command/CommandSuggestor.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;

import org.bleachhack.BleachHack;
import org.bleachhack.event.events.EventKeyPress;
Expand All @@ -14,10 +15,10 @@
import org.lwjgl.glfw.GLFW;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawableHelper;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.network.PlayerListEntry;

public class CommandSuggestor {

Expand Down Expand Up @@ -61,7 +62,9 @@ public void onDrawOverlay(EventRenderInGameHud event) {
curText = text;

if (text.startsWith(Command.getPrefix())) {
suggestions.addAll(CommandManager.getSuggestionProvider().getSuggestions(text.substring(Command.getPrefix().length()).split(" ", -1)));
String[] typed = text.substring(Command.getPrefix().length()).split(" ", -1);
suggestions.addAll(CommandManager.getSuggestionProvider().getSuggestions(typed));
addOnlinePlayerSuggestions(typed);
}

selected = 0;
Expand All @@ -80,9 +83,6 @@ public void onDrawOverlay(EventRenderInGameHud event) {
}

if (!suggestions.isEmpty()) {
event.getMatrix().push();
event.getMatrix().translate(0, 0, 200);

int length = suggestions.stream()
.map(s -> MinecraftClient.getInstance().textRenderer.getWidth(s))
.min(Comparator.reverseOrder()).orElse(0);
Expand All @@ -93,14 +93,12 @@ public void onDrawOverlay(EventRenderInGameHud event) {
for (int i = scroll; i < suggestions.size() && i < scroll + 10; i++) {
String suggestion = suggestions.get(i);

DrawableHelper.fill(event.getMatrix(), startX, startY, startX + length + 2, startY + 12, 0xd0000000);
MinecraftClient.getInstance().textRenderer.drawWithShadow(
event.getMatrix(), suggestion, startX + 1, startY + 2, i == selected ? 0xffff00: 0xb0b0b0);
event.getMatrix().fill(startX, startY, startX + length + 2, startY + 12, 0xd0000000);
event.getMatrix().drawTextWithShadow(MinecraftClient.getInstance().textRenderer,
suggestion, startX + 1, startY + 2, i == selected ? 0xffff00: 0xb0b0b0);

startY += 12;
}

event.getMatrix().pop();
}
}
}
Expand Down Expand Up @@ -137,6 +135,28 @@ public void onKeyPressChat(EventKeyPress.InChat event) {
}
}

// "$friends add <user>"/"$friend add <user>" - CommandSuggestionProvider only knows the
// "<user>" placeholder from the syntax string, so swap it for real, currently-online names.
private void addOnlinePlayerSuggestions(String[] typed) {
if (typed.length != 3 || !typed[1].equalsIgnoreCase("add")
|| !(typed[0].equalsIgnoreCase("friends") || typed[0].equalsIgnoreCase("friend"))
|| MinecraftClient.getInstance().getNetworkHandler() == null) {
return;
}

suggestions.removeIf(s -> s.matches("^<.*>$"));

String prefix = typed[2].toLowerCase(Locale.ENGLISH);
for (PlayerListEntry entry : MinecraftClient.getInstance().getNetworkHandler().getPlayerList()) {
String name = entry.getProfile().name();
if (name.toLowerCase(Locale.ENGLISH).startsWith(prefix)) {
suggestions.add(name);
}
}

suggestions.sort(String.CASE_INSENSITIVE_ORDER);
}

private void updateScroll() {
if (scroll > selected) {
scroll = Math.max(selected, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public class CmdClickGui extends Command {

public CmdClickGui() {
super("clickgui", "Modify the clickgui windows.", "clickgui reset [open/closed] | clickgui length <length>", CommandCategory.MODULES);
super("clickgui", "Modify the clickgui windows, or change any other setting by name (e.g. \"$clickgui scale 150\").", "clickgui reset [open/closed] | clickgui length <length> | clickgui <setting> <value>", CommandCategory.MODULES);
}

@Override
Expand Down Expand Up @@ -71,7 +71,9 @@ public void onCommand(String alias, String[] args) throws Exception {

BleachLogger.info("Set the clickgui length to: " + args[1]);
} else {
throw new CmdSyntaxException();
// "reset" and "length" above are this command's own subcommands, anything else falls
// through to the generic module-settings handler (e.g. "clickgui scale 150").
CmdModuleSettings.applyArgs(ModuleManager.getModule(ClickGui.class), args);
}
}

Expand Down
47 changes: 24 additions & 23 deletions src/main/java/org/bleachhack/command/commands/CmdEnchant.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
import java.util.Map;
import java.util.Map.Entry;

import net.minecraft.registry.Registries;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.ItemEnchantmentsComponent;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.entry.RegistryEntry;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.bleachhack.command.Command;
Expand All @@ -23,8 +28,6 @@
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtList;

import net.minecraft.text.MutableText;
import net.minecraft.text.Style;
Expand All @@ -33,7 +36,9 @@

public class CmdEnchant extends Command {

private static final Map<String[], Enchantment> enchantments = new LinkedHashMap<>();
// 1.21.11 made enchantments a fully data-driven registry (RegistryKey<Enchantment>, resolved
// through the world's DynamicRegistryManager) instead of a fixed static Registries.ENCHANTMENT.
private static final Map<String[], RegistryKey<Enchantment>> enchantments = new LinkedHashMap<>();

static {
enchantments.put(new String[] { "aqua_affinity", "aqua" }, Enchantments.AQUA_AFFINITY);
Expand Down Expand Up @@ -70,7 +75,7 @@ public class CmdEnchant extends Command {
enchantments.put(new String[] { "sharpness", "sharp" }, Enchantments.SHARPNESS);
enchantments.put(new String[] { "silk_touch", "silk" }, Enchantments.SILK_TOUCH);
enchantments.put(new String[] { "smite" }, Enchantments.SMITE);
enchantments.put(new String[] { "sweeping_edge", "sweep" }, Enchantments.SWEEPING);
enchantments.put(new String[] { "sweeping_edge", "sweep" }, Enchantments.SWEEPING_EDGE);
enchantments.put(new String[] { "thorns" }, Enchantments.THORNS);
enchantments.put(new String[] { "soul_speed", "soul" }, Enchantments.SOUL_SPEED);
enchantments.put(new String[] { "unbreaking" }, Enchantments.UNBREAKING);
Expand Down Expand Up @@ -105,44 +110,40 @@ public void onCommand(String alias, String[] args) throws Exception {
}

int level = args.length == 1 ? 1 : Integer.parseInt(args[1]);
ItemStack item = mc.player.getInventory().getMainHandStack();
ItemStack item = mc.player.getMainHandStack();
Registry<Enchantment> registry = mc.world.getRegistryManager().getOrThrow(RegistryKeys.ENCHANTMENT);

if (args[0].equalsIgnoreCase("all")) {
for (Enchantment e : Registries.ENCHANTMENT) {
enchant(item, e, level);
}

registry.streamEntries().forEach(e -> enchant(item, e, level));
return;
}

int i = NumberUtils.toInt(args[0], -1);

if (i != -1) {
enchant(item, Enchantment.byRawId(i), level);
enchant(item, registry.getEntry(i).orElse(null), level);
} else {
enchant(item, enchantments.entrySet().stream()
.filter(e -> ArrayUtils.contains(e.getKey(), args[0]))
.map(Entry::getValue)
.map(registry::getOptional)
.filter(java.util.Optional::isPresent)
.map(java.util.Optional::get)
.findFirst().orElse(null), level);
}
}

public void enchant(ItemStack item, Enchantment e, int level) {
public void enchant(ItemStack item, RegistryEntry<Enchantment> e, int level) {
if (e == null) {
throw new CmdSyntaxException("Invalid enchantment!");
}

if (item.getNbt() == null)
item.setNbt(new NbtCompound());
if (!item.getNbt().contains("Enchantments", 9)) {
item.getNbt().put("Enchantments", new NbtList());
}

NbtList listnbt = item.getNbt().getList("Enchantments", 10);
NbtCompound compoundnbt = new NbtCompound();
compoundnbt.putString("id", String.valueOf(Registries.ENCHANTMENT.getId(e)));
compoundnbt.putInt("lvl", level);
listnbt.add(compoundnbt);
// 1.19.4 stored enchantments as a raw "Enchantments" NBT list; ItemStack has no NBT access at
// all anymore - enchantments are a DataComponentTypes.ENCHANTMENTS component now.
ItemEnchantmentsComponent current = item.getOrDefault(DataComponentTypes.ENCHANTMENTS, ItemEnchantmentsComponent.DEFAULT);
ItemEnchantmentsComponent.Builder builder = new ItemEnchantmentsComponent.Builder(current);
builder.set(e, level);
item.set(DataComponentTypes.ENCHANTMENTS, builder.build());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@
public class CmdEntityMenu extends Command {

public CmdEntityMenu() {
super("entitymenu", "Opens the gui to manage the things which appear on the entitymenu interaction screen.", "entitymenu", CommandCategory.MODULES,
super("entitymenu", "Opens the gui to manage the things which appear on the entitymenu interaction screen, or change a setting (e.g. \"$entitymenu playersonly true\", \"$entitymenu reset\").",
"entitymenu | entitymenu reset | entitymenu <setting> <value>", CommandCategory.MODULES,
"playermenu", "interactionmenu");
}

@Override
public void onCommand(String alias, String[] args) throws Exception {
if (args.length > 0) {
CmdModuleSettings.applyArgs(ModuleManager.getModule(EntityMenu.class), args);
return;
}

MutablePairList<String, String> interactions = ModuleManager.getModule(EntityMenu.class).interactions;

BleachQueue.add(() -> mc.setScreen(new EntityMenuEditScreen(interactions)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ public static double round(double value, int places) {
}

public static double getSpeed(AbstractHorseEntity horse) {
return round(20 * horse.getAttributeValue(EntityAttributes.GENERIC_MOVEMENT_SPEED), 2);
return round(20 * horse.getAttributeValue(EntityAttributes.MOVEMENT_SPEED), 2);
}

public static double getSpeedLiving(LivingEntity entity) {
return round(43.17 * entity.getMovementSpeed(), 2);
}

public static double getJumpHeight(AbstractHorseEntity horse) {
return round(-0.1817584952 * Math.pow(horse.getJumpStrength(), 3) + 3.689713992 * Math.pow(horse.getJumpStrength(), 2) + 2.128599134 * horse.getJumpStrength() - 0.343930367, 3);
double jumpStrength = horse.getAttributeValue(EntityAttributes.JUMP_STRENGTH);
return round(-0.1817584952 * Math.pow(jumpStrength, 3) + 3.689713992 * Math.pow(jumpStrength, 2) + 2.128599134 * jumpStrength - 0.343930367, 3);
}
}
12 changes: 5 additions & 7 deletions src/main/java/org/bleachhack/command/commands/CmdFriends.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import org.bleachhack.util.BleachLogger;
import org.bleachhack.util.io.BleachFileHelper;

import java.util.Locale;

public class CmdFriends extends Command {

public CmdFriends() {
Expand All @@ -49,7 +47,7 @@ public void onCommand(String alias, String[] args) throws Exception {
throw new CmdSyntaxException("No username selected");
}

BleachHack.friendMang.remove(args[1].toLowerCase(Locale.ENGLISH));
BleachHack.friendMang.remove(args[1]);
BleachLogger.info("Removed \"" + args[1] + "\" from the friend list");
} else if (args[0].equalsIgnoreCase("list")) {
if (BleachHack.friendMang.getFriends().isEmpty()) {
Expand All @@ -70,13 +68,13 @@ public void onCommand(String alias, String[] args) throws Exception {
.withColor(BleachLogger.INFO_COLOR)))
.append(Text.literal("\u00a7c[Del]")
.styled(style -> style
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.literal("Remove " + f + " from your friendlist")))
.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, getPrefix() + "friends remove " + f))))
.withHoverEvent(new HoverEvent.ShowText(Text.literal("Remove " + f + " from your friendlist")))
.withClickEvent(new ClickEvent.RunCommand(getPrefix() + "friends remove " + f))))
.append(" ")
.append(Text.literal("\u00a73[NameMC]")
.styled(style -> style
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.literal("Open NameMC page of " + f)))
.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://namemc.com/profile/" + f))));
.withHoverEvent(new HoverEvent.ShowText(Text.literal("Open NameMC page of " + f)))
.withClickEvent(new ClickEvent.OpenUrl(java.net.URI.create("https://namemc.com/profile/" + f)))));
}

BleachLogger.info(text);
Expand Down
Loading