mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-07 03:10:50 +01:00
1e7dd72f15
The game uses 0.95d now
37 lines
2.0 KiB
Diff
37 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: HexedHero <6012891+HexedHero@users.noreply.github.com>
|
|
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 59d847b87d7d35598231a1352a1a1ed32f38c176..c2951a771456fc803dee0691cbe40f56a3010c70 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -824,6 +824,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
|
|
@@ -844,6 +845,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;
|
|
|
|
@@ -872,7 +874,7 @@ public abstract class PlayerList {
|
|
}
|
|
|
|
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
|
- PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !flag2, flag2, reason);
|
|
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn && !isAnchorSpawn, isAnchorSpawn, reason); // Paper - Fix anchor respawn acting as a bed respawn from the end portal
|
|
this.cserver.getPluginManager().callEvent(respawnEvent);
|
|
// Spigot Start
|
|
if (entityplayer.connection.isDisconnected()) {
|