mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-05 15:01:46 +01:00
Revert "Fixed boundingBox.withOffset() (#2488)"
This reverts commit 18d6e0c6d6
, it was previously a breaking change that did not make a lot of sense, and broke other methods.
This commit is contained in:
parent
07bd1c12b6
commit
10d6d2bb2e
@ -21,11 +21,11 @@ public record BoundingBox(Vec relativeStart, Vec relativeEnd) implements Shape {
|
|||||||
final static BoundingBox ZERO = new BoundingBox(Vec.ZERO, Vec.ZERO);
|
final static BoundingBox ZERO = new BoundingBox(Vec.ZERO, Vec.ZERO);
|
||||||
|
|
||||||
public BoundingBox(double width, double height, double depth, Point offset) {
|
public BoundingBox(double width, double height, double depth, Point offset) {
|
||||||
this(new Vec(-width / 2.0, 0.0, -depth / 2.0).add(offset), new Vec(width / 2.0, height, depth / 2.0).add(offset));
|
this(Vec.fromPoint(offset), new Vec(width, height, depth).add(offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
public BoundingBox(double width, double height, double depth) {
|
public BoundingBox(double width, double height, double depth) {
|
||||||
this(width, height, depth, Vec.ZERO);
|
this(width, height, depth, new Vec(-width / 2, 0, -depth / 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user