Fix collision between AABB and a dot (#8733)

Dieser Commit ist enthalten in:
Lulu13022002 2023-06-09 04:17:32 +02:00 committet von GitHub
Ursprung 21f2d158c4
Commit 3621d76d8f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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()) {