diff options
author | Newwind <[email protected]> | 2024-09-21 19:01:22 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-21 20:01:22 +0200 |
commit | d61175421d683f400b86a583d195c8da1399d239 (patch) | |
tree | ba008219b29a1b27df9cf37889a96946e5180839 | |
parent | 9c450388e10f4b6669dd6f039de953927899b3bc (diff) | |
download | Paper-d61175421d683f400b86a583d195c8da1399d239.tar.gz Paper-d61175421d683f400b86a583d195c8da1399d239.zip |
Disable pretty printing for advancement saving (#11419)
-rw-r--r-- | patches/server/1058-Disable-pretty-printing-for-advancement-saving.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/patches/server/1058-Disable-pretty-printing-for-advancement-saving.patch b/patches/server/1058-Disable-pretty-printing-for-advancement-saving.patch new file mode 100644 index 0000000000..e954fc53fa --- /dev/null +++ b/patches/server/1058-Disable-pretty-printing-for-advancement-saving.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Newwind <[email protected]> +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. + +diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java +index 9fabf9322..862a4bf00 100644 +--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java ++++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java +@@ -50,7 +50,7 @@ import org.slf4j.Logger; + 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; |