From 9126c083ab7971f9d0d5309fcbf0255d32474ff0 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sun, 7 Jan 2018 17:11:40 +1100 Subject: [PATCH] Fixes #862 --- .../java/com/boydti/fawe/bukkit/util/cui/StructureCUI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/util/cui/StructureCUI.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/util/cui/StructureCUI.java index 42f6ad72..8ee95ed7 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/util/cui/StructureCUI.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/util/cui/StructureCUI.java @@ -162,9 +162,9 @@ public class StructureCUI extends CUI { double rotX = playerLoc.getYaw(); double rotY = playerLoc.getPitch(); double xz = Math.cos(Math.toRadians(rotY)); - int x = (int) (playerLoc.getX() - (-xz * Math.sin(Math.toRadians(rotX))) * 3); - int z = (int) (playerLoc.getZ() - (xz * Math.cos(Math.toRadians(rotX))) * 3); - int y = Math.min(Math.min(255, max.getBlockY() + 32), playerLoc.getBlockY() + 3); + int x = (int) (playerLoc.getX() - (-xz * Math.sin(Math.toRadians(rotX))) * 12); + int z = (int) (playerLoc.getZ() - (xz * Math.cos(Math.toRadians(rotX))) * 12); + int y = Math.max(0, Math.min(Math.min(255, max.getBlockY() + 32), playerLoc.getBlockY() + 3)); int minX = Math.max(Math.min(32, min.getBlockX() - x), -32); int maxX = Math.max(Math.min(32, max.getBlockX() - x + 1), -32); int minY = Math.max(Math.min(32, min.getBlockY() - y), -32);