From f5e9df08621f47e71d63e1b8235840c3fe1450f8 Mon Sep 17 00:00:00 2001 From: Newwind Date: Fri, 20 Sep 2024 14:17:37 +0200 Subject: [PATCH] Disable pretty printing for advancement saving Reduces json size by about 25% Not sure why advancements even had pretty printing enabled. My best guess was by accident on mojang's part, especially since stats json files don't have pretty printing. --- .../net/minecraft/server/PlayerAdvancements.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/patches/sources/net/minecraft/server/PlayerAdvancements.java.patch b/paper-server/patches/sources/net/minecraft/server/PlayerAdvancements.java.patch index 2a07b6690e..93d25149bd 100644 --- a/paper-server/patches/sources/net/minecraft/server/PlayerAdvancements.java.patch +++ b/paper-server/patches/sources/net/minecraft/server/PlayerAdvancements.java.patch @@ -1,5 +1,14 @@ --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java +@@ -50,7 +50,7 @@ + public class PlayerAdvancements { + + private static final Logger LOGGER = LogUtils.getLogger(); +- private static final Gson GSON = (new GsonBuilder()).setPrettyPrinting().create(); ++ private static final Gson GSON = (new GsonBuilder()).create(); // Paper - Remove pretty printing from advancements + private final PlayerList playerList; + private final Path playerSavePath; + private AdvancementTree tree; @@ -63,6 +63,7 @@ private AdvancementHolder lastSelectedTab; private boolean isFirstPacket = true;