Skip to content

Commit 6fb0788

Browse files
committed
Added MiningEvidence and SpectatorMonitor
1 parent ccb6cf0 commit 6fb0788

File tree

14 files changed

+830
-118
lines changed

14 files changed

+830
-118
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,21 @@ Purpose: helps you avoid and debug anticheat flags by cleaning risky movement pa
10451045
![1](https://i.imgur.com/Kuj4NT6.png)
10461046
![2](https://i.imgur.com/1Z50eSC.png)
10471047

1048+
### MiningEvidence
1049+
1050+
- Designed to compliment the TunnelHoleStairESP
1051+
- Will highlight lines between dropped blocks which indicate recent mining activity
1052+
- Designed to work even after blocks disappear
1053+
- Fully adjustable to avoid false positives
1054+
- Adjustable ESP timeout
1055+
1056+
![Evidenza](https://i.imgur.com/NrOsEfa.png)
1057+
1058+
### SpectatorMonitor
1059+
1060+
- Actively checks if and when another player enters Specator Mode
1061+
- Will alert via chat and or sounds
1062+
10481063
## What's changed or improved in this fork?
10491064

10501065
### ChestESP

src/main/java/net/wurstclient/commands/MapaCmd.java

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ public MapaCmd()
2626
".mapa open", ".mapa reset", ".mapa toggle",
2727
".mapa enabled <true|false>", ".mapa size <72-256>",
2828
".mapa zoom <0.25-10>", ".mapa samples <32-512>",
29-
".mapa pos <x> <y>", ".mapa rotate <true|false>",
30-
".mapa underground <true|false>", ".mapa invert <true|false>",
31-
".mapa smallplants <true|false>", ".mapa trees <true|false>",
32-
".mapa palette <true|false>", ".mapa surfaceLighting <true|false>",
29+
".mapa textScale <0.5-4>", ".mapa pos <x> <y>",
30+
".mapa rotate <true|false>", ".mapa underground <true|false>",
31+
".mapa invert <true|false>", ".mapa smallplants <true|false>",
32+
".mapa trees <true|false>", ".mapa palette <true|false>",
33+
".mapa surfaceLighting <true|false>",
3334
".mapa undergroundLighting <true|false>", ".mapa sharpness <0-3>",
3435
".mapa relief <0.1-3>", ".mapa brightness <0.7-1.3>",
3536
".mapa contrast <0.5-1.8>", ".mapa saturation <0.5-1.5>",
@@ -103,6 +104,14 @@ public void call(String[] args) throws CmdException
103104
+ mapa.createConfig().minimapSamples + ".");
104105
return;
105106

107+
case "textscale":
108+
requireLength(args, 2);
109+
mapa.setPlayerNameScale(parseDouble(args[1], 0.5, 4.0));
110+
ChatUtils.message(String.format(Locale.ROOT,
111+
"Mapa player_name_scale set to %.2f.",
112+
mapa.createConfig().playerNameScale));
113+
return;
114+
106115
case "pos":
107116
requireLength(args, 3);
108117
mapa.setMapPosition(parseInt(args[1], 0, 10000),
@@ -352,6 +361,7 @@ private static String statusLine(MapaHack mapa)
352361
+ String.format(Locale.ROOT, " waterAlpha=%.2f", cfg.waterOpacity)
353362
+ String.format(Locale.ROOT, " chunk=%.2f",
354363
cfg.chunkRefreshAggression)
364+
+ String.format(Locale.ROOT, " textScale=%.2f", cfg.playerNameScale)
355365
+ " samples=" + cfg.minimapSamples;
356366
}
357367

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ public final class HackList implements UpdateListener
173173
public final LsdHack lsdHack = new LsdHack();
174174
public final MaceDmgHack maceDmgHack = new MaceDmgHack();
175175
public final MentionHack mentionHack = new MentionHack();
176+
public final MiningEvidenceHack miningEvidenceHack =
177+
new MiningEvidenceHack();
176178
public final SpearAssistHack spearAssistHack = new SpearAssistHack();
177179
public final MassTpaHack massTpaHack = new MassTpaHack();
178180
public final BedrockEscapeHack bedrockEscapeHack = new BedrockEscapeHack();
@@ -271,6 +273,8 @@ public final class HackList implements UpdateListener
271273
public final TrueSightHack trueSightHack = new TrueSightHack();
272274
public final TunnellerHack tunnellerHack = new TunnellerHack();
273275
public final SurfaceXrayHack surfaceXrayHack = new SurfaceXrayHack();
276+
public final SpectatorMonitorHack spectatorMonitorHack =
277+
new SpectatorMonitorHack();
274278
public final VeinMinerHack veinMinerHack = new VeinMinerHack();
275279
public final XRayHack xRayHack = new XRayHack();
276280
public final WaypointsHack waypointsHack = new WaypointsHack();

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

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,17 @@ public String toString()
113113
+ "Grid: Generate a square search grid from your current position.",
114114
RouteType.values(), RouteType.WAYPOINTS);
115115

116-
private final SliderSetting gridSideLength =
117-
new SliderSetting("Grid side length",
118-
"Side length of the square search area (in blocks).\n\n"
119-
+ "The grid starts at your position and extends in +X and +Z.",
120-
500, 10, 50000, 10, ValueDisplay.INTEGER.withSuffix(" blocks"));
121-
122-
private final SliderSetting gridPassSize =
123-
new SliderSetting("Grid pass size",
124-
"Distance between each back-and-forth pass (in blocks).", 50, 1,
125-
1000, 1, ValueDisplay.INTEGER.withSuffix(" blocks"));
116+
private final SliderSetting gridWidthChunks =
117+
new SliderSetting("Grid width",
118+
"How many chunks wide the search area should be.\n\n"
119+
+ "AutoFly flies through the center of each chunk column.",
120+
2, 1, 512, 1, ValueDisplay.INTEGER.withSuffix(" chunks"));
121+
122+
private final SliderSetting gridDepthChunks = new SliderSetting(
123+
"Grid depth",
124+
"How many chunks deep the search area should be.\n\n"
125+
+ "At the end of each column, AutoFly turns and flies back down the next one.",
126+
2, 1, 512, 1, ValueDisplay.INTEGER.withSuffix(" chunks"));
126127

127128
private final CheckboxSetting showGridPath = new CheckboxSetting(
128129
"Show grid path",
@@ -282,8 +283,8 @@ public AutoFlyHack()
282283
setCategory(Category.MOVEMENT);
283284
addSetting(waypointText);
284285
addSetting(routeType);
285-
addSetting(gridSideLength);
286-
addSetting(gridPassSize);
286+
addSetting(gridWidthChunks);
287+
addSetting(gridDepthChunks);
287288
addSetting(showGridPath);
288289
addSetting(gridPathColor);
289290
addSetting(gridPathThickness);
@@ -1041,56 +1042,50 @@ private void loadTargetsFromGrid(BlockPos start)
10411042
if(start == null)
10421043
return;
10431044

1044-
int side = (int)Math.round(gridSideLength.getValue());
1045-
int pass = (int)Math.round(gridPassSize.getValue());
1046-
1047-
if(side < 1)
1045+
int widthChunks = gridWidthChunks.getValueI();
1046+
int depthChunks = gridDepthChunks.getValueI();
1047+
if(widthChunks < 1 || depthChunks < 1)
10481048
{
1049-
ChatUtils.error("Grid side length must be at least 1 block.");
1049+
ChatUtils
1050+
.error("Grid width and depth must both be at least 1 chunk.");
10501051
return;
10511052
}
1052-
if(pass < 1)
1053-
pass = 1;
10541053

1055-
int passes = (int)Math.ceil(side / (double)pass);
1056-
long estTargets = 2L * passes + 1L;
1054+
long estTargets = (long)widthChunks * depthChunks;
10571055
if(estTargets > 20000L)
10581056
{
1059-
ChatUtils.error("Grid is too dense (" + estTargets
1060-
+ " targets). Increase pass size or decrease side length.");
1057+
ChatUtils.error("Grid is too large (" + estTargets
1058+
+ " chunk centers). Reduce width or depth.");
10611059
return;
10621060
}
10631061

1064-
int x0 = start.getX();
1065-
int z0 = start.getZ();
1066-
int x1 = x0 + side;
1067-
int z1 = z0 + side;
1062+
int startChunkX = start.getX() >> 4;
1063+
int startChunkZ = start.getZ() >> 4;
10681064
int y = 0; // Not used when hasY=false
10691065

1070-
boolean toEnd = true;
1071-
int z = z0;
1072-
while(true)
1066+
for(int dx = 0; dx < widthChunks; dx++)
10731067
{
1074-
int xEnd = toEnd ? x1 : x0;
1075-
targets.add(new AutoFlyTarget(new BlockPos(xEnd, y, z), false));
1076-
1077-
if(z == z1)
1078-
break;
1079-
1080-
int nextZ = z + pass;
1081-
if(nextZ > z1)
1082-
nextZ = z1;
1083-
1084-
// Shift over to the next pass while staying at the current X end.
1085-
targets.add(new AutoFlyTarget(new BlockPos(xEnd, y, nextZ), false));
1086-
1087-
z = nextZ;
1088-
toEnd = !toEnd;
1068+
int chunkX = startChunkX + dx;
1069+
boolean ascending = (dx & 1) == 0;
1070+
for(int dz = 0; dz < depthChunks; dz++)
1071+
{
1072+
int depthIndex = ascending ? dz : depthChunks - 1 - dz;
1073+
int chunkZ = startChunkZ + depthIndex;
1074+
int centerX = (chunkX << 4) + 8;
1075+
int centerZ = (chunkZ << 4) + 8;
1076+
targets.add(new AutoFlyTarget(new BlockPos(centerX, y, centerZ),
1077+
false));
1078+
}
10891079
}
10901080

1081+
int minBlockX = (startChunkX << 4) + 8;
1082+
int minBlockZ = (startChunkZ << 4) + 8;
1083+
int maxBlockX = ((startChunkX + widthChunks - 1) << 4) + 8;
1084+
int maxBlockZ = ((startChunkZ + depthChunks - 1) << 4) + 8;
10911085
ChatUtils.message(String.format(Locale.ROOT,
1092-
"AutoFly grid: side=%d, pass=%d, targets=%d (%d,%d -> %d,%d)", side,
1093-
pass, targets.size(), x0, z0, x1, z1));
1086+
"AutoFly grid: %dx%d chunks, targets=%d (%d,%d -> %d,%d)",
1087+
widthChunks, depthChunks, targets.size(), minBlockX, minBlockZ,
1088+
maxBlockX, maxBlockZ));
10941089
}
10951090

10961091
private void restartWithExistingTargets()

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

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ public final class MapaHack extends Hack
9090
"Minimap icon size", 8, 4, 24, 1, ValueDisplay.INTEGER);
9191
private final SliderSetting worldMapIconSize = new SliderSetting(
9292
"World map icon size", 12, 4, 32, 1, ValueDisplay.INTEGER);
93+
private final SliderSetting playerNameScale = new SliderSetting(
94+
"Player name scale", 1.0, 0.5, 4.0, 0.1, ValueDisplay.DECIMAL);
9395
private final CheckboxSetting iconOutline =
9496
new CheckboxSetting("ESP icon outlines", true);
9597
private final CheckboxSetting showCenterCross =
@@ -194,6 +196,7 @@ public MapaHack()
194196
addSetting(mapEspGroup);
195197
addSetting(minimapIconSize);
196198
addSetting(worldMapIconSize);
199+
addSetting(playerNameScale);
197200
addSetting(iconOutline);
198201
addSetting(showCenterCross);
199202
addSetting(showFrame);
@@ -445,29 +448,29 @@ private void renderPlayerHeadMarker(GuiGraphicsExtractor context,
445448
if(point == null)
446449
return;
447450
renderPlayerHeadMarker(context, point, skin, name, size, outlineColor,
448-
cfg.showPlayerNames);
451+
cfg.showPlayerNames, (float)cfg.playerNameScale);
449452
}
450453

451454
private void renderPlayerHeadMarker(GuiGraphicsExtractor context,
452455
MapPoint point, Identifier skin, String name, int size,
453-
int outlineColor, boolean drawName)
456+
int outlineColor, boolean drawName, float nameScale)
454457
{
455458
int x = Math.round(point.x()) - size / 2;
456459
int y = Math.round(point.y()) - size / 2;
457460
drawIconOutline(context, x, y, size, outlineColor);
458461
context.blit(RenderPipelines.GUI_TEXTURED, skin, x, y, 8, 8, size, size,
459-
64, 64, 0xFFFFFFFF);
462+
8, 8, 64, 64, 0xFFFFFFFF);
460463
context.blit(RenderPipelines.GUI_TEXTURED, skin, x, y, 40, 8, size,
461-
size, 64, 64, 0xFFFFFFFF);
464+
size, 8, 8, 64, 64, 0xFFFFFFFF);
462465
if(drawName && !name.isEmpty())
463466
drawMarkerLabel(context, name, x + size / 2, y + size + 2,
464-
outlineColor, size);
467+
outlineColor, size, nameScale);
465468
}
466469

467470
private void drawMarkerLabel(GuiGraphicsExtractor context, String label,
468-
int centerX, int y, int color, int iconSize)
471+
int centerX, int y, int color, int iconSize, float nameScale)
469472
{
470-
float scale = Mth.clamp(iconSize / 8.0F, 0.5F, 2.0F);
473+
float scale = Mth.clamp(iconSize / 8.0F * nameScale, 0.5F, 6.0F);
471474
int width = Math.round(MC.font.width(label) * scale);
472475
int x = centerX - width / 2;
473476
int stroke = 0xFF000000;
@@ -631,6 +634,7 @@ public void resetToDefaults()
631634
minimapZoom.setValue(2.0);
632635
minimapIconSize.setValue(8);
633636
worldMapIconSize.setValue(12);
637+
playerNameScale.setValue(1.0);
634638
iconOutline.setChecked(true);
635639
showCenterCross.setChecked(true);
636640
showFrame.setChecked(true);
@@ -689,6 +693,11 @@ public void setMapSamples(int value)
689693
minimapSamples.setValue(value);
690694
}
691695

696+
public void setPlayerNameScale(double value)
697+
{
698+
playerNameScale.setValue(value);
699+
}
700+
692701
public void setMapPosition(int x, int y)
693702
{
694703
minimapPosX.setValue(x);
@@ -836,6 +845,7 @@ public XMapConfig createConfig()
836845
cfg.enabled = !noMap.isChecked();
837846
cfg.showCenterCross = showCenterCross.isChecked();
838847
cfg.showPlayerNames = showPlayerNames.isChecked();
848+
cfg.playerNameScale = playerNameScale.getValue();
839849
cfg.minimapSize = minimapSize.getValueI();
840850
cfg.minimapZoom = minimapZoom.getValue();
841851
cfg.minimapPosX = minimapPosX.getValueI();
@@ -1076,7 +1086,8 @@ private void renderFullscreenPlayers(GuiGraphicsExtractor context, int mapX,
10761086
renderPlayerHeadMarker(context, point, skin,
10771087
player.getName().getString(), markerSize,
10781088
WURST.getHax().playerEspHack.getMapaPlayerColor(player),
1079-
createConfig().showPlayerNames);
1089+
createConfig().showPlayerNames,
1090+
(float)createConfig().playerNameScale);
10801091
}
10811092
}
10821093

0 commit comments

Comments
 (0)