Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
19 Zeilen
1.2 KiB
Diff
19 Zeilen
1.2 KiB
Diff
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
|
|
index 469d0046ba98289e98aa0f3f66e3ed27026a98a2..3339130f3a02e6e395bcd8e3047b35f6f4eca9a9 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 {
|
|
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
|
|
}
|
|
}
|