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
This commit is contained in:
Owen 2022-06-07 06:06:03 -04:00 committed by GitHub
parent d5a84d6e44
commit a16074cbe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}