Skip to content

Commit 448e05a

Browse files
committed
Changed MobESP and ESP Y Limit
1 parent e2466f7 commit 448e05a

File tree

11 files changed

+23
-9
lines changed

11 files changed

+23
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public final class BedEspHack extends Hack implements UpdateListener,
6767
new net.wurstclient.settings.CheckboxSetting("Above ground only",
6868
"Only show beds at or above the configured Y level.", false);
6969
private final SliderSetting aboveGroundY = new SliderSetting(
70-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
70+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
7171

7272
private final BiPredicate<BlockPos, BlockState> query =
7373
(pos, state) -> state.getBlock() instanceof BedBlock;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public class ChestEspHack extends Hack implements UpdateListener,
148148
"Only show chests/containers at or above the configured Y level.",
149149
false);
150150
private final SliderSetting aboveGroundY = new SliderSetting(
151-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
151+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
152152

153153
public ChestEspHack()
154154
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private enum SpecialMode
129129
new CheckboxSetting("Above ground only",
130130
"Only show items at or above the configured Y level.", false);
131131
private final SliderSetting aboveGroundY = new SliderSetting(
132-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
132+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
133133
// cache for LIST mode: exact IDs and keyword terms
134134
private java.util.Set<String> specialExactIds;
135135
private String[] specialKeywords;

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import net.wurstclient.settings.ColorSetting;
2828
import net.wurstclient.settings.EnumSetting;
2929
import net.wurstclient.settings.EspBoxSizeSetting;
30+
import net.wurstclient.settings.SliderSetting;
3031
import net.wurstclient.settings.filterlists.EntityFilterList;
3132
import net.wurstclient.settings.filters.*;
3233
import net.wurstclient.util.EntityUtils;
@@ -87,6 +88,13 @@ public final class MobEspHack extends Hack implements UpdateListener,
8788
"Appends the number of detected mobs to this hack's entry in the HackList.",
8889
false);
8990

91+
// Above-ground filter
92+
private final CheckboxSetting onlyAboveGround =
93+
new CheckboxSetting("Above ground only",
94+
"Only show mobs at or above the configured Y level.", false);
95+
private final SliderSetting aboveGroundY = new SliderSetting(
96+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
97+
9098
private int foundCount;
9199

92100
public MobEspHack()
@@ -99,6 +107,8 @@ public MobEspHack()
99107
addSetting(useRainbow);
100108
addSetting(color);
101109
entityFilters.forEach(this::addSetting);
110+
addSetting(onlyAboveGround);
111+
addSetting(aboveGroundY);
102112
addSetting(showCountInHackList);
103113
}
104114

@@ -129,6 +139,9 @@ public void onUpdate()
129139
.filter(LivingEntity.class::isInstance).map(e -> (LivingEntity)e)
130140
.filter(e -> !(e instanceof PlayerEntity))
131141
.filter(e -> !e.isRemoved() && e.getHealth() > 0);
142+
// optionally filter out mobs below the configured Y level
143+
if(onlyAboveGround.isChecked())
144+
stream = stream.filter(e -> e.getY() >= aboveGroundY.getValue());
132145

133146
stream = entityFilters.applyTo(stream);
134147

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private enum SearchMode
7878
new CheckboxSetting("Above ground only",
7979
"Only show mobs at or above the configured Y level.", false);
8080
private final SliderSetting aboveGroundY = new SliderSetting(
81-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
81+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
8282
private final ColorSetting color = new ColorSetting("Color",
8383
"Fixed color used when Rainbow colors is disabled.", Color.PINK);
8484
// New: optionally show detected count in HackList

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public final class PortalEspHack extends Hack implements UpdateListener,
8181
new CheckboxSetting("Above ground only",
8282
"Only show portals at or above the configured Y level.", false);
8383
private final SliderSetting aboveGroundY = new SliderSetting(
84-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
84+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
8585

8686
private final BiPredicate<BlockPos, BlockState> query =
8787
(pos, state) -> state.getBlock() == Blocks.NETHER_PORTAL

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Blocks.BELL, new ColorSetting("Bell color", "", defaultColor),
208208
"Only show redstone components at or above the configured Y level.",
209209
false);
210210
private final SliderSetting aboveGroundY = new SliderSetting(
211-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
211+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
212212

213213
public RedstoneEspHack()
214214
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private enum SearchMode
9696
new net.wurstclient.settings.CheckboxSetting("Above ground only",
9797
"Only show blocks at or above the configured Y level.", false);
9898
private final SliderSetting aboveGroundY = new SliderSetting(
99-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
99+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
100100
private Block lastBlock;
101101
private String lastQuery = "";
102102
private ChunkAreaSetting.ChunkArea lastAreaSelection;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public final class SignEspHack extends Hack implements UpdateListener,
9292
"Above ground only",
9393
"Only show signs/frames at or above the configured Y level.", false);
9494
private final SliderSetting aboveGroundY = new SliderSetting(
95-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
95+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
9696

9797
public SignEspHack()
9898
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public final class WorkstationEspHack extends Hack implements UpdateListener,
188188
"Above ground only",
189189
"Only show workstations at or above the configured Y level.", false);
190190
private final SliderSetting aboveGroundY = new SliderSetting(
191-
"Above ground Y", 62, 0, 255, 1, SliderSetting.ValueDisplay.INTEGER);
191+
"Set ESP Y limit", 62, -65, 255, 1, SliderSetting.ValueDisplay.INTEGER);
192192

193193
public WorkstationEspHack()
194194
{

0 commit comments

Comments
 (0)