From 56552093dab0eec98498c45b2f9961b5e711c35c Mon Sep 17 00:00:00 2001 From: MCXIV Date: Sun, 2 May 2021 20:10:38 +0530 Subject: [PATCH] Fixed an issue where you cant change the decoration type --- .../logger/formatted/Logger_MethodImplierBody.java | 12 ++++++------ .../logger/formatted/AnnotationCompilerTest.java | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/mcxiv/logger/formatted/Logger_MethodImplierBody.java b/src/main/java/com/mcxiv/logger/formatted/Logger_MethodImplierBody.java index 31c4b94..77baa2d 100644 --- a/src/main/java/com/mcxiv/logger/formatted/Logger_MethodImplierBody.java +++ b/src/main/java/com/mcxiv/logger/formatted/Logger_MethodImplierBody.java @@ -28,13 +28,13 @@ public Logger_MethodImplierBody(StringsConsumer consumer) { @Override public void prt(String... msg) { - Decoration decoration = Decorations.get(Decorations.CONSOLE); + Decoration decoration = Decorations.get(decorator_name); writer.consume(decoration.decorate(msg)); } @Override public void prt(Object... obj) { - Decoration decoration = Decorations.get(Decorations.CONSOLE); + Decoration decoration = Decorations.get(decorator_name); String[] stf = new String[obj.length]; for (int i = 0; i < stf.length; i++) stf[i] = obj[i].toString(); writer.consume(decoration.decorate(stf)); @@ -47,7 +47,7 @@ public void raw(String raw) { @Override public StringsConsumer prtf(String... format) { - Decoration decoration = Decorations.getSpecific(null,Decorations.CONSOLE, format); + Decoration decoration = Decorations.getSpecific(null,decorator_name, format); return msg -> writer.consume(decoration.decorate(msg)); } @@ -60,13 +60,13 @@ private class OurPacket extends Packet{ @Override public void prt(String... msg) { - Decoration decoration = Decorations.get(Decorations.CONSOLE); + Decoration decoration = Decorations.get(decorator_name); builder.append(decoration.decorate(msg)); } @Override public void prt(Object... obj) { - Decoration decoration = Decorations.get(Decorations.CONSOLE); + Decoration decoration = Decorations.get(decorator_name); String[] stf = new String[obj.length]; for (int i = 0; i < stf.length; i++) stf[i] = obj[i].toString(); builder.append(decoration.decorate(stf)); @@ -79,7 +79,7 @@ public void raw(String raw) { @Override public StringsConsumer prtf(String... format) { - Decoration decoration = Decorations.getSpecific(null,Decorations.CONSOLE, format); + Decoration decoration = Decorations.getSpecific(null,decorator_name, format); return msg -> builder.append(decoration.decorate(msg)); } diff --git a/src/test/java/com/mcxiv/logger/formatted/AnnotationCompilerTest.java b/src/test/java/com/mcxiv/logger/formatted/AnnotationCompilerTest.java index 1409194..e472fbb 100644 --- a/src/test/java/com/mcxiv/logger/formatted/AnnotationCompilerTest.java +++ b/src/test/java/com/mcxiv/logger/formatted/AnnotationCompilerTest.java @@ -94,7 +94,7 @@ public void test_NICEFormatting() { FLog log = FLog.getNew(); // RawFileDecoration.setPartnerDecorationDecoration(TagDecoration::new); -// log.setDecorationType(Decorations.RAW); + log.setDecorationType(Decorations.TAG); log.prt("1", "Useless Sentences", "Some boring text ahead...", "So here we have some totally boring text just " +