From 94a14b03b6c7b8c05ad801be83ce209e7e12bd86 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 17 Dec 2020 15:26:17 +0000 Subject: [PATCH] fix brush size 0/1 --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index fc822a7bb..9a02e26cd 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -2046,18 +2046,18 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { int yy; - double nextXn = invRadiusX; + double nextXn = 0; forX: for (int x = 0; x <= ceilRadiusX; ++x) { final double xn = nextXn; double dx = xn * xn; nextXn = (x + 1) * invRadiusX; - double nextZn = invRadiusZ; + double nextZn = 0; forZ: for (int z = 0; z <= ceilRadiusZ; ++z) { final double zn = nextZn; double dz = zn * zn; double dxz = dx + dz; nextZn = (z + 1) * invRadiusZ; - double nextYn = invRadiusY; + double nextYn = 0; forY: for (int y = 0; y <= ceilRadiusY; ++y) { final double yn = nextYn; @@ -2076,7 +2076,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { } if (!filled) { - if (nextXn * nextXn + dy + dz <= 1 && nextYn * nextYn + dx + dz <= 1 && nextZn * nextZn + dx + dy <= 1) { + if (nextXn * nextXn + dy * dy + dz * dz <= 1 && nextYn * nextYn + dx * dx + dz * dz <= 1 && nextZn * nextZn + dx * dx + dy * dy <= 1) { continue; } }