Skip to content

Commit 11e9798

Browse files
committed
TunnelHoleStairESP Added. BedrockEscape Fix. Other Fixes
1 parent a5c3ea4 commit 11e9798

File tree

13 files changed

+1244
-16
lines changed

13 files changed

+1244
-16
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,28 @@ Purpose: helps you avoid and debug anticheat flags by cleaning risky movement pa
987987

988988
![Sonar](https://i.imgur.com/F2EPbvT.png)
989989

990+
### TunnelHoleStairESP
991+
### TunnelHoleStairESP
992+
- Finds likely player-dug paths and highlights:
993+
- Vertical shafts
994+
- Straight tunnels
995+
- Stair mines
996+
- `Detection mode` lets you scan all types or only selected ones.
997+
- `Area` + `Sticky area` control coverage:
998+
- `Area` = scan radius
999+
- `Sticky area` = keep results anchored while moving
1000+
- Performance controls:
1001+
- `Chunks per tick` = scan speed
1002+
- `Scan time budget` = hard CPU cap per tick (main FPS stabilizer)
1003+
- Accuracy controls:
1004+
- `Air only` for stricter detection
1005+
- Min/max depth/length/height settings for shape filtering
1006+
- `Natural wall filter` + `ratio` to reduce cave/worldgen false positives
1007+
- Includes per-dimension toggles and separate render colors/styles for holes, tunnels, and stairs.
1008+
- Heuristic system: strong for route/base hunting, not perfect.
1009+
1010+
![DigDig](https://i.imgur.com/CODK0xp.png)
1011+
9901012
## What's changed or improved in this fork?
9911013

9921014
### ChestESP

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ dependencies {
8484
fabricApi.configureTests {
8585
createSourceSet = true
8686
enableGameTests = false
87-
enableClientGameTests = false
87+
enableClientGameTests = true
8888
modId = "wurst_testmod"
8989
username = "Wurst-Bot"
9090
}
@@ -94,16 +94,18 @@ loom {
9494

9595
runs {
9696
clientGameTest {
97+
environment = "client"
9798
vmArgs.add("-Dfabric.client.gametest.disableNetworkSynchronizer=true")
9899
}
99100

100101
clientWithMods {
102+
environment = "client"
101103
inherit client
102104
}
103105

104106
clientGameTestWithMods {
107+
environment = "client"
105108
inherit client
106-
source = sourceSets.gametest
107109
runDir = "build/run/clientGameTestWithMods"
108110
vmArgs.add("-Dfabric.client.gametest")
109111
vmArgs.add("-Dfabric.client.gametest.disableNetworkSynchronizer=true")

src/gametest/resources/wurst_testmod.mixins.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"package": "net.wurstclient.gametest.mixin",
44
"compatibilityLevel": "JAVA_21",
55
"mixins": [],
6-
"client": [
7-
"ScreenMixin"
8-
],
6+
"client": [],
97
"injectors": {
108
"defaultRequire": 1
119
},

src/main/java/net/wurstclient/altmanager/AltManager.java

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public final class AltManager
2323
private final ArrayList<Alt> alts = new ArrayList<>();
2424
private int numPremium;
2525
private int numCracked;
26+
private boolean disconnectRandomAltReconnectEnabled = true;
2627

2728
public AltManager(Path altsFile, Path encFolder)
2829
{
@@ -105,6 +106,33 @@ public void login(Alt alt) throws LoginException
105106
altsFile.save(this);
106107
}
107108

109+
public Alt loginRandomUntilSuccess() throws LoginException
110+
{
111+
ArrayList<Alt> shuffled = new ArrayList<>(alts);
112+
if(shuffled.isEmpty())
113+
throw new LoginException("No accounts available.");
114+
115+
Collections.shuffle(shuffled);
116+
LoginException lastException = null;
117+
118+
for(Alt alt : shuffled)
119+
try
120+
{
121+
login(alt);
122+
return alt;
123+
124+
}catch(LoginException e)
125+
{
126+
lastException = e;
127+
}
128+
129+
if(lastException != null)
130+
throw new LoginException("Random login failed for all accounts.",
131+
lastException);
132+
133+
throw new LoginException("Random login failed for all accounts.");
134+
}
135+
108136
/**
109137
* Changes whether or not the Alt is marked as a favorite, then sorts the
110138
* alt list accordingly and saves the changes.
@@ -231,6 +259,25 @@ public List<Alt> getList()
231259
return Collections.unmodifiableList(alts);
232260
}
233261

262+
public boolean isDisconnectRandomAltReconnectEnabled()
263+
{
264+
return disconnectRandomAltReconnectEnabled;
265+
}
266+
267+
public void setDisconnectRandomAltReconnectEnabled(boolean enabled)
268+
{
269+
if(disconnectRandomAltReconnectEnabled == enabled)
270+
return;
271+
272+
disconnectRandomAltReconnectEnabled = enabled;
273+
altsFile.save(this);
274+
}
275+
276+
void setDisconnectRandomAltReconnectEnabledSilently(boolean enabled)
277+
{
278+
disconnectRandomAltReconnectEnabled = enabled;
279+
}
280+
234281
public int getNumPremium()
235282
{
236283
return numPremium;

src/main/java/net/wurstclient/altmanager/AltsFile.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323

2424
public final class AltsFile
2525
{
26+
private static final String SETTINGS_KEY = "__wurst_altmanager_settings";
27+
private static final String DISCONNECT_RANDOM_ALT_RECONNECT_KEY =
28+
"disconnect_random_alt_reconnect";
29+
2630
private final Path path;
2731
private final Path encFolder;
2832
private boolean disableSaving;
@@ -90,10 +94,13 @@ private void renameCorrupted()
9094
private void loadAlts(WsonObject wson, AltManager altManager)
9195
{
9296
ArrayList<Alt> alts = parseJson(wson);
97+
boolean disconnectRandomAltReconnect = readDisconnectSetting(wson);
9398

9499
try
95100
{
96101
disableSaving = true;
102+
altManager.setDisconnectRandomAltReconnectEnabledSilently(
103+
disconnectRandomAltReconnect);
97104
altManager.addAll(alts);
98105

99106
}finally
@@ -102,6 +109,22 @@ private void loadAlts(WsonObject wson, AltManager altManager)
102109
}
103110
}
104111

112+
private boolean readDisconnectSetting(WsonObject wson)
113+
{
114+
if(!wson.has(SETTINGS_KEY))
115+
return true;
116+
117+
try
118+
{
119+
return wson.getObject(SETTINGS_KEY)
120+
.getBoolean(DISCONNECT_RANDOM_ALT_RECONNECT_KEY, true);
121+
122+
}catch(JsonException e)
123+
{
124+
return true;
125+
}
126+
}
127+
105128
public static ArrayList<Alt> parseJson(WsonObject wson)
106129
{
107130
ArrayList<Alt> alts = new ArrayList<>();
@@ -111,6 +134,8 @@ public static ArrayList<Alt> parseJson(WsonObject wson)
111134
String nameOrEmail = e.getKey();
112135
if(nameOrEmail.isEmpty())
113136
continue;
137+
if(SETTINGS_KEY.equals(nameOrEmail))
138+
continue;
114139

115140
JsonObject jsonAlt = e.getValue();
116141
alts.add(loadAlt(nameOrEmail, jsonAlt));
@@ -180,6 +205,10 @@ public void save(AltManager alts)
180205
public static JsonObject createJson(AltManager alts)
181206
{
182207
JsonObject json = new JsonObject();
208+
JsonObject settings = new JsonObject();
209+
settings.addProperty(DISCONNECT_RANDOM_ALT_RECONNECT_KEY,
210+
alts.isDisconnectRandomAltReconnectEnabled());
211+
json.add(SETTINGS_KEY, settings);
183212

184213
for(Alt alt : alts.getList())
185214
alt.exportAsJson(json);

src/main/java/net/wurstclient/altmanager/screens/AltManagerScreen.java

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public final class AltManagerScreen extends Screen
8686

8787
private Button importButton;
8888
private Button exportButton;
89+
private Button disconnectRandomReconnectToggleButton;
8990
private Button checkButton;
9091
private Button logoutButton;
9192

@@ -157,7 +158,7 @@ public void init()
157158

158159
addRenderableWidget(randomButton = Button
159160
.builder(Component.literal("Login Random"), b -> pressLoginRandom())
160-
.bounds(width / 2 + 158, height - 52, 100, 20).build());
161+
.bounds(width - 50 - 8 - 52 - 52 - 100 - 6, 8, 100, 20).build());
161162

162163
addRenderableWidget(Button
163164
.builder(Component.literal("Direct Login"),
@@ -196,6 +197,11 @@ public void init()
196197
Button.builder(Component.literal("Export"), b -> pressExportAlts())
197198
.bounds(58, 8, 50, 20).build());
198199

200+
addRenderableWidget(disconnectRandomReconnectToggleButton = Button
201+
.builder(getDisconnectRandomReconnectLabel(),
202+
b -> pressToggleDisconnectRandomReconnect())
203+
.bounds(114, 8, 170, 20).build());
204+
199205
addRenderableWidget(checkButton =
200206
Button.builder(Component.literal("Check"), b -> pressCheckAlts())
201207
.bounds(width - 50 - 8 - 52, 8, 50, 20).build());
@@ -231,6 +237,8 @@ private void updateAltButtons()
231237
importButton.active = false;
232238
if(exportButton != null)
233239
exportButton.active = false;
240+
if(disconnectRandomReconnectToggleButton != null)
241+
disconnectRandomReconnectToggleButton.active = false;
234242
return;
235243
}
236244

@@ -248,6 +256,8 @@ private void updateAltButtons()
248256
importButton.active = false;
249257
if(exportButton != null)
250258
exportButton.active = false;
259+
if(disconnectRandomReconnectToggleButton != null)
260+
disconnectRandomReconnectToggleButton.active = false;
251261
return;
252262
}
253263

@@ -274,6 +284,26 @@ private void updateAltButtons()
274284
if(exportButton != null)
275285
exportButton.active =
276286
!importInProgress && !minecraft.options.fullscreen().get();
287+
288+
if(disconnectRandomReconnectToggleButton != null)
289+
disconnectRandomReconnectToggleButton.active = true;
290+
}
291+
292+
private void pressToggleDisconnectRandomReconnect()
293+
{
294+
boolean enabled = !altManager.isDisconnectRandomAltReconnectEnabled();
295+
altManager.setDisconnectRandomAltReconnectEnabled(enabled);
296+
297+
if(disconnectRandomReconnectToggleButton != null)
298+
disconnectRandomReconnectToggleButton
299+
.setMessage(getDisconnectRandomReconnectLabel());
300+
}
301+
302+
private Component getDisconnectRandomReconnectLabel()
303+
{
304+
return Component.literal("Toggle Random Reconnect: "
305+
+ (altManager.isDisconnectRandomAltReconnectEnabled() ? "ON"
306+
: "OFF"));
277307
}
278308

279309
@Override

src/main/java/net/wurstclient/hack/HackList.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public final class HackList implements UpdateListener
122122
public final CriticalsHack criticalsHack = new CriticalsHack();
123123
public final CrystalAuraHack crystalAuraHack = new CrystalAuraHack();
124124
public final DerpHack derpHack = new DerpHack();
125+
public final TunnelHoleStairEspHack tunnelHoleStairEspHack = new TunnelHoleStairEspHack();
125126
public final DolphinHack dolphinHack = new DolphinHack();
126127
public final ElytraFlightHack elytraFlightHack = new ElytraFlightHack();
127128
public final ElytraInfoHack elytraInfoHack = new ElytraInfoHack();
@@ -312,6 +313,11 @@ public HackList(Path enabledHacksFile, Path favoriteHacksFile)
312313
addHackInternal(hack);
313314
}
314315

316+
// Explicit guard to ensure new hacks remain visible in GUI lists
317+
// even if reflection ordering/name filtering changes.
318+
if(getHackByName(tunnelHoleStairEspHack.getName()) == null)
319+
addHackInternal(tunnelHoleStairEspHack);
320+
315321
}catch(Exception e)
316322
{
317323
String message = "Initializing Wurst hacks";

src/main/java/net/wurstclient/hacks/BedrockEscapeHack.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import net.minecraft.client.gui.GuiGraphics;
1818
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
1919
import net.minecraft.world.entity.player.Player;
20+
import net.minecraft.world.level.Level;
2021
import net.minecraft.world.level.block.Blocks;
2122
import net.minecraft.world.level.block.state.BlockState;
2223
import net.minecraft.world.phys.AABB;
@@ -194,9 +195,26 @@ public void onUpdate()
194195

195196
private void updateShiftSurfaceXrayOverride()
196197
{
198+
// Shift SurfaceXray is intended for bedrock roof/floor workflows, not
199+
// End traversal where bedrock structures are common and can cause
200+
// noisy auto-triggering.
201+
if(MC.level != null && MC.level.dimension() == Level.END)
202+
{
203+
restoreShiftSurfaceXrayOverride();
204+
return;
205+
}
206+
207+
boolean nearVerticalLook = false;
208+
if(MC.player != null)
209+
{
210+
double lookY = MC.player.getViewVector(1.0F).normalize().y;
211+
nearVerticalLook = Math.abs(lookY) >= VERTICAL_LOOK_THRESHOLD;
212+
}
213+
197214
boolean shiftInBedrockContext =
198215
MC.options.keyShift.isDown() && isInBedrockContext();
199-
boolean autoWhenTargetAbove = isValidTarget && !targetBelow;
216+
boolean autoWhenTargetAbove =
217+
isValidTarget && !targetBelow && nearVerticalLook;
200218
boolean shouldApply = shiftSurfaceXray.isChecked()
201219
&& (shiftInBedrockContext || autoWhenTargetAbove);
202220

src/main/java/net/wurstclient/hacks/PlayerSonarHack.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,18 @@ private void updatePing(BlockPos pos, String kind, String oldId,
288288
ping.lastOldId = oldId;
289289
ping.lastNewId = newId;
290290

291-
if(chatAlerts.isChecked() && now - ping.lastAlertMs >= 300L)
292-
{
293-
String rangeSuffix = onlyBeyondPlayerEspRange.isChecked()
294-
? String.format(" (outside %.0fb).", PLAYER_ESP_LIMIT_BLOCKS)
295-
: ".";
296-
ChatUtils.message(String.format(
297-
"PlayerSonar: %s %s -> %s at %d, %d, %d%s", ping.lastKind,
298-
ping.lastOldId, ping.lastNewId, ping.pos.getX(),
291+
if(chatAlerts.isChecked() && now - ping.lastAlertMs >= 300L)
292+
{
293+
int distanceBlocks =
294+
(int)Math.round(Math.sqrt(ping.pos.distToCenterSqr(
295+
MC.player.getX(), MC.player.getY(), MC.player.getZ())));
296+
String rangeSuffix = onlyBeyondPlayerEspRange.isChecked()
297+
? String.format(" (%db away, outside %.0fb).", distanceBlocks,
298+
PLAYER_ESP_LIMIT_BLOCKS)
299+
: String.format(" (%db away).", distanceBlocks);
300+
ChatUtils.message(String.format(
301+
"PlayerSonar: %s %s -> %s at %d, %d, %d%s", ping.lastKind,
302+
ping.lastOldId, ping.lastNewId, ping.pos.getX(),
299303
ping.pos.getY(), ping.pos.getZ(), rangeSuffix));
300304
ping.lastAlertMs = now;
301305
}

0 commit comments

Comments
 (0)