2023-06-07 23:14:56 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
|
|
|
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
|
2023-12-23 02:44:36 +01:00
|
|
|
index a822b190aeee1d644c3509bb75106fa4dfdd963f..1a54db9f8b2fb3071e79ec26c49242b528b8cd9e 100644
|
2023-06-07 23:14:56 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
2023-12-05 23:32:41 +01:00
|
|
|
@@ -184,6 +184,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
2023-06-07 23:14:56 +02:00
|
|
|
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
|
|
|
|
((ServerPlayer) player).connection.send(this.getUpdatePacket()); // CraftBukkit
|
|
|
|
}
|
|
|
|
}
|