mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Fixed two WaterWalk falses
This commit is contained in:
1 parent
07f957cf35
commit
4deb8ae0fb
5 files changed
+19
-11
No files matched your search
@@ -124,17 +124,22 @@ public final class Utilities {
|
||||
}
|
||||
|
||||
public static boolean couldBeOnBoat(Player player) {
|
||||
return couldBeOnBoat(player, 0.35);
|
||||
return couldBeOnBoat(player, 0.35, false);
|
||||
}
|
||||
|
||||
public static boolean couldBeOnBoat(Player player, double range) {
|
||||
public static boolean couldBeOnBoat(Player player, double range, boolean checkY) {
|
||||
for (Entity entity : player.getNearbyEntities(range, range, range)) {
|
||||
if (entity instanceof Boat)
|
||||
return true;
|
||||
if (entity instanceof Boat) {
|
||||
if (((Boat) entity).getLocation().getY() < player.getLocation().getY() + 0.25) {
|
||||
return true;
|
||||
} else if (!checkY) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether a player could be standing on ice
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user