From ac56ea8d837914db1c93bd39e2dd2e2eb0eee439 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 12 Nov 2024 20:51:01 +1100 Subject: [PATCH] SPIGOT-7955: Failure teleporting players between worlds using Player#teleport() when player has attribute modifiers By: md_5 --- .../net/minecraft/server/level/EntityPlayer.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/nms-patches/net/minecraft/server/level/EntityPlayer.patch b/paper-server/nms-patches/net/minecraft/server/level/EntityPlayer.patch index d2126ebd73..c8e70068b9 100644 --- a/paper-server/nms-patches/net/minecraft/server/level/EntityPlayer.patch +++ b/paper-server/nms-patches/net/minecraft/server/level/EntityPlayer.patch @@ -999,6 +999,15 @@ } @Override +@@ -1677,7 +2081,7 @@ + this.onUpdateAbilities(); + if (flag) { + this.getAttributes().assignBaseValues(entityplayer.getAttributes()); +- this.getAttributes().assignPermanentModifiers(entityplayer.getAttributes()); ++ // this.getAttributes().assignPermanentModifiers(entityplayer.getAttributes()); // CraftBukkit + this.setHealth(entityplayer.getHealth()); + this.foodData = entityplayer.foodData; + Iterator iterator = entityplayer.getActiveEffects().iterator(); @@ -1685,7 +2089,7 @@ while (iterator.hasNext()) { MobEffect mobeffect = (MobEffect) iterator.next();