aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0643-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0643-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch')
-rw-r--r--patches/server/0643-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/patches/server/0643-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0643-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
new file mode 100644
index 0000000000..8f807990a5
--- /dev/null
+++ b/patches/server/0643-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: HexedHero <[email protected]>
+Date: Fri, 23 Apr 2021 22:42:42 +0100
+Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end
+ portal
+
+
+diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
+index 8e80783cd72eb7a07806f89341aff52a370ed87a..d7e6baab6fd48e4126e1c333d997a8673b4c0139 100644
+--- a/src/main/java/net/minecraft/server/players/PlayerList.java
++++ b/src/main/java/net/minecraft/server/players/PlayerList.java
+@@ -847,6 +847,7 @@ public abstract class PlayerList {
+
+ // Paper start
+ boolean isBedSpawn = false;
++ boolean isAnchorSpawn = false;
+ boolean isRespawn = false;
+ boolean isLocAltered = false; // Paper - Fix SPIGOT-5989
+ // Paper end
+@@ -867,6 +868,7 @@ public abstract class PlayerList {
+ if (optional.isPresent()) {
+ BlockState iblockdata = worldserver1.getBlockState(blockposition);
+ boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR);
++ isAnchorSpawn = flag3; // Paper - Fix anchor respawn acting as a bed respawn from the end portal
+ Vec3 vec3d = (Vec3) optional.get();
+ float f1;
+
+@@ -895,7 +897,7 @@ public abstract class PlayerList {
+ }
+
+ Player respawnPlayer = entityplayer1.getBukkitEntity();
+- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !flag2, flag2);
++ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
+ this.cserver.getPluginManager().callEvent(respawnEvent);
+ // Spigot Start
+ if (entityplayer.connection.isDisconnected()) {