Skip to content

Commit 1722817

Browse files
committed
Fix AntiVoid
1 parent d132f3a commit 1722817

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public final class AntiVoidHack extends Hack implements UpdateListener
4242
"Treat the Overworld, Nether and End as if they had a solid floor below you.",
4343
false);
4444

45-
private final SliderSetting overworldFalseFloorY = new SliderSetting(
46-
"Overworld floor Y",
47-
"Block Y for the fake Overworld floor. The walkable surface is one block above this.",
48-
-4, -64, 320, 1, ValueDisplay.INTEGER);
45+
private final SliderSetting overworldFalseFloorY = new SliderSetting(
46+
"Overworld floor Y",
47+
"Block Y for the fake Overworld floor. The walkable surface is one block above this.",
48+
-68, -100, -64, 1, ValueDisplay.INTEGER);
4949

5050
private final SliderSetting netherFalseFloorY = new SliderSetting(
5151
"Nether floor Y",
@@ -63,7 +63,7 @@ public final class AntiVoidHack extends Hack implements UpdateListener
6363

6464
private final CheckboxSetting gateAtVoidLevel = new CheckboxSetting(
6565
"Respond only at void level",
66-
"Only trigger when reaching the standard void level (End: -60, Others: -125).\n"
66+
"Only trigger when reaching the configured void level (Overworld: -64..-100, End/Nether: -60).\n"
6767
+ "For lava, triggers one block above the lava surface.",
6868
false);
6969

@@ -80,12 +80,12 @@ public final class AntiVoidHack extends Hack implements UpdateListener
8080
private final SliderSetting lavaBufferBlocks = new SliderSetting(
8181
"Lava buffer (blocks)", 2, 0, 12, 1, ValueDisplay.INTEGER);
8282

83-
// Fixed thresholds are used; no per-dimension sliders.
83+
// Nether/End thresholds are fixed; Overworld uses the floor slider.
8484

8585
private final CheckboxSetting autoEnableByHeight = new CheckboxSetting(
8686
"Auto-enable by height",
8787
"Automatically enables AntiVoid when your Y is within a safety band below 0.\n"
88-
+ "Defaults: End -65..0, Others -125..-60.",
88+
+ "Defaults: Overworld -64, End/Nether -60.",
8989
true);
9090

9191
private Vec3 lastSafePos;
@@ -479,21 +479,20 @@ private Integer lavaYBelow(LocalPlayer player)
479479
private double fixedVoidLevel()
480480
{
481481
if(MC.level == null)
482-
return -120.0;
482+
return overworldFalseFloorY.getValue();
483483
String key = MC.level.dimension().identifier().getPath();
484484
if("the_end".equals(key))
485485
return -60.0;
486486
if("the_nether".equals(key))
487487
return -60.0;
488488
// Overworld
489-
return -120.0;
489+
return overworldFalseFloorY.getValue();
490490
}
491491

492492
// No height band method needed; using fixed thresholds.
493493

494494
/**
495495
* Returns a safe Y level above void damage based on fixedVoidLevel().
496-
* Overworld: -117 (4 blocks above -121 damage), Nether/End: -57.
497496
*/
498497
private double rescueTargetY()
499498
{

0 commit comments

Comments
 (0)