From 4d484708adac195e9fdf9bfb804577fb88c0f5e0 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 29 Sep 2019 13:01:21 -0700 Subject: [PATCH] Drop Optimize-GameRules-to-use-LinkedHashMap (#2594) Mojang has since replicated the logic --- ...imize-GameRules-to-use-LinkedHashMap.patch | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 Spigot-Server-Patches/Optimize-GameRules-to-use-LinkedHashMap.patch diff --git a/Spigot-Server-Patches/Optimize-GameRules-to-use-LinkedHashMap.patch b/Spigot-Server-Patches/Optimize-GameRules-to-use-LinkedHashMap.patch deleted file mode 100644 index 90a983d75b..0000000000 --- a/Spigot-Server-Patches/Optimize-GameRules-to-use-LinkedHashMap.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Thu, 4 Apr 2019 17:55:05 -0700 -Subject: [PATCH] Optimize GameRules to use LinkedHashMap - -Previously TreeMap was used which has poor get(K) performance. - -diff --git a/src/main/java/net/minecraft/server/GameRules.java b/src/main/java/net/minecraft/server/GameRules.java -index 45d5675adf..58b3d0ec93 100644 ---- a/src/main/java/net/minecraft/server/GameRules.java -+++ b/src/main/java/net/minecraft/server/GameRules.java -@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger; - public class GameRules { - - private static final Logger LOGGER = LogManager.getLogger(); -- private static final Map, GameRules.GameRuleDefinition> z = Maps.newTreeMap(Comparator.comparing((gamerules_gamerulekey) -> { -- return gamerules_gamerulekey.a; -- })); -+ private static final Map, GameRules.GameRuleDefinition> z = Maps.newLinkedHashMap(); // Paper - public static final GameRules.GameRuleKey DO_FIRE_TICK = a("doFireTick", GameRules.GameRuleBoolean.b(true)); - public static final GameRules.GameRuleKey MOB_GRIEFING = a("mobGriefing", GameRules.GameRuleBoolean.b(true)); - public static final GameRules.GameRuleKey KEEP_INVENTORY = a("keepInventory", GameRules.GameRuleBoolean.b(false)); --- \ No newline at end of file