Skip to content

Commit

Permalink
Make EditSession#center (//center) set even y blocks.
Browse files Browse the repository at this point in the history
At some point this was fixed for x and z but never for y...
  • Loading branch information
wizjany committed Aug 6, 2019
1 parent 6ab74dc commit a1465c0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1028,8 +1028,10 @@ public int center(Region region, Pattern pattern) throws MaxChangedBlocksExcepti
Region centerRegion = new CuboidRegion( Region centerRegion = new CuboidRegion(
getWorld(), // Causes clamping of Y range getWorld(), // Causes clamping of Y range
BlockVector3.at(((int) center.getX()), ((int) center.getY()), ((int) center.getZ())), BlockVector3.at(((int) center.getX()), ((int) center.getY()), ((int) center.getZ())),
BlockVector3.at(MathUtils.roundHalfUp(center.getX()), BlockVector3.at(
center.getY(), MathUtils.roundHalfUp(center.getZ()))); MathUtils.roundHalfUp(center.getX()),
MathUtils.roundHalfUp(center.getY()),
MathUtils.roundHalfUp(center.getZ())));
return setBlocks(centerRegion, pattern); return setBlocks(centerRegion, pattern);
} }


Expand Down

0 comments on commit a1465c0

Please sign in to comment.