Fix collision between AABB and a dot (#8733)

This commit is contained in:
Lulu13022002 2023-06-09 04:17:32 +02:00 committed by GitHub
parent 21f2d158c4
commit 3621d76d8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -975,7 +975,7 @@ index 0000000000000000000000000000000000000000..a87f6380b2c387fb0cdd40d5087b5c93
+}
diff --git a/src/main/java/io/papermc/paper/voxel/AABBVoxelShape.java b/src/main/java/io/papermc/paper/voxel/AABBVoxelShape.java
new file mode 100644
index 0000000000000000000000000000000000000000..d67a40e7be030142443680c89e1763fc9ecdfe0a
index 0000000000000000000000000000000000000000..3d2fa2466fe40e0b9d7749498684587a11dfa80a
--- /dev/null
+++ b/src/main/java/io/papermc/paper/voxel/AABBVoxelShape.java
@@ -0,0 +1,200 @@
@ -1159,7 +1159,7 @@ index 0000000000000000000000000000000000000000..d67a40e7be030142443680c89e1763fc
+
+ @Override
+ public double collide(Direction.Axis enumdirection_enumaxis, AABB axisalignedbb, double d0) {
+ if (CollisionUtil.isEmpty(this.aabb) || CollisionUtil.isEmpty(axisalignedbb)) {
+ if (CollisionUtil.isEmpty(this.aabb)) {
+ return d0;
+ }
+ switch (enumdirection_enumaxis.ordinal()) {