From 5a482f4d38401974a25afc943016c6b98ae7a69f Mon Sep 17 00:00:00 2001 From: Hazel Trinity Date: Sun, 16 Aug 2020 15:40:53 -0700 Subject: [PATCH] Fixed argument exception If someone knows better please tell --- .../com/boydti/fawe/object/brush/sweep/Spline.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/brush/sweep/Spline.java b/worldedit-core/src/main/java/com/boydti/fawe/object/brush/sweep/Spline.java index a1090bf09..7c7e5cd92 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/brush/sweep/Spline.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/brush/sweep/Spline.java @@ -178,7 +178,15 @@ public abstract class Spline { double flexOffset = flexPosition - previousSection.flexStart; double uniOffset = flexOffset / previousSection.flexLength * previousSection.uniLength; - return previousSection.uniStart + uniOffset; + double finalPosition = previousSection.uniStart + uniOffset; + + //Really rough fix, but fixes a bug with no visual artifacts so it's probably ok? + //flexPosition very close to 1 causes outputs very slightly higher than 1 on rare occasions + if (finalPosition > 1) { + return 1; + } + + return finalPosition; } private class Section {