mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fix empty voxel shape usage (Fixes #7043)
This commit is contained in:
parent
fd9b86bcb9
commit
62a868c3e4
1 changed files with 5 additions and 6 deletions
|
@ -1467,10 +1467,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
|
|
||||||
public static VoxelShape box(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
|
public static VoxelShape box(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
|
||||||
@@ -0,0 +0,0 @@ public final class Shapes {
|
@@ -0,0 +0,0 @@ public final class Shapes {
|
||||||
}
|
|
||||||
|
|
||||||
public static VoxelShape create(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
|
public static VoxelShape create(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
|
||||||
- if (!(maxX - minX < 1.0E-7D) && !(maxY - minY < 1.0E-7D) && !(maxZ - minZ < 1.0E-7D)) {
|
if (!(maxX - minX < 1.0E-7D) && !(maxY - minY < 1.0E-7D) && !(maxZ - minZ < 1.0E-7D)) {
|
||||||
- int i = findBits(minX, maxX);
|
- int i = findBits(minX, maxX);
|
||||||
- int j = findBits(minY, maxY);
|
- int j = findBits(minY, maxY);
|
||||||
- int k = findBits(minZ, maxZ);
|
- int k = findBits(minZ, maxZ);
|
||||||
|
@ -1487,10 +1486,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
- } else {
|
- } else {
|
||||||
- return new ArrayVoxelShape(BLOCK.shape, (DoubleList)DoubleArrayList.wrap(new double[]{minX, maxX}), (DoubleList)DoubleArrayList.wrap(new double[]{minY, maxY}), (DoubleList)DoubleArrayList.wrap(new double[]{minZ, maxZ}));
|
- return new ArrayVoxelShape(BLOCK.shape, (DoubleList)DoubleArrayList.wrap(new double[]{minX, maxX}), (DoubleList)DoubleArrayList.wrap(new double[]{minY, maxY}), (DoubleList)DoubleArrayList.wrap(new double[]{minZ, maxZ}));
|
||||||
- }
|
- }
|
||||||
- } else {
|
+ return new io.papermc.paper.voxel.AABBVoxelShape(new AABB(minX, minY, minZ, maxX, maxY, maxZ)); // Paper
|
||||||
- return empty();
|
} else {
|
||||||
- }
|
return empty();
|
||||||
+ return new io.papermc.paper.voxel.AABBVoxelShape(new AABB(minX, minY, minZ, maxX, maxY, maxZ)); // Paper
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static VoxelShape create(AABB box) {
|
public static VoxelShape create(AABB box) {
|
||||||
|
|
Loading…
Reference in a new issue