Fixed WaterWalk false positive with carpets, fixed 1.17-related Speed false positive

This commit is contained in:
Rammelkast committed 2021-10-24 11:12:30 +02:00
1 parent 5c596f5e2f
commit 6af50e5a33
3 files changed
+38 -16

No files matched your search

@@ -36,6 +36,7 @@ import com.rammelkast.anticheatreloaded.util.User;
import com.rammelkast.anticheatreloaded.util.Utilities;
import com.rammelkast.anticheatreloaded.util.VelocityTracker;
import com.rammelkast.anticheatreloaded.util.VersionUtil;
import com.rammelkast.anticheatreloaded.util.XMaterial;
/**
* @author Rammelkast TODO soulsand speed TODO buffer system
@@ -384,6 +385,11 @@ public final class SpeedCheck {
maxMotionY *= 1.0525D;
}
// Adjust for powdered snow
if (distance.getFrom().getBlock().getType() == XMaterial.POWDER_SNOW.parseMaterial()) {
maxMotionY += 0.17D;
}
// Adjust for velocity
maxMotionY += velocityTracker.getVertical();