Skip to content

Commit 25a5548

Browse files
committed
Added PlayerSonar
1 parent a5b400f commit 25a5548

File tree

5 files changed

+560
-79
lines changed

5 files changed

+560
-79
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,20 @@ Purpose: helps you avoid and debug anticheat flags by cleaning risky movement pa
971971
- Cooldown settings
972972
- Switch back to previous item
973973

974+
### PlayerSonar
975+
- Detects player activities outside normal PlayerESP range
976+
- Specifically detects:
977+
- Block placement
978+
- Block breaking
979+
- Redstone interaction
980+
- Will show ESP and or tracer lines towards the target
981+
- ESP/Tracer expires after specified seconds
982+
- Customisable colors and tracer line thickness
983+
- Optional chat alerts
984+
- Works on servers with Anti-ESP
985+
986+
![Sonar](https://i.imgur.com/F2EPbvT.png)
987+
974988
## What's changed or improved in this fork?
975989

976990
### ChestESP
@@ -1292,6 +1306,16 @@ Examples:
12921306
- Makes global ESP improvements easier (one pipeline to optimize/extend).
12931307
- Keeps hack compatibility without rewriting each ESP hack manually.
12941308

1309+
### Global Toggle
1310+
- Applies to all hacks
1311+
- Sticky area overrides
1312+
- Y limit overrides
1313+
- Search thread priority
1314+
- .setslider limit override
1315+
- Chunk scan mode
1316+
- Global ESP render mode and limiter
1317+
- Tracer disabler and whitelist
1318+
- Compatible with keybinds
12951319

12961320
### Easier/Quicker ESP Commands
12971321
- ```.search <query>``` -> query mode + set query + enable

src/main/java/net/wurstclient/altgui/AltGuiKeybindScreen.java

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -334,85 +334,85 @@ private void renderEntries(GuiGraphics context, Font font, int mouseX,
334334
: withAlpha(cfg.getPanelColor(), 0.86F);
335335
context.fill(listX1 + 2, y1, listX2 - 2, y2, rowColor);
336336

337-
String left;
338-
String right;
339-
if(mode == Mode.ADD_SELECT)
340-
{
341-
left = entry.keybind().getDescription();
342-
right = entry.keybind().getCommand();
343-
}else
344-
{
345-
left = entry.key().replace("key.keyboard.", "") + ": "
346-
+ entry.keybind().getDescription();
347-
right = entry.keybind().getCommand();
348-
}
349-
350-
int rowX1 = listX1 + 6;
351-
int rowX2 = listX2 - 6;
352-
int rowW = Math.max(1, rowX2 - rowX1);
353-
int columnGap = 10;
354-
int leftW = Math.max(80, (int)(rowW * 0.56));
355-
int leftX1 = rowX1;
356-
int leftX2 = Math.min(rowX2 - columnGap, leftX1 + leftW);
357-
int rightX1 = Math.min(rowX2, leftX2 + columnGap);
358-
int rightX2 = rowX2;
359-
360-
drawStaticStringInBox(context, font, left, leftX1, y1, leftX2, y2,
361-
cfg.getTextColor(), 0);
362-
drawMarqueeStringInBox(context, font, right, rightX1, y1, rightX2,
363-
y2, cfg.getMutedTextColor(), 0);
364-
}
365-
}
366-
367-
private void drawStaticStringInBox(GuiGraphics context, Font font,
368-
String text, int x1, int y1, int x2, int y2, int color, int padX)
369-
{
370-
if(text == null || text.isEmpty())
371-
return;
372-
373-
int innerX1 = x1 + Math.max(0, padX);
374-
int innerX2 = x2 - Math.max(0, padX);
375-
if(innerX2 <= innerX1)
376-
return;
377-
378-
int textY = y1 + Math.max(0, ((y2 - y1) - font.lineHeight) / 2);
379-
context.enableScissor(innerX1, y1, innerX2, y2);
380-
context.drawString(font, text, innerX1, textY, color, false);
381-
context.disableScissor();
382-
}
383-
384-
private void drawMarqueeStringInBox(GuiGraphics context, Font font,
385-
String text, int x1, int y1, int x2, int y2, int color, int padX)
386-
{
387-
if(text == null || text.isEmpty())
388-
return;
389-
390-
int innerX1 = x1 + Math.max(0, padX);
391-
int innerX2 = x2 - Math.max(0, padX);
392-
if(innerX2 <= innerX1)
393-
return;
394-
395-
int innerW = innerX2 - innerX1;
396-
int textW = Math.max(1, font.width(text));
397-
int textY = y1 + Math.max(0, ((y2 - y1) - font.lineHeight) / 2);
398-
int textX = innerX1;
399-
400-
if(textW > innerW)
401-
{
402-
int overflow = textW - innerW;
403-
int ticks = minecraft != null && minecraft.gui != null
404-
? minecraft.gui.getGuiTicks()
405-
: (int)(System.currentTimeMillis() / 50L);
406-
float cycle = 220F;
407-
float phase = (ticks % (int)cycle) / cycle;
408-
float pingPong = phase <= 0.5F ? phase * 2F : (1F - phase) * 2F;
409-
textX = innerX1 - Math.round(overflow * pingPong);
410-
}
411-
412-
context.enableScissor(innerX1, y1, innerX2, y2);
413-
context.drawString(font, text, textX, textY, color, false);
414-
context.disableScissor();
415-
}
337+
String left;
338+
String right;
339+
if(mode == Mode.ADD_SELECT)
340+
{
341+
left = entry.keybind().getDescription();
342+
right = entry.keybind().getCommand();
343+
}else
344+
{
345+
left = entry.key().replace("key.keyboard.", "") + ": "
346+
+ entry.keybind().getDescription();
347+
right = entry.keybind().getCommand();
348+
}
349+
350+
int rowX1 = listX1 + 6;
351+
int rowX2 = listX2 - 6;
352+
int rowW = Math.max(1, rowX2 - rowX1);
353+
int columnGap = 10;
354+
int leftW = Math.max(80, (int)(rowW * 0.56));
355+
int leftX1 = rowX1;
356+
int leftX2 = Math.min(rowX2 - columnGap, leftX1 + leftW);
357+
int rightX1 = Math.min(rowX2, leftX2 + columnGap);
358+
int rightX2 = rowX2;
359+
360+
drawStaticStringInBox(context, font, left, leftX1, y1, leftX2, y2,
361+
cfg.getTextColor(), 0);
362+
drawMarqueeStringInBox(context, font, right, rightX1, y1, rightX2,
363+
y2, cfg.getMutedTextColor(), 0);
364+
}
365+
}
366+
367+
private void drawStaticStringInBox(GuiGraphics context, Font font,
368+
String text, int x1, int y1, int x2, int y2, int color, int padX)
369+
{
370+
if(text == null || text.isEmpty())
371+
return;
372+
373+
int innerX1 = x1 + Math.max(0, padX);
374+
int innerX2 = x2 - Math.max(0, padX);
375+
if(innerX2 <= innerX1)
376+
return;
377+
378+
int textY = y1 + Math.max(0, ((y2 - y1) - font.lineHeight) / 2);
379+
context.enableScissor(innerX1, y1, innerX2, y2);
380+
context.drawString(font, text, innerX1, textY, color, false);
381+
context.disableScissor();
382+
}
383+
384+
private void drawMarqueeStringInBox(GuiGraphics context, Font font,
385+
String text, int x1, int y1, int x2, int y2, int color, int padX)
386+
{
387+
if(text == null || text.isEmpty())
388+
return;
389+
390+
int innerX1 = x1 + Math.max(0, padX);
391+
int innerX2 = x2 - Math.max(0, padX);
392+
if(innerX2 <= innerX1)
393+
return;
394+
395+
int innerW = innerX2 - innerX1;
396+
int textW = Math.max(1, font.width(text));
397+
int textY = y1 + Math.max(0, ((y2 - y1) - font.lineHeight) / 2);
398+
int textX = innerX1;
399+
400+
if(textW > innerW)
401+
{
402+
int overflow = textW - innerW;
403+
int ticks = minecraft != null && minecraft.gui != null
404+
? minecraft.gui.getGuiTicks()
405+
: (int)(System.currentTimeMillis() / 50L);
406+
float cycle = 220F;
407+
float phase = (ticks % (int)cycle) / cycle;
408+
float pingPong = phase <= 0.5F ? phase * 2F : (1F - phase) * 2F;
409+
textX = innerX1 - Math.round(overflow * pingPong);
410+
}
411+
412+
context.enableScissor(innerX1, y1, innerX2, y2);
413+
context.drawString(font, text, textX, textY, color, false);
414+
context.disableScissor();
415+
}
416416

417417
private void renderFooter(GuiGraphics context, Font font, int mouseX,
418418
int mouseY)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ public final class HackList implements UpdateListener
217217
public final PacketRateHack packetRateHack = new PacketRateHack();
218218
public final ParkourHack parkourHack = new ParkourHack();
219219
public final PlayerEspHack playerEspHack = new PlayerEspHack();
220+
public final PlayerSonarHack playerSonarHack = new PlayerSonarHack();
220221
public final PortalEspHack portalEspHack = new PortalEspHack();
221222
public final PortalGuiHack portalGuiHack = new PortalGuiHack();
222223
public final PotionSaverHack potionSaverHack = new PotionSaverHack();

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public final class GlobalToggleHack extends Hack implements UpdateListener
8080
new CheckboxSetting("Whitelist PortalESP tracers",
8181
"When 'Disable all tracers' is on, still allow PortalESP tracers.",
8282
true);
83+
private final CheckboxSetting whitelistPlayerSonarTracers =
84+
new CheckboxSetting("Whitelist PlayerSonar tracers",
85+
"When 'Disable all tracers' is on, still allow PlayerSonar tracers.",
86+
true);
8387

8488
private Map<CheckboxSetting, Boolean> stickySnapshot = Map.of();
8589
private Map<CheckboxSetting, Boolean> yLimitSnapshot = Map.of();
@@ -109,6 +113,7 @@ public GlobalToggleHack()
109113
addSetting(whitelistChestEspTracers);
110114
addSetting(whitelistPlayerEspTracers);
111115
addSetting(whitelistPortalEspTracers);
116+
addSetting(whitelistPlayerSonarTracers);
112117

113118
addPossibleKeybind(".globaltoggle tracers",
114119
"Toggle GlobalToggle's tracer suppression");
@@ -269,6 +274,7 @@ public boolean isTracerSourceWhitelisted(String source)
269274
case "chestesp" -> whitelistChestEspTracers.isChecked();
270275
case "playeresp" -> whitelistPlayerEspTracers.isChecked();
271276
case "portalesp" -> whitelistPortalEspTracers.isChecked();
277+
case "playersonar" -> whitelistPlayerSonarTracers.isChecked();
272278
default -> false;
273279
};
274280
}

0 commit comments

Comments
 (0)