diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java index cac9f4a7b2..63476ced61 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/Clipboard.java @@ -190,6 +190,41 @@ default int getLength() { return getDimensions().z(); } + default BlockVector3 getCenter() { + return new BlockVector3() { + @Override + public int x() { + return getWidth() / 2; + } + + @Override + public int y() { + return getHeight() / 2; + } + + @Override + public int z() { + return getLength() / 2; + } + }; + } + + default double getDiagonal() { + return getMinimumPoint().distance(getMaximumPoint()); + } + + default int getDiagonalSq() { + return getMinimumPoint().distanceSq(getMaximumPoint()); + } + + default double getRadius() { + return getDiagonal() / 2; + } + + default int getRadiusSq() { + return getDiagonalSq() / 4; + } + default int getArea() { return getWidth() * getLength(); }