From 0df99cedeb9e0a1561085880b8ec152cf6c42159 Mon Sep 17 00:00:00 2001 From: Mariell Date: Sun, 19 Jul 2020 14:58:29 +0200 Subject: [PATCH] Only get spawn block if it's relevant, fixes #3934 (#3942) --- Spigot-Server-Patches/Fix-SPIGOT-5989.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Fix-SPIGOT-5989.patch b/Spigot-Server-Patches/Fix-SPIGOT-5989.patch index d619cc4f96..96dbb61a07 100644 --- a/Spigot-Server-Patches/Fix-SPIGOT-5989.patch +++ b/Spigot-Server-Patches/Fix-SPIGOT-5989.patch @@ -51,8 +51,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - 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