73983e4c16
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 3dc4cdcd Update to Minecraft 1.14.3-pre4 88b25a8c SPIGOT-5098: Add a method to allow colored sign changes 6d913552 Update to Minecraft 1.14.3-pre4 CraftBukkit Changes: f1f33559 Update to Minecraft 1.14.3 8a3d3f49 SPIGOT-5098: Add a method to allow colored sign changes 533290e2 SPIGOT-5100: Console warning from pig zombie targeting 6dde4b9f SPIGOT-5094: Allow opening merchant for wandering traders and hide the xp bar for custom merchants 9af90077 SPIGOT-5097: Bukkit.clearRecipes() no longer working 38fa220f Fix setting game rules via the API fe3930ce Update to Minecraft 1.14.3-pre4 da071ec5 Remove outdated build delay. Spigot Changes: 4d2f30f1 Update to Minecraft 1.14.3 f16400e3 Update to Minecraft 1.14.3-pre4
25 lines
1.4 KiB
Diff
25 lines
1.4 KiB
Diff
From 3f8b74941f8e280ccb097d14b258c8aaa3dfecbc Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
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 2880de7c58..d567f35bde 100644
|
|
--- a/src/main/java/net/minecraft/server/GameRules.java
|
|
+++ b/src/main/java/net/minecraft/server/GameRules.java
|
|
@@ -21,9 +21,7 @@ import org.apache.logging.log4j.Logger;
|
|
public class GameRules {
|
|
|
|
private static final Logger LOGGER = LogManager.getLogger();
|
|
- private static final Map<GameRules.GameRuleKey<?>, GameRules.GameRuleDefinition<?>> z = Maps.newTreeMap(Comparator.comparing((gamerules_gamerulekey) -> {
|
|
- return gamerules_gamerulekey.a;
|
|
- }));
|
|
+ private static final Map<GameRules.GameRuleKey<?>, GameRules.GameRuleDefinition<?>> z = Maps.newLinkedHashMap(); // Paper
|
|
public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> DO_FIRE_TICK = a("doFireTick", GameRules.GameRuleBoolean.b(true));
|
|
public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> MOB_GRIEFING = a("mobGriefing", GameRules.GameRuleBoolean.b(true));
|
|
public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> KEEP_INVENTORY = a("keepInventory", GameRules.GameRuleBoolean.b(false));
|
|
--
|
|
2.22.0
|
|
|