From a16074cbe48326bbaaa2356ba761cf6607ef84ac Mon Sep 17 00:00:00 2001 From: Owen <23108066+Owen1212055@users.noreply.github.com> Date: Tue, 7 Jun 2022 06:06:03 -0400 Subject: [PATCH] Fix `//snowsmooth` not working below Y0 (#1769) * Use min y instead of 0 for SnowHeightMap * Correctly handle rounding for height * Revert old fix * Use y instead of newHeight * Remove line diff --- .../com/sk89q/worldedit/math/convolution/SnowHeightMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/math/convolution/SnowHeightMap.java b/worldedit-core/src/main/java/com/sk89q/worldedit/math/convolution/SnowHeightMap.java index 7de599f39..97f58f9e1 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/math/convolution/SnowHeightMap.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/math/convolution/SnowHeightMap.java @@ -232,7 +232,7 @@ public class SnowHeightMap { int y = (int) Math.floor(newHeight); int numOfLayers = (int) ((newHeight - y) * 8) + 1; //FAWE start - avoid BlockVector3 creation for no reason - session.setBlock(x, (int) newHeight, z, BlockTypes.SNOW.getDefaultState().with(LAYERS, numOfLayers)); + session.setBlock(x, y, z, BlockTypes.SNOW.getDefaultState().with(LAYERS, numOfLayers)); //FAWE end }