Add SafeWalk Min Depth Option Support #957
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Min Depth Option For Safe Walk Hack
In this pull request, I've added a
Min depth
option for the hackSafeWalk
, making this hack better because you will no longer be sneaking on a stair, really annoying.Note
I only made for Minecraft 1.20.1, most of the modpack is on this version I think.
Warning
I know nearly nothing about those anti-cheat mods/plugins and haven't tested any of them, so use at your own risk.
As far as I know, the modified version of
SafeWalk
is not suspicious at all, thoughHow It Works
How it originally worked:
ClientPlayerEntityMixin.java
, the hack add a condition toclipAtLedge()
method, so whenever the hack is enabled, the player will always keep you on the ledge.SafeWalkHack.java
, it checks if the adjusted (byEdge distance
option) player bounding box is empty, if so, make the player sneak.It's not gonna work if I only adjust the bounding box, because the player will still clip at ledge, checking the bounding box on
clipAtLedge()
will lead to another problem too: it would wait until the bounding box is emptied, but then it's too late, the player already leaved the ledge.So, I must make a motion prediction, if
bounding box + velocity
is going straight to a ledge, then clip!How it work, modified version:
bounding box + velocity
is empty, clip at ledge.I also added a option named
Motion prediction
, it's the modifier of how much motion should be take as reference (But I don't know why, it does not differ a lot.)Hope this helps!
P.S. Wurst API is so great :)
P.S. Why spotless check :(