Skip to content

Commit

Permalink
Add Yaw and Pitch to CraftEntity.teleportAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
sofianedjerbi authored and Spottedleaf committed Jul 1, 2023
1 parent 6e317fd commit 6b978f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions patches/server/0003-Threaded-Regions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24043,7 +24043,7 @@ index cd4ad8261e56365850068db1d83d6a8454026737..78f7e72f2912dae503c2dab7d1992b65
List<String> offers = waitable.get();
if (offers == null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 733158b6f2c2bd03fbe798562ff7bc33280548dc..f001d811e930230f729b0340fb54f083fc4a9eb1 100644
index 733158b6f2c2bd03fbe798562ff7bc33280548dc..2fe15f615522b60bba8e7551eef182458d163cd5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -203,6 +203,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
Expand Down Expand Up @@ -24112,7 +24112,7 @@ index 733158b6f2c2bd03fbe798562ff7bc33280548dc..f001d811e930230f729b0340fb54f083
+ boolean success = nmsEntity.teleportAsync(
+ ((CraftWorld)locationClone.getWorld()).getHandle(),
+ new net.minecraft.world.phys.Vec3(locationClone.getX(), locationClone.getY(), locationClone.getZ()),
+ null, null, net.minecraft.world.phys.Vec3.ZERO,
+ locationClone.getYaw(), locationClone.getPitch(), net.minecraft.world.phys.Vec3.ZERO,
+ cause == null ? TeleportCause.UNKNOWN : cause,
+ Entity.TELEPORT_FLAG_LOAD_CHUNK | Entity.TELEPORT_FLAG_UNMOUNT, // preserve behavior with old API: dismount the entity so it can teleport
+ (Entity entityTp) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ index 75c7645fb5732c43d1da15181cf5c7ee4c3ecd6c..6d3325436a77153438bc40aa86819562
}

diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index f001d811e930230f729b0340fb54f083fc4a9eb1..76bcfda336e9cfa039d80ea3ccbebbc3d2b13f7f 100644
index 2fe15f615522b60bba8e7551eef182458d163cd5..bcb85a4253b5e44b78cbadfb16c3bf0d47d7369e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -822,7 +822,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
Expand Down

0 comments on commit 6b978f2

Please sign in to comment.