Hopefully fixed seemingly random attacks of failed checks while climbing

This commit is contained in:
H31IX committed 2012-08-04 13:34:09 -04:00
1 parent 59e26344fb
commit c56ea8151c
3 files changed
+36 -36

No files matched your search

@@ -303,7 +303,7 @@ public class Backend
public boolean checkSpider(Player player, double y)
{
if (y <= LADDER_Y_MAX && y >= LADDER_Y_MIN && !Utilities.isOnClimbableBlock(player))
if (y <= LADDER_Y_MAX && y >= LADDER_Y_MIN && !Utilities.isClimbableBlock(player.getLocation().getBlock()))
{
return true;
}
@@ -544,7 +544,7 @@ public class Backend
{
return false;
}
if (!isMovingExempt(player) && !Utilities.isOnClimbableBlock(player) && !player.isInsideVehicle() && !Utilities.isInWater(player))
if (!isMovingExempt(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock()) && !Utilities.isClimbableBlock(player.getLocation().add(0, -1, 0).getBlock()) && !player.isInsideVehicle() && !Utilities.isInWater(player))
{
double y1 = player.getLocation().getY();
String name = player.getName();
@@ -682,7 +682,7 @@ public class Backend
max += 12;
}
Block block = player.getLocation().getBlock();
if (!isMovingExempt(player) && !Utilities.isInWater(player) && !Utilities.isOnClimbableBlock(player) && !player.isInsideVehicle())
if (!isMovingExempt(player) && !Utilities.isInWater(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock()) && !player.isInsideVehicle())
{
String name = player.getName();
if (y1 < y2)