Use manhattan method for WrongBlock (not a change for the logic).

This commit is contained in:
asofold 2014-02-16 19:26:12 +01:00
parent 3f78497fde
commit a198133cfa

View File

@ -7,6 +7,7 @@ import fr.neatmonster.nocheatplus.checks.Check;
import fr.neatmonster.nocheatplus.checks.CheckType;
import fr.neatmonster.nocheatplus.checks.combined.Improbable;
import fr.neatmonster.nocheatplus.permissions.Permissions;
import fr.neatmonster.nocheatplus.utilities.TrigUtil;
public class WrongBlock extends Check {
@ -30,7 +31,7 @@ public class WrongBlock extends Check {
boolean cancel = false;
final boolean wrongTime = data.fastBreakfirstDamage < data.fastBreakBreakTime;
final int dist = Math.abs(data.clickedX - block.getX()) + Math.abs(data.clickedY - block.getY()) + Math.abs(data.clickedZ - block.getZ());
final int dist = TrigUtil.manhattan(data.clickedX, data.clickedY, data.clickedZ, block);
final boolean wrongBlock;
final long now = System.currentTimeMillis();
if (dist == 0){