Fixed reversal of pitch and yaw when teleporting a player back from Herobrine's Graveyard.

This commit is contained in:
David Berdik 2021-07-08 16:32:23 -04:00
parent 42469f1710
commit 3295c2f177

View File

@ -126,7 +126,10 @@ public class Graveyard extends Core {
Herobrine.getPluginCore().getAICore().CancelTarget(CoreType.GRAVEYARD);
}
savedPlayer.teleport(new Location(savedWorld, savedX, savedY, savedZ, savedPitch, savedYaw));
// It looks like when the call to the teleport function is made here, pitch and yaw get reversed, so they are deliberately reversed here.
// (Or maybe when the pitch and yaw values are extracted earlier, they are reversed? Not really sure.) This change was added v2.2.0 for
// Spigot 1.17.
savedPlayer.teleport(new Location(savedWorld, savedX, savedY, savedZ, savedYaw, savedPitch));
deletePreGraveyardCache(savedPlayer);
} else {