mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Fix fly false-positive while crouching on stairs. Addresses issue #58
This commit is contained in:
1 parent
8f47edd61e
commit
0ca74f2c18
2 files changed
+11
-1
No files matched your search
@@ -604,13 +604,17 @@ public class Backend
|
||||
}
|
||||
else if(y1 == y2 || y1 < y2)
|
||||
{
|
||||
//Check if the player is crouching on slabs
|
||||
//Check if the player is crouching on slabs or stairs
|
||||
if(player.isSneaking())
|
||||
{
|
||||
if(block.getRelative(BlockFace.NORTH).getTypeId() == 43 || block.getRelative(BlockFace.NORTH).getTypeId() == 44 || block.getRelative(BlockFace.SOUTH).getTypeId() == 43 || block.getRelative(BlockFace.SOUTH).getTypeId() == 44 || block.getRelative(BlockFace.EAST).getTypeId() == 43 || block.getRelative(BlockFace.EAST).getTypeId() == 44 || block.getRelative(BlockFace.WEST).getTypeId() == 43 || block.getRelative(BlockFace.WEST).getTypeId() == 44)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(Utilities.isStair(block.getRelative(BlockFace.NORTH)) || Utilities.isStair(block.getRelative(BlockFace.SOUTH)) || Utilities.isStair(block.getRelative(BlockFace.EAST)) || Utilities.isStair(block.getRelative(BlockFace.WEST)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
int violation = flightViolation.containsKey(name) ? flightViolation.get(name)+1 : 1;
|
||||
increment(player, flightViolation, violation);
|
||||
|
||||
Reference in new issue
Block a user