Fix BlockPosition#offset(double,double,double) (#9190)

This commit is contained in:
Bjarne Koll 2023-05-07 14:14:34 +02:00 committed by GitHub
parent 813d0399f9
commit 1d4c7806ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add Position
diff --git a/src/main/java/io/papermc/paper/math/BlockPosition.java b/src/main/java/io/papermc/paper/math/BlockPosition.java
new file mode 100644
index 0000000000000000000000000000000000000000..f164d32cfbd5bfd84f3067a149d34bb1185a7e00
index 0000000000000000000000000000000000000000..f0fdabce4af640da2a406412e67020761ded3ac1
--- /dev/null
+++ b/src/main/java/io/papermc/paper/math/BlockPosition.java
@@ -0,0 +1,98 @@
@ -64,7 +64,7 @@ index 0000000000000000000000000000000000000000..f164d32cfbd5bfd84f3067a149d34bb1
+
+ @Override
+ default @NotNull FinePosition offset(double x, double y, double z) {
+ return new FinePositionImpl(this.blockX() + z, this.blockY() + y, this.blockZ() + z);
+ return new FinePositionImpl(this.blockX() + x, this.blockY() + y, this.blockZ() + z);
+ }
+
+ /**