Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sofianedjerbi committed Jun 22, 2023
1 parent 3176184 commit 6657b9c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 39 deletions.
19 changes: 19 additions & 0 deletions patches/server/0040-Fix-teleportAsync-rotation-API.patch
@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kugge <sofiane.djerbi38@gmail.com>
Date: Thu, 22 Jun 2023 20:32:58 +0200
Subject: [PATCH] Fix teleportAsync rotation API


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 76bcfda336e9cfa039d80ea3ccbebbc3d2b13f7f..24617b3994c0f148f1c17928e18aa1e1a784e6f5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1329,7 +1329,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
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, // Kaiiju - fix teleportAsync() rotation
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) -> {
39 changes: 0 additions & 39 deletions patches/server/0040-Optimize-getEffectiveRange.patch

This file was deleted.

0 comments on commit 6657b9c

Please sign in to comment.