diff options
author | Aikar <[email protected]> | 2019-03-04 23:35:10 -0500 |
---|---|---|
committer | Aikar <[email protected]> | 2019-03-04 23:35:10 -0500 |
commit | d70aa91fd3949279474fcedaf35a3679ef2eb596 (patch) | |
tree | 2dbd02d755bcf0826a6c41dd331b56764dca605b | |
parent | 013f8d2c7761340a7535e9a135cfdd6e62eb29b8 (diff) | |
download | Paper-d70aa91fd3949279474fcedaf35a3679ef2eb596.tar.gz Paper-d70aa91fd3949279474fcedaf35a3679ef2eb596.zip |
don't check convert signs boolean every sign save
that lookup isn't "cheap", and synchronizes so cache it to a boolean instead
-rw-r--r-- | Spigot-Server-Patches/0376-Don-t-check-ConvertSigns-boolean-every-sign-save.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0376-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/Spigot-Server-Patches/0376-Don-t-check-ConvertSigns-boolean-every-sign-save.patch new file mode 100644 index 0000000000..7773986c31 --- /dev/null +++ b/Spigot-Server-Patches/0376-Don-t-check-ConvertSigns-boolean-every-sign-save.patch @@ -0,0 +1,32 @@ +From 1c6d78c9728258f137fab6a15efaf16a01429b73 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +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/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java +index 4ff2c8480..95de8b055 100644 +--- a/src/main/java/net/minecraft/server/TileEntitySign.java ++++ b/src/main/java/net/minecraft/server/TileEntitySign.java +@@ -10,6 +10,7 @@ public class TileEntitySign extends TileEntity { + private EntityHuman h; + private final CommandObjectiveExecutor i = new CommandObjectiveExecutor(); + public static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper ++ private static final boolean CONVERT_LEGACY_SIGNS = Boolean.getBoolean("convertLegacySigns"); + public java.util.UUID signEditor; // Paper + + public TileEntitySign() {} +@@ -24,7 +25,7 @@ public class TileEntitySign extends TileEntity { + } + + // CraftBukkit start +- if (Boolean.getBoolean("convertLegacySigns")) { ++ if (CONVERT_LEGACY_SIGNS) { // Paper + nbttagcompound.setBoolean("Bukkit.isConverted", true); + } + // CraftBukkit end +-- +2.21.0 + |