Skip to content

Commit 4e61494

Browse files
committed
Updated NoSlowDown and TrueSight
1 parent c396860 commit 4e61494

File tree

5 files changed

+114
-43
lines changed

5 files changed

+114
-43
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ Examples:
470470

471471
### NoSlowDown Improved
472472
- Added no slowdown for lava
473+
- Added no slowdown for water
474+
475+
### TrueSight Improved
476+
- Added customisable glow ESP for invisible entities
473477

474478
### Alt Manager Improved
475479
- Can now multi-select and delete alt accounts

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

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,53 @@
1111
import net.wurstclient.SearchTags;
1212
import net.wurstclient.events.IsPlayerInLavaListener;
1313
import net.wurstclient.events.IsPlayerInLavaListener.IsPlayerInLavaEvent;
14+
import net.wurstclient.events.IsPlayerInWaterListener;
15+
import net.wurstclient.events.IsPlayerInWaterListener.IsPlayerInWaterEvent;
1416
import net.wurstclient.events.VelocityFromFluidListener;
1517
import net.wurstclient.events.VelocityFromFluidListener.VelocityFromFluidEvent;
1618
import net.wurstclient.hack.Hack;
1719
import net.wurstclient.settings.CheckboxSetting;
1820

1921
@SearchTags({"no slowdown", "no slow down"})
20-
public final class NoSlowdownHack extends Hack
21-
implements IsPlayerInLavaListener, VelocityFromFluidListener
22+
public final class NoSlowdownHack extends Hack implements
23+
IsPlayerInLavaListener, IsPlayerInWaterListener, VelocityFromFluidListener
2224
{
2325
private final CheckboxSetting lavaSpeed = new CheckboxSetting(
2426
"No lava slowdown", "Removes lava movement penalties.\n"
2527
+ "Some servers treat this like a speedhack.",
2628
false);
29+
private final CheckboxSetting waterSpeed = new CheckboxSetting(
30+
"No water slowdown", "Removes water movement penalties.\n"
31+
+ "Some servers treat this like a speedhack.",
32+
false);
2733

2834
private boolean bypassingLava;
35+
private boolean bypassingWater;
2936

3037
public NoSlowdownHack()
3138
{
3239
super("NoSlowdown");
3340
setCategory(Category.MOVEMENT);
3441
addSetting(lavaSpeed);
42+
addSetting(waterSpeed);
3543
}
3644

3745
@Override
3846
protected void onEnable()
3947
{
4048
EVENTS.add(IsPlayerInLavaListener.class, this);
49+
EVENTS.add(IsPlayerInWaterListener.class, this);
4150
EVENTS.add(VelocityFromFluidListener.class, this);
4251
}
4352

4453
@Override
4554
protected void onDisable()
4655
{
4756
EVENTS.remove(IsPlayerInLavaListener.class, this);
57+
EVENTS.remove(IsPlayerInWaterListener.class, this);
4858
EVENTS.remove(VelocityFromFluidListener.class, this);
4959
bypassingLava = false;
60+
bypassingWater = false;
5061
}
5162

5263
@Override
@@ -68,14 +79,38 @@ public void onIsPlayerInLava(IsPlayerInLavaEvent event)
6879
bypassingLava = false;
6980
}
7081

82+
@Override
83+
public void onIsPlayerInWater(IsPlayerInWaterEvent event)
84+
{
85+
if(!waterSpeed.isChecked())
86+
{
87+
bypassingWater = false;
88+
return;
89+
}
90+
91+
if(event.isNormallyInWater())
92+
{
93+
bypassingWater = true;
94+
event.setInWater(false);
95+
return;
96+
}
97+
98+
bypassingWater = false;
99+
}
100+
71101
@Override
72102
public void onVelocityFromFluid(VelocityFromFluidEvent event)
73103
{
74-
if(!lavaSpeed.isChecked() || !bypassingLava)
104+
boolean cancelLava = lavaSpeed.isChecked() && bypassingLava;
105+
boolean cancelWater = waterSpeed.isChecked() && bypassingWater;
106+
107+
if(!cancelLava && !cancelWater)
108+
return;
109+
110+
if(event.getEntity() != MC.player)
75111
return;
76112

77-
if(event.getEntity() == MC.player)
78-
event.cancel();
113+
event.cancel();
79114
}
80115

81116
// See BlockMixin.onGetVelocityMultiplier() and

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

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ public final class SeedMapperHelperHack extends Hack
105105
private final ButtonSetting applySeedResolutionOrderButton =
106106
new ButtonSetting("Apply resolution order",
107107
this::applySeedResolutionOrder);
108-
private final CheckboxSetting oreAirCheckSetting =
109-
new CheckboxSetting("Ore air check enabled", false);
110-
private final ButtonSetting applyOreAirCheckButton =
111-
new ButtonSetting("Apply OreAirCheck", this::applyOreAirCheck);
112-
private final CheckboxSetting clearSeedMapCachesSetting =
113-
new CheckboxSetting("Clear SeedMap caches on close", false);
114-
private final ButtonSetting applyClearSeedMapCachesButton =
115-
new ButtonSetting("Apply ClearSeedMapCachesOnClose",
116-
this::applyClearSeedMapCaches);
108+
private final CheckboxSetting oreAirCheckSetting =
109+
new CheckboxSetting("Ore air check enabled", false);
110+
private final ButtonSetting applyOreAirCheckButton =
111+
new ButtonSetting("Apply OreAirCheck", this::applyOreAirCheck);
112+
private final CheckboxSetting clearSeedMapCachesSetting =
113+
new CheckboxSetting("Clear SeedMap caches on close", false);
114+
private final ButtonSetting applyClearSeedMapCachesButton =
115+
new ButtonSetting("Apply ClearSeedMapCachesOnClose",
116+
this::applyClearSeedMapCaches);
117117
private final SliderSetting seedMapThreadsSetting = new SliderSetting(
118118
"Seed map threads", 4, 1, 32, 1, ValueDisplay.INTEGER);
119119
private final ButtonSetting applySeedMapThreadsButton =
@@ -301,12 +301,12 @@ public SeedMapperHelperHack()
301301
addSetting(addSavedSeedButton);
302302
addSetting(seedResolutionOrderSetting);
303303
addSetting(applySeedResolutionOrderButton);
304-
addSetting(oreAirCheckSetting);
305-
addSetting(applyOreAirCheckButton);
306-
addSetting(clearSeedMapCachesSetting);
307-
addSetting(applyClearSeedMapCachesButton);
308-
addSetting(seedMapThreadsSetting);
309-
addSetting(applySeedMapThreadsButton);
304+
addSetting(oreAirCheckSetting);
305+
addSetting(applyOreAirCheckButton);
306+
addSetting(clearSeedMapCachesSetting);
307+
addSetting(applyClearSeedMapCachesButton);
308+
addSetting(seedMapThreadsSetting);
309+
addSetting(applySeedMapThreadsButton);
310310
addSetting(pixelsPerBiomeSetting);
311311
addSetting(applyPixelsPerBiomeButton);
312312
addSetting(toggledFeaturesSetting);
@@ -320,15 +320,15 @@ public SeedMapperHelperHack()
320320
seedCheckInputSetting, applySeedInputButton, stopTaskButton,
321321
showCommandFeedbackSetting);
322322
addSection("SeedMapper config", "Convenience controls for /sm:config.",
323-
savedSeedValueSetting, addSavedSeedButton,
324-
seedResolutionOrderSetting, applySeedResolutionOrderButton,
325-
oreAirCheckSetting, applyOreAirCheckButton,
326-
clearSeedMapCachesSetting, applyClearSeedMapCachesButton,
327-
seedMapThreadsSetting,
328-
applySeedMapThreadsButton, pixelsPerBiomeSetting,
329-
applyPixelsPerBiomeButton, toggledFeaturesSetting,
330-
applyToggledFeaturesButton, devModeSetting, applyDevModeButton,
331-
espTimeoutMinutesSetting, applyEspTimeoutMinutesButton);
323+
savedSeedValueSetting, addSavedSeedButton,
324+
seedResolutionOrderSetting, applySeedResolutionOrderButton,
325+
oreAirCheckSetting, applyOreAirCheckButton,
326+
clearSeedMapCachesSetting, applyClearSeedMapCachesButton,
327+
seedMapThreadsSetting, applySeedMapThreadsButton,
328+
pixelsPerBiomeSetting, applyPixelsPerBiomeButton,
329+
toggledFeaturesSetting, applyToggledFeaturesButton, devModeSetting,
330+
applyDevModeButton, espTimeoutMinutesSetting,
331+
applyEspTimeoutMinutesButton);
332332

333333
addSetting(highlightModeSetting);
334334
addSetting(highlightBlockSetting);
@@ -750,19 +750,20 @@ private void applySeedResolutionOrder()
750750
"set SeedResolutionOrder");
751751
}
752752

753-
private void applyOreAirCheck()
754-
{
755-
runSimpleCommand(
756-
"sm:config OreAirCheck set " + oreAirCheckSetting.isChecked(),
757-
"set OreAirCheck");
758-
}
759-
760-
private void applyClearSeedMapCaches()
761-
{
762-
runSimpleCommand("sm:config ClearSeedMapCachesOnClose set "
763-
+ clearSeedMapCachesSetting.isChecked(),
764-
"set ClearSeedMapCachesOnClose");
765-
}
753+
private void applyOreAirCheck()
754+
{
755+
runSimpleCommand(
756+
"sm:config OreAirCheck set " + oreAirCheckSetting.isChecked(),
757+
"set OreAirCheck");
758+
}
759+
760+
private void applyClearSeedMapCaches()
761+
{
762+
runSimpleCommand(
763+
"sm:config ClearSeedMapCachesOnClose set "
764+
+ clearSeedMapCachesSetting.isChecked(),
765+
"set ClearSeedMapCachesOnClose");
766+
}
766767

767768
private void applySeedMapThreads()
768769
{

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
77
*/
88
package net.wurstclient.hacks;
99

10+
import java.awt.Color;
1011
import net.minecraft.world.entity.Entity;
12+
import net.minecraft.world.entity.LivingEntity;
1113
import net.wurstclient.Category;
1214
import net.wurstclient.SearchTags;
1315
import net.wurstclient.hack.Hack;
16+
import net.wurstclient.settings.CheckboxSetting;
17+
import net.wurstclient.settings.ColorSetting;
1418
import net.wurstclient.settings.filterlists.EntityFilterList;
1519
import net.wurstclient.settings.filters.*;
1620

@@ -39,11 +43,19 @@ public final class TrueSightHack extends Hack
3943
FilterAllaysSetting.genericVision(false),
4044
FilterNamedSetting.genericVision(false),
4145
FilterArmorStandsSetting.genericVision(false));
46+
private final CheckboxSetting glowInvisible = new CheckboxSetting(
47+
"Glow invisible entities",
48+
"Adds a glow outline around invisible entities that pass your filters.",
49+
false);
50+
private final ColorSetting glowColor = new ColorSetting("Glow color",
51+
"Color used for the glow outline.", new Color(0, 255, 255));
4252

4353
public TrueSightHack()
4454
{
4555
super("TrueSight");
4656
setCategory(Category.RENDER);
57+
addSetting(glowInvisible);
58+
addSetting(glowColor);
4759
entityFilters.forEach(this::addSetting);
4860
}
4961

@@ -52,5 +64,19 @@ public boolean shouldBeVisible(Entity entity)
5264
return isEnabled() && entityFilters.testOne(entity);
5365
}
5466

67+
public Integer getGlowColor(LivingEntity entity)
68+
{
69+
if(!glowInvisible.isChecked())
70+
return null;
71+
72+
if(!isEnabled() || !shouldBeVisible(entity))
73+
return null;
74+
75+
if(!entity.isInvisible())
76+
return null;
77+
78+
return glowColor.getColorI();
79+
}
80+
5581
// See EntityMixin.onIsInvisibleTo()
5682
}

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ private Integer getEspGlowColor(LivingEntity living)
122122
if(color != null)
123123
return color;
124124

125-
return NiceWurstModule.filterGlowColor(living,
125+
color = NiceWurstModule.filterGlowColor(living,
126126
hax.mobEspHack.getGlowColor(living));
127+
if(color != null)
128+
return color;
129+
130+
return NiceWurstModule.filterGlowColor(living,
131+
hax.trueSightHack.getGlowColor(living));
127132
}
128133
}

0 commit comments

Comments
 (0)