mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-16 15:45:21 +01:00
fix: do not add a 1,1,1->0,0,0 collision shape if no boundingbox is present
This commit is contained in:
parent
fa0cd40ac1
commit
4d2e78e7cf
@ -33,7 +33,7 @@ public final class ShapeImpl implements Shape {
|
||||
this.blockEntry = blockEntry;
|
||||
|
||||
// Find bounds of collision
|
||||
{
|
||||
if (collisionBoundingBoxes.length > 0) {
|
||||
double minX = 1, minY = 1, minZ = 1;
|
||||
double maxX = 0, maxY = 0, maxZ = 0;
|
||||
for (BoundingBox blockSection : collisionBoundingBoxes) {
|
||||
@ -48,6 +48,9 @@ public final class ShapeImpl implements Shape {
|
||||
}
|
||||
this.relativeStart = new Vec(minX, minY, minZ);
|
||||
this.relativeEnd = new Vec(maxX, maxY, maxZ);
|
||||
} else {
|
||||
this.relativeStart = Vec.ZERO;
|
||||
this.relativeEnd = Vec.ZERO;
|
||||
}
|
||||
|
||||
byte fullCollisionFaces = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user