9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00
Files
Leaf/Leaf-Server/minecraft-patches/features/0048-Prevent-change-non-editable-sign-warning-spam-in-con.patch
Dreeam ed1cdcd19d Leaf 1.21.4
WIP
2025-01-17 19:54:25 -05:00

20 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Thu, 28 Mar 2024 14:04:35 -0400
Subject: [PATCH] Prevent change non-editable sign warning spam in console
diff --git a/net/minecraft/world/level/block/entity/SignBlockEntity.java b/net/minecraft/world/level/block/entity/SignBlockEntity.java
index 662f53ca5826fb5b68eb4d426f1d9c5d83906eaf..e0a519af9a567eb660fad5ae55c95900fc2472f5 100644
--- a/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -152,7 +152,7 @@ public class SignBlockEntity extends BlockEntity {
this.setAllowedPlayerEditor(null);
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
} else {
- LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString());
+ if (!org.dreeam.leaf.config.modules.misc.RemoveChangeNonEditableSignWarning.enabled) LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString()); // Leaf - Remove change non-editable sign warning
if (player.distanceToSqr(this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ()) < Mth.square(32)) // Paper - Don't send far away sign update
((net.minecraft.server.level.ServerPlayer) player).connection.send(this.getUpdatePacket()); // CraftBukkit
}