Commits

md_5 authored 5bc0a094b31
SPIGOT-7955: Failure teleporting players between worlds using Player#teleport() when player has attribute modifiers
No tags

nms-patches/net/minecraft/server/level/EntityPlayer.patch

Modified
992 992
993 993 }
994 994 @@ -1641,6 +2044,7 @@
995 995
996 996 public void resetSentInfo() {
997 997 this.lastSentHealth = -1.0E8F;
998 998 + this.lastSentExp = -1; // CraftBukkit - Added to reset
999 999 }
1000 1000
1001 1001 @Override
1002 +@@ -1677,7 +2081,7 @@
1003 + this.onUpdateAbilities();
1004 + if (flag) {
1005 + this.getAttributes().assignBaseValues(entityplayer.getAttributes());
1006 +- this.getAttributes().assignPermanentModifiers(entityplayer.getAttributes());
1007 ++ // this.getAttributes().assignPermanentModifiers(entityplayer.getAttributes()); // CraftBukkit
1008 + this.setHealth(entityplayer.getHealth());
1009 + this.foodData = entityplayer.foodData;
1010 + Iterator iterator = entityplayer.getActiveEffects().iterator();
1002 1011 @@ -1685,7 +2089,7 @@
1003 1012 while (iterator.hasNext()) {
1004 1013 MobEffect mobeffect = (MobEffect) iterator.next();
1005 1014
1006 1015 - this.addEffect(new MobEffect(mobeffect));
1007 1016 + // this.addEffect(new MobEffect(mobeffect)); // CraftBukkit
1008 1017 }
1009 1018
1010 1019 this.getInventory().replaceWith(entityplayer.getInventory());
1011 1020 @@ -1696,7 +2100,7 @@

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut