mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 16:54:04 +00:00
List a pack's unread fields once and draw plugin blocks in the palette view
Unknown fields used to log one warning per field per file, with a snippet, every time a pack loaded. A pack without modules logged about 2200 of them at startup. Now they are gathered per pack and stated as one list a few seconds after the first, one line per field with its first file and how many others hold it. Each file's field is stated once per server start. The header says when the pack loads no modules, which is why layers, wall and decorators were unread here. The Bukkit warning path stripped colours. It now keeps section-sign codes and still reads nothing else as markup. The palette view drew CraftEngine blocks by their server-only state, such as craftengine:custom_7, which has no assets. The pattern header now names a plugin block as the pack does and adds the vanilla state players see, which the studio draws. Asset reads check plugin resource packs before the client jar for minecraft paths too, since those packs replace vanilla blockstates.
This commit is contained in:
1 parent
f98b6dc548
commit
a71b27ce31
21 files changed
+326
-55
No files matched your search
@@ -591,15 +591,18 @@ public class Iris extends VolmitPlugin implements Listener, ReloadAware {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Keeps the section-sign colours core writes but reads nothing else as markup: a diagnostic quotes pack files,
|
||||
* whose text may hold tag-like or ampersand sequences that have to show as written.
|
||||
*/
|
||||
private static void diagnostic(Level level, String message) {
|
||||
String line = IrisLogging.clean(message);
|
||||
Iris plugin = instance;
|
||||
ComponentLog.log(
|
||||
plugin,
|
||||
Logger.getLogger("Iris"),
|
||||
logPrefix(plugin),
|
||||
level,
|
||||
ComponentText.literal(line),
|
||||
ComponentText.section(message),
|
||||
null);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class IrisDiagnosticLogLevelTest {
|
||||
assertTrue(bridge, bridge.contains("diagnostic(diagnostic, message)"));
|
||||
String diagnostic = method(source, "private static void diagnostic(Level level, String message)");
|
||||
assertTrue(diagnostic, diagnostic.contains("ComponentLog.log("));
|
||||
assertTrue(diagnostic, diagnostic.contains("ComponentText.literal(line)"));
|
||||
assertTrue(diagnostic, diagnostic.contains("ComponentText.section(message)"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user