From a1465c02ed56d6870afbb1d09eff0bd92041b58c Mon Sep 17 00:00:00 2001 From: wizjany Date: Mon, 5 Aug 2019 22:44:51 -0400 Subject: [PATCH] Make EditSession#center (//center) set even y blocks. At some point this was fixed for x and z but never for y... --- .../src/main/java/com/sk89q/worldedit/EditSession.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 07f4fd795..183f7542f 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1028,8 +1028,10 @@ public class EditSession implements Extent, AutoCloseable { Region centerRegion = new CuboidRegion( getWorld(), // Causes clamping of Y range BlockVector3.at(((int) center.getX()), ((int) center.getY()), ((int) center.getZ())), - BlockVector3.at(MathUtils.roundHalfUp(center.getX()), - center.getY(), MathUtils.roundHalfUp(center.getZ()))); + BlockVector3.at( + MathUtils.roundHalfUp(center.getX()), + MathUtils.roundHalfUp(center.getY()), + MathUtils.roundHalfUp(center.getZ()))); return setBlocks(centerRegion, pattern); }