Skip to content

Commit c063dcc

Browse files
committed
ESP suite and Search/ESP improvements: MobSearch, Sign/Workstation/Redstone/Bed ESP, sticky area, per-component colors, tracer fixes, larger scan radius
1 parent 362ce5d commit c063dcc

File tree

11 files changed

+1781
-39
lines changed

11 files changed

+1781
-39
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public final class HackList implements UpdateListener
8080
public final ChatTranslatorHack chatTranslatorHack =
8181
new ChatTranslatorHack();
8282
public final ChestEspHack chestEspHack = new ChestEspHack();
83+
public final BedEspHack bedEspHack = new BedEspHack();
8384
public final ClickAuraHack clickAuraHack = new ClickAuraHack();
8485
public final ClickGuiHack clickGuiHack = new ClickGuiHack();
8586
public final CrashChestHack crashChestHack = new CrashChestHack();
@@ -126,6 +127,7 @@ public final class HackList implements UpdateListener
126127
public final MassTpaHack massTpaHack = new MassTpaHack();
127128
public final MileyCyrusHack mileyCyrusHack = new MileyCyrusHack();
128129
public final MobEspHack mobEspHack = new MobEspHack();
130+
public final MobSearchHack mobSearchHack = new MobSearchHack();
129131
public final MobSpawnEspHack mobSpawnEspHack = new MobSpawnEspHack();
130132
public final MultiAuraHack multiAuraHack = new MultiAuraHack();
131133
public final NameProtectHack nameProtectHack = new NameProtectHack();
@@ -167,6 +169,10 @@ public final class HackList implements UpdateListener
167169
public final SafeWalkHack safeWalkHack = new SafeWalkHack();
168170
public final ScaffoldWalkHack scaffoldWalkHack = new ScaffoldWalkHack();
169171
public final SearchHack searchHack = new SearchHack();
172+
public final SignEspHack signEspHack = new SignEspHack();
173+
public final WorkstationEspHack workstationEspHack =
174+
new WorkstationEspHack();
175+
public final RedstoneEspHack redstoneEspHack = new RedstoneEspHack();
170176
public final SkinDerpHack skinDerpHack = new SkinDerpHack();
171177
public final SneakHack sneakHack = new SneakHack();
172178
public final SnowShoeHack snowShoeHack = new SnowShoeHack();
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
/*
2+
* Copyright (c) 2014-2025 Wurst-Imperium and contributors.
3+
*
4+
* This source code is subject to the terms of the GNU General Public
5+
* License, version 3. If a copy of the GPL was not distributed with this
6+
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
7+
*/
8+
package net.wurstclient.hacks;
9+
10+
import java.awt.Color;
11+
import java.util.Arrays;
12+
import java.util.List;
13+
import java.util.function.BiPredicate;
14+
15+
import net.minecraft.block.BlockState;
16+
import net.minecraft.block.BedBlock;
17+
import net.minecraft.client.util.math.MatrixStack;
18+
import net.minecraft.util.math.BlockPos;
19+
import net.minecraft.util.math.Box;
20+
import net.minecraft.util.math.ChunkPos;
21+
import net.minecraft.util.math.Vec3d;
22+
import net.wurstclient.Category;
23+
import net.wurstclient.SearchTags;
24+
import net.wurstclient.events.CameraTransformViewBobbingListener;
25+
import net.wurstclient.events.PacketInputListener;
26+
import net.wurstclient.events.RenderListener;
27+
import net.wurstclient.events.UpdateListener;
28+
import net.wurstclient.hack.Hack;
29+
import net.wurstclient.hacks.bedesp.BedEspBlockGroup;
30+
import net.wurstclient.settings.CheckboxSetting;
31+
import net.wurstclient.settings.ChunkAreaSetting;
32+
import net.wurstclient.settings.ColorSetting;
33+
import net.wurstclient.settings.EspStyleSetting;
34+
import net.wurstclient.util.RenderUtils;
35+
import net.wurstclient.util.chunk.ChunkSearcher.Result;
36+
import net.wurstclient.util.chunk.ChunkSearcherCoordinator;
37+
38+
@SearchTags({"BedESP", "bed esp"})
39+
public final class BedEspHack extends Hack implements UpdateListener,
40+
CameraTransformViewBobbingListener, RenderListener
41+
{
42+
private final EspStyleSetting style = new EspStyleSetting();
43+
private final net.wurstclient.settings.CheckboxSetting stickyArea =
44+
new net.wurstclient.settings.CheckboxSetting("Sticky area",
45+
"Off: Re-centers every chunk to match ESP drop-off.\n"
46+
+ "On: Keeps results anchored so you can path back to them.",
47+
false);
48+
49+
private final BedEspBlockGroup beds =
50+
new BedEspBlockGroup(
51+
new ColorSetting("Bed color",
52+
"Beds will be highlighted in this color.", new Color(0xFF69B4)),
53+
new CheckboxSetting("Include beds", true));
54+
55+
private final List<BedEspBlockGroup> groups = Arrays.asList(beds);
56+
57+
private final ChunkAreaSetting area = new ChunkAreaSetting("Area",
58+
"The area around the player to search in.\n"
59+
+ "Higher values require a faster computer.");
60+
61+
private final BiPredicate<BlockPos, BlockState> query =
62+
(pos, state) -> state.getBlock() instanceof BedBlock;
63+
64+
private final ChunkSearcherCoordinator coordinator =
65+
new ChunkSearcherCoordinator(query, area);
66+
67+
private boolean groupsUpToDate;
68+
private ChunkPos lastPlayerChunk;
69+
70+
public BedEspHack()
71+
{
72+
super("BedESP");
73+
setCategory(Category.RENDER);
74+
addSetting(style);
75+
groups.stream().flatMap(BedEspBlockGroup::getSettings)
76+
.forEach(this::addSetting);
77+
addSetting(area);
78+
addSetting(stickyArea);
79+
}
80+
81+
@Override
82+
protected void onEnable()
83+
{
84+
groupsUpToDate = false;
85+
EVENTS.add(UpdateListener.class, this);
86+
EVENTS.add(PacketInputListener.class, coordinator);
87+
EVENTS.add(CameraTransformViewBobbingListener.class, this);
88+
EVENTS.add(RenderListener.class, this);
89+
lastPlayerChunk = new ChunkPos(MC.player.getBlockPos());
90+
}
91+
92+
@Override
93+
protected void onDisable()
94+
{
95+
EVENTS.remove(UpdateListener.class, this);
96+
EVENTS.remove(PacketInputListener.class, coordinator);
97+
EVENTS.remove(CameraTransformViewBobbingListener.class, this);
98+
EVENTS.remove(RenderListener.class, this);
99+
100+
coordinator.reset();
101+
groups.forEach(BedEspBlockGroup::clear);
102+
}
103+
104+
@Override
105+
public void onUpdate()
106+
{
107+
boolean searchersChanged = coordinator.update();
108+
if(searchersChanged)
109+
groupsUpToDate = false;
110+
// Recenter per chunk when sticky is off
111+
ChunkPos currentChunk = new ChunkPos(MC.player.getBlockPos());
112+
if(!stickyArea.isChecked() && !currentChunk.equals(lastPlayerChunk))
113+
{
114+
lastPlayerChunk = currentChunk;
115+
coordinator.reset();
116+
groupsUpToDate = false;
117+
}
118+
if(!groupsUpToDate && coordinator.isDone())
119+
updateGroupBoxes();
120+
}
121+
122+
@Override
123+
public void onCameraTransformViewBobbing(
124+
CameraTransformViewBobbingEvent event)
125+
{
126+
if(style.hasLines())
127+
event.cancel();
128+
}
129+
130+
@Override
131+
public void onRender(MatrixStack matrixStack, float partialTicks)
132+
{
133+
if(style.hasBoxes())
134+
renderBoxes(matrixStack);
135+
136+
if(style.hasLines())
137+
renderTracers(matrixStack, partialTicks);
138+
}
139+
140+
private void renderBoxes(MatrixStack matrixStack)
141+
{
142+
for(BedEspBlockGroup group : groups)
143+
{
144+
if(!group.isEnabled())
145+
continue;
146+
147+
List<Box> boxes = group.getBoxes();
148+
int quadsColor = group.getColorI(0x40);
149+
int linesColor = group.getColorI(0x80);
150+
151+
RenderUtils.drawSolidBoxes(matrixStack, boxes, quadsColor, false);
152+
RenderUtils.drawOutlinedBoxes(matrixStack, boxes, linesColor,
153+
false);
154+
}
155+
}
156+
157+
private void renderTracers(MatrixStack matrixStack, float partialTicks)
158+
{
159+
for(BedEspBlockGroup group : groups)
160+
{
161+
if(!group.isEnabled())
162+
continue;
163+
164+
List<Box> boxes = group.getBoxes();
165+
List<Vec3d> ends = boxes.stream().map(Box::getCenter).toList();
166+
int color = group.getColorI(0x80);
167+
168+
RenderUtils.drawTracers(matrixStack, partialTicks, ends, color,
169+
false);
170+
}
171+
}
172+
173+
private void updateGroupBoxes()
174+
{
175+
groups.forEach(BedEspBlockGroup::clear);
176+
coordinator.getMatches().forEach(this::addToGroupBoxes);
177+
groupsUpToDate = true;
178+
}
179+
180+
private void addToGroupBoxes(Result result)
181+
{
182+
for(BedEspBlockGroup group : groups)
183+
{
184+
group.add(result);
185+
break;
186+
}
187+
}
188+
}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public class ChestEspHack extends Hack implements UpdateListener,
4040
CameraTransformViewBobbingListener, RenderListener
4141
{
4242
private final EspStyleSetting style = new EspStyleSetting();
43+
private final net.wurstclient.settings.CheckboxSetting stickyArea =
44+
new net.wurstclient.settings.CheckboxSetting("Sticky area",
45+
"Off: ESP drop-off follows you as chunks change.\n"
46+
+ "On: Keeps results anchored (useful for pathing back).\n"
47+
+ "Note: ChestESP tracks loaded block entities; visibility is still limited by server view distance.",
48+
false);
4349

4450
private final ChestEspBlockGroup basicChests = new ChestEspBlockGroup(
4551
new ColorSetting("Chest color",
@@ -131,8 +137,8 @@ public ChestEspHack()
131137
{
132138
super("ChestESP");
133139
setCategory(Category.RENDER);
134-
135140
addSetting(style);
141+
addSetting(stickyArea);
136142
groups.stream().flatMap(ChestEspGroup::getSettings)
137143
.forEach(this::addSetting);
138144
}

0 commit comments

Comments
 (0)