diff options
Diffstat (limited to 'patches/server/0297-Dont-send-unnecessary-sign-update.patch')
-rw-r--r-- | patches/server/0297-Dont-send-unnecessary-sign-update.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0297-Dont-send-unnecessary-sign-update.patch b/patches/server/0297-Dont-send-unnecessary-sign-update.patch new file mode 100644 index 0000000000..afca8562db --- /dev/null +++ b/patches/server/0297-Dont-send-unnecessary-sign-update.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke <[email protected]> +Date: Sat, 11 Sep 2021 11:56:51 +0200 +Subject: [PATCH] Dont send unnecessary sign update + + +diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +index 394d0b03f18d55b43f091a9ae1a47e06a6fa4c0d..87e272cfb145c37d26b0bf56f97ec784a9bfd98e 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +@@ -185,6 +185,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C + this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3); + } else { + SignBlockEntity.LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString()); ++ if (player.distanceToSqr(this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ()) < 32 * 32) // Paper - Dont send far away sign update + ((ServerPlayer) player).connection.send(this.getUpdatePacket()); // CraftBukkit + } + } |