aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMariell <[email protected]>2020-07-19 14:58:29 +0200
committerGitHub <[email protected]>2020-07-19 13:58:29 +0100
commitdc80610ff356250ee0ff6ee5bd29c2584aa58603 (patch)
tree1436df968deeaf00fbc6a606f04328c4550c84b0
parent19b58a9f77ca19be1b8e1ebb9d121f39b0df64d4 (diff)
downloadPaper-dc80610ff356250ee0ff6ee5bd29c2584aa58603.tar.gz
Paper-dc80610ff356250ee0ff6ee5bd29c2584aa58603.zip
Only get spawn block if it's relevant, fixes #3934 (#3942)
-rw-r--r--Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch b/Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch
index 1120410219..dc6cca3282 100644
--- a/Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch
+++ b/Spigot-Server-Patches/0545-Fix-SPIGOT-5989.patch
@@ -10,7 +10,7 @@ This fixes that by checking if the modified spawn location is
still at a respawn anchor.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
-index 3c2f1f140c3991195bb8147bd65d9cd16a8fd3da..b8ec7941784885ace0c33fdf768ddcba284a12f9 100644
+index 9e438590113b2c7a318c812637c8aa14341df3e6..9382e8f79e8edec8885c629a36e230fbec50e1fb 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -766,6 +766,7 @@ public abstract class PlayerList {
@@ -51,8 +51,8 @@ index 3c2f1f140c3991195bb8147bd65d9cd16a8fd3da..b8ec7941784885ace0c33fdf768ddcba
- if (flag2) {
- entityplayer1.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.BLOCK_RESPAWN_ANCHOR_DEPLETE, SoundCategory.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F));
+ // Paper start - Fix SPIGOT-5989
-+ IBlockData data = worldserver1.getType(blockposition);
+ if (flag2 && !isLocAltered) {
++ IBlockData data = worldserver1.getType(blockposition);
+ worldserver1.setTypeAndData(blockposition, data.set(BlockRespawnAnchor.a, data.get(BlockRespawnAnchor.a) - 1), 3);
+ entityplayer1.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.BLOCK_RESPAWN_ANCHOR_DEPLETE, SoundCategory.BLOCKS, (double) location.getX(), (double) location.getY(), (double) location.getZ(), 1.0F, 1.0F));
+ // Paper end