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.
This commit is contained in:
Newwind 2024-09-20 14:17:37 +02:00
parent c8efaa46cb
commit f5e9df0862

View file

@ -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;