mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-30 12:29:13 +00:00
do not log invalid flatten text component parse
The error will throw and spam when tried to load / upgrade text component on legacy item from very old version, e.g. 1.16.5. The item's text component can load and be saved normally, but spam error in console just very annoying when everytime loaded them before saved.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
||||
Date: Fri, 6 Jun 2025 05:44:21 +0800
|
||||
Subject: [PATCH] do not log invalid flatten text component parse
|
||||
|
||||
|
||||
diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4290.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4290.java
|
||||
index 4197a5e89aec77f2893f0f118a927b96d5377ec1..7a9bf426550a0c424f3ca09fb962aac670bc0921 100644
|
||||
--- a/ca/spottedleaf/dataconverter/minecraft/versions/V4290.java
|
||||
+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4290.java
|
||||
@@ -191,7 +191,7 @@ public final class V4290 {
|
||||
return ret;
|
||||
}
|
||||
} catch (final JsonParseException ex) {
|
||||
- LOGGER.error("Failed to convert json to nbt: " + unparsedJson, ex);
|
||||
+ if (!org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidLegacyTextComponent) LOGGER.error("Failed to convert json to nbt: " + unparsedJson, ex); // Leaf - do not log invalid flatten text component parse
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -92,6 +92,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart {
|
||||
public boolean legacyMaterialInitialization = false; // Gale - Purpur - do not log legacy Material initialization
|
||||
public boolean nullIdDisconnections = true; // Gale - Pufferfish - do not log disconnections with null id
|
||||
public boolean playerLoginLocations = true; // Gale - JettPack - make logging login location configurable
|
||||
public boolean invalidLegacyTextComponent = false; // Leaf - do not log invalid flatten text component parse
|
||||
|
||||
public Chat chat;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user