Skip to content

Commit 41cf00a

Browse files
committed
7.51 Update
1 parent 59c9570 commit 41cf00a

File tree

5 files changed

+72
-177
lines changed

5 files changed

+72
-177
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Wurst Client v7.50.3 (MC1.21.10) - Modified by CevAPI
1+
# Wurst Client v7.51 (MC1.21.10) - Modified by CevAPI
22

33
![CevAPI Logo](https://i.imgur.com/Uju0ZZJ.png)
44

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

Lines changed: 24 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.util.List;
1111

1212
import net.minecraft.client.util.math.MatrixStack;
13+
import net.minecraft.entity.Entity;
1314
import net.minecraft.util.math.Box;
1415
import net.minecraft.util.math.Vec3d;
1516
import net.wurstclient.Category;
@@ -19,6 +20,7 @@
1920
import net.wurstclient.hack.Hack;
2021
import net.wurstclient.hacks.chestesp.ChestEspGroup;
2122
import net.wurstclient.hacks.chestesp.ChestEspGroupManager;
23+
import net.wurstclient.settings.CheckboxSetting;
2224
import net.wurstclient.settings.EspStyleSetting;
2325
import net.wurstclient.settings.SliderSetting;
2426
import net.wurstclient.util.RenderUtils;
@@ -34,102 +36,14 @@ public class ChestEspHack extends Hack implements UpdateListener,
3436
+ "On: Keeps results anchored (useful for pathing back).\n"
3537
+ "Note: ChestESP tracks loaded block entities; visibility is still limited by server view distance.",
3638
false);
39+
private final ChestEspGroupManager groups = new ChestEspGroupManager();
3740

38-
private final ChestEspBlockGroup basicChests = new ChestEspBlockGroup(
39-
new ColorSetting("Chest color",
40-
"Normal chests will be highlighted in this color.", Color.GREEN),
41-
null);
42-
43-
private final ChestEspBlockGroup trapChests = new ChestEspBlockGroup(
44-
new ColorSetting("Trap chest color",
45-
"Trapped chests will be highlighted in this color.",
46-
new Color(0xFF8000)),
47-
new CheckboxSetting("Include trap chests", true));
48-
49-
private final ChestEspBlockGroup enderChests = new ChestEspBlockGroup(
50-
new ColorSetting("Ender color",
51-
"Ender chests will be highlighted in this color.", Color.CYAN),
52-
new CheckboxSetting("Include ender chests", true));
53-
54-
private final ChestEspEntityGroup chestCarts =
55-
new ChestEspEntityGroup(
56-
new ColorSetting("Chest cart color",
57-
"Minecarts with chests will be highlighted in this color.",
58-
Color.YELLOW),
59-
new CheckboxSetting("Include chest carts", true));
60-
61-
private final ChestEspEntityGroup chestBoats =
62-
new ChestEspEntityGroup(
63-
new ColorSetting("Chest boat color",
64-
"Boats with chests will be highlighted in this color.",
65-
Color.YELLOW),
66-
new CheckboxSetting("Include chest boats", true));
67-
68-
private final ChestEspBlockGroup barrels = new ChestEspBlockGroup(
69-
new ColorSetting("Barrel color",
70-
"Barrels will be highlighted in this color.", Color.GREEN),
71-
new CheckboxSetting("Include barrels", true));
72-
73-
private final ChestEspBlockGroup pots = new ChestEspBlockGroup(
74-
new ColorSetting("Pots color",
75-
"Decorated pots will be highlighted in this color.", Color.GREEN),
76-
new CheckboxSetting("Include pots", false));
77-
78-
private final ChestEspBlockGroup shulkerBoxes = new ChestEspBlockGroup(
79-
new ColorSetting("Shulker color",
80-
"Shulker boxes will be highlighted in this color.", Color.MAGENTA),
81-
new CheckboxSetting("Include shulkers", true));
82-
83-
private final ChestEspBlockGroup hoppers = new ChestEspBlockGroup(
84-
new ColorSetting("Hopper color",
85-
"Hoppers will be highlighted in this color.", Color.WHITE),
86-
new CheckboxSetting("Include hoppers", false));
87-
88-
private final ChestEspEntityGroup hopperCarts =
89-
new ChestEspEntityGroup(
90-
new ColorSetting("Hopper cart color",
91-
"Minecarts with hoppers will be highlighted in this color.",
92-
Color.YELLOW),
93-
new CheckboxSetting("Include hopper carts", false));
94-
95-
private final ChestEspBlockGroup droppers = new ChestEspBlockGroup(
96-
new ColorSetting("Dropper color",
97-
"Droppers will be highlighted in this color.", Color.WHITE),
98-
new CheckboxSetting("Include droppers", false));
99-
100-
private final ChestEspBlockGroup dispensers = new ChestEspBlockGroup(
101-
new ColorSetting("Dispenser color",
102-
"Dispensers will be highlighted in this color.",
103-
new Color(0xFF8000)),
104-
new CheckboxSetting("Include dispensers", false));
105-
106-
private final ChestEspBlockGroup crafters = new ChestEspBlockGroup(
107-
new ColorSetting("Crafter color",
108-
"Crafters will be highlighted in this color.", Color.WHITE),
109-
new CheckboxSetting("Include crafters", false));
110-
111-
private final ChestEspBlockGroup furnaces =
112-
new ChestEspBlockGroup(new ColorSetting("Furnace color",
113-
"Furnaces, smokers, and blast furnaces will be highlighted in this color.",
114-
Color.RED), new CheckboxSetting("Include furnaces", false));
115-
116-
private final List<ChestEspGroup> groups =
117-
Arrays.asList(basicChests, trapChests, enderChests, chestCarts,
118-
chestBoats, barrels, pots, shulkerBoxes, hoppers, hopperCarts,
119-
droppers, dispensers, crafters, furnaces);
120-
121-
private final List<ChestEspEntityGroup> entityGroups =
122-
Arrays.asList(chestCarts, chestBoats, hopperCarts);
123-
124-
// New: optionally show detected count in HackList
12541
private final CheckboxSetting showCountInHackList = new CheckboxSetting(
12642
"HackList count",
12743
"Appends the number of detected chests/containers to this hack's entry in the HackList.",
12844
false);
129-
13045
private int foundCount;
13146

132-
// Above-ground filter
13347
private final CheckboxSetting onlyAboveGround =
13448
new CheckboxSetting("Above ground only",
13549
"Only show chests/containers at or above the configured Y level.",
@@ -143,7 +57,7 @@ public ChestEspHack()
14357
setCategory(Category.RENDER);
14458
addSetting(style);
14559
addSetting(stickyArea);
146-
groups.stream().flatMap(ChestEspGroup::getSettings)
60+
groups.allGroups.stream().flatMap(ChestEspGroup::getSettings)
14761
.forEach(this::addSetting);
14862
addSetting(onlyAboveGround);
14963
addSetting(aboveGroundY);
@@ -165,67 +79,39 @@ protected void onDisable()
16579
EVENTS.remove(CameraTransformViewBobbingListener.class, this);
16680
EVENTS.remove(RenderListener.class, this);
16781

168-
groups.forEach(ChestEspGroup::clear);
169-
entityGroups.forEach(ChestEspGroup::clear);
82+
groups.allGroups.forEach(ChestEspGroup::clear);
17083
foundCount = 0;
17184
}
17285

17386
@Override
17487
public void onUpdate()
17588
{
176-
groups.forEach(ChestEspGroup::clear);
89+
groups.allGroups.forEach(ChestEspGroup::clear);
17790

178-
ArrayList<BlockEntity> blockEntities =
179-
ChunkUtils.getLoadedBlockEntities()
180-
.collect(Collectors.toCollection(ArrayList::new));
91+
double yLimit = aboveGroundY.getValue();
92+
boolean enforceAboveGround = onlyAboveGround.isChecked();
18193

182-
for(BlockEntity blockEntity : blockEntities)
183-
{
184-
if(onlyAboveGround.isChecked()
185-
&& blockEntity.getPos().getY() < aboveGroundY.getValue())
186-
continue;
187-
if(blockEntity instanceof TrappedChestBlockEntity)
188-
trapChests.add(blockEntity);
189-
else if(blockEntity instanceof ChestBlockEntity)
190-
basicChests.add(blockEntity);
191-
else if(blockEntity instanceof EnderChestBlockEntity)
192-
enderChests.add(blockEntity);
193-
else if(blockEntity instanceof ShulkerBoxBlockEntity)
194-
shulkerBoxes.add(blockEntity);
195-
else if(blockEntity instanceof BarrelBlockEntity)
196-
barrels.add(blockEntity);
197-
else if(blockEntity instanceof DecoratedPotBlockEntity)
198-
pots.add(blockEntity);
199-
else if(blockEntity instanceof HopperBlockEntity)
200-
hoppers.add(blockEntity);
201-
else if(blockEntity instanceof DropperBlockEntity)
202-
droppers.add(blockEntity);
203-
else if(blockEntity instanceof DispenserBlockEntity)
204-
dispensers.add(blockEntity);
205-
else if(blockEntity instanceof CrafterBlockEntity)
206-
crafters.add(blockEntity);
207-
else if(blockEntity instanceof AbstractFurnaceBlockEntity)
208-
furnaces.add(blockEntity);
94+
ChunkUtils.getLoadedBlockEntities().forEach(be -> {
95+
if(enforceAboveGround && be.getPos().getY() < yLimit)
96+
return;
20997

210-
}
98+
groups.blockGroups.forEach(group -> group.addIfMatches(be));
99+
});
211100

212-
for(Entity entity : MC.world.getEntities())
101+
if(MC.world != null)
213102
{
214-
if(onlyAboveGround.isChecked()
215-
&& entity.getY() < aboveGroundY.getValue())
216-
continue;
217-
if(entity instanceof ChestMinecartEntity)
218-
chestCarts.add(entity);
219-
else if(entity instanceof HopperMinecartEntity)
220-
hopperCarts.add(entity);
221-
else if(entity instanceof ChestBoatEntity
222-
|| entity instanceof ChestRaftEntity)
223-
chestBoats.add(entity);
103+
for(Entity entity : MC.world.getEntities())
104+
{
105+
if(enforceAboveGround && entity.getY() < yLimit)
106+
continue;
107+
108+
groups.entityGroups
109+
.forEach(group -> group.addIfMatches(entity));
110+
}
224111
}
225112

226-
// compute found count from enabled groups (clamped)
227-
int total = groups.stream().mapToInt(g -> g.getBoxes().size()).sum();
228-
total += entityGroups.stream().mapToInt(g -> g.getBoxes().size()).sum();
113+
int total = groups.allGroups.stream().filter(ChestEspGroup::isEnabled)
114+
.mapToInt(g -> g.getBoxes().size()).sum();
229115
foundCount = Math.min(total, 999);
230116
}
231117

src/main/java/net/wurstclient/mixin/MultiplayerScreenMixin.java

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
public class MultiplayerScreenMixin extends Screen
3232
{
3333
private ButtonWidget lastServerButton;
34+
@Unique
35+
private ButtonWidget antiFingerprintButton;
36+
@Unique
37+
private ButtonWidget cornerServerFinderButton;
38+
@Unique
39+
private ButtonWidget cornerCleanUpButton;
3440

3541
private MultiplayerScreenMixin(WurstClient wurst, Text title)
3642
{
@@ -40,6 +46,10 @@ private MultiplayerScreenMixin(WurstClient wurst, Text title)
4046
@Inject(at = @At("HEAD"), method = "init()V")
4147
private void beforeVanillaButtons(CallbackInfo ci)
4248
{
49+
antiFingerprintButton = null;
50+
cornerServerFinderButton = null;
51+
cornerCleanUpButton = null;
52+
4353
if(!WurstClient.INSTANCE.isEnabled())
4454
return;
4555

@@ -85,24 +95,47 @@ private void onRefreshWidgetPositions(CallbackInfo ci)
8595
{
8696
updateLastServerButton();
8797

88-
addDrawableChild(ButtonWidget
89-
.builder(Text.literal("Anti-Fingerprint"),
90-
b -> client.setScreen(new AntiFingerprintConfigScreen(
91-
(MultiplayerScreen)(Object)this)))
92-
.dimensions(width / 2 + 54, 10, 100, 20).build());
98+
if(!WurstClient.INSTANCE.isEnabled())
99+
return;
100+
101+
if(antiFingerprintButton == null)
102+
{
103+
antiFingerprintButton = ButtonWidget
104+
.builder(Text.literal("Anti-Fingerprint"),
105+
b -> client.setScreen(new AntiFingerprintConfigScreen(
106+
(MultiplayerScreen)(Object)this)))
107+
.dimensions(0, 0, 100, 20).build();
108+
addDrawableChild(antiFingerprintButton);
109+
}
110+
antiFingerprintButton.setX(width / 2 + 54);
111+
antiFingerprintButton.setY(10);
112+
antiFingerprintButton.setWidth(100);
93113

94-
addDrawableChild(
95-
ButtonWidget
114+
if(cornerServerFinderButton == null)
115+
{
116+
cornerServerFinderButton = ButtonWidget
96117
.builder(Text.literal("Server Finder"),
97118
b -> client.setScreen(new ServerFinderScreen(
98119
(MultiplayerScreen)(Object)this)))
99-
.dimensions(width / 2 + 154 + 4, height - 54, 100, 20).build());
120+
.dimensions(0, 0, 100, 20).build();
121+
addDrawableChild(cornerServerFinderButton);
122+
}
123+
cornerServerFinderButton.setX(width / 2 + 154 + 4);
124+
cornerServerFinderButton.setY(height - 54);
125+
cornerServerFinderButton.setWidth(100);
100126

101-
addDrawableChild(ButtonWidget
102-
.builder(Text.literal("Clean Up"),
103-
b -> client.setScreen(
104-
new CleanUpScreen((MultiplayerScreen)(Object)this)))
105-
.dimensions(width / 2 + 154 + 4, height - 30, 100, 20).build());
127+
if(cornerCleanUpButton == null)
128+
{
129+
cornerCleanUpButton = ButtonWidget
130+
.builder(Text.literal("Clean Up"),
131+
b -> client.setScreen(
132+
new CleanUpScreen((MultiplayerScreen)(Object)this)))
133+
.dimensions(0, 0, 100, 20).build();
134+
addDrawableChild(cornerCleanUpButton);
135+
}
136+
cornerCleanUpButton.setX(width / 2 + 154 + 4);
137+
cornerCleanUpButton.setY(height - 30);
138+
cornerCleanUpButton.setWidth(100);
106139
}
107140

108141
@Inject(at = @At("HEAD"),

src/main/java/net/wurstclient/serverfinder/ServerFinderScreen.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import net.minecraft.text.Text;
2828
import net.minecraft.util.Colors;
2929
import net.minecraft.util.Util;
30-
import net.wurstclient.mixinterface.IMultiplayerScreen;
3130
import net.cevapi.config.AntiFingerprintConfigScreen;
3231
import net.wurstclient.util.MathUtils;
3332

0 commit comments

Comments
 (0)