3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00
Paper/Remapped-Spigot-Server-Patches/0327-Don-t-check-ConvertSigns-boolean-every-sign-save.patch
2021-06-11 13:56:17 +02:00

30 Zeilen
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 2 Mar 2019 11:11:29 -0500
Subject: [PATCH] Don't check ConvertSigns boolean every sign save
property lookups arent super cheap. they synchronize, validate
and check security managers.
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 0b26d3ab2db66d6baaa95d1d5f6c756595d31495..8d619e0bf8bcf7d6d4e7f23f11d648ccfb65cac4 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
@@ -31,6 +31,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
private final FormattedCharSequence[] renderMessages;
private DyeColor color;
public java.util.UUID signEditor; // Paper
+ private static final boolean CONVERT_LEGACY_SIGNS = Boolean.getBoolean("convertLegacySigns"); // Paper
public SignBlockEntity() {
super(BlockEntityType.SIGN);
@@ -51,7 +52,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
}
// CraftBukkit start
- if (Boolean.getBoolean("convertLegacySigns")) {
+ if (CONVERT_LEGACY_SIGNS) { // Paper
tag.putBoolean("Bukkit.isConverted", true);
}
// CraftBukkit end