From d77ae61894c1918685c85b787ce3d8bd60f7eba6 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 4 Aug 2017 15:11:11 +1000 Subject: [PATCH] Fix angle mask --- .../java/com/boydti/fawe/object/mask/AngleMask.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/object/mask/AngleMask.java b/core/src/main/java/com/boydti/fawe/object/mask/AngleMask.java index d192f7d9..7a7ffb5b 100644 --- a/core/src/main/java/com/boydti/fawe/object/mask/AngleMask.java +++ b/core/src/main/java/com/boydti/fawe/object/mask/AngleMask.java @@ -54,14 +54,14 @@ public class AngleMask extends SolidBlockMask implements ResettableMask { public int getHeight(int x, int y, int z) { try { - int rx = x - cacheBotX; - int rz = z - cacheBotZ; + int rx = x - cacheBotX + 16; + int rz = z - cacheBotZ + 16; int index; - if (((rx + 16) & 0xFF) != rx + 16 || ((rz + 16) & 0xFF) != rz + 16) { + if (((rx & 0xFF) != rx || (rz & 0xFF) != rz)) { cacheBotX = x - 16; cacheBotZ = z - 16; - rx = x - cacheBotX; - rz = z - cacheBotZ; + rx = x - cacheBotX + 16; + rz = z - cacheBotZ + 16; index = rx + (rz << 8); if (cacheHeights == null) { cacheHeights = new byte[65536];