From 3b55558ca4d55574194b4496dc1760cc5f4cf6dd Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Fri, 9 Apr 2021 14:27:15 +0200 Subject: [PATCH] Add a logger to CommonSnow.kt, and rename it to Snowy.kt. --- .../kotlin/fr/username404/snowygui/CommonSnow.kt | 7 ------- .../main/kotlin/fr/username404/snowygui/Snowy.kt | 13 +++++++++++++ .../fr/username404/snowygui/fabric/FabricInit.kt | 4 ++-- .../fr/username404/snowygui/forge/forgeInit.kt | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) delete mode 100644 common/src/main/kotlin/fr/username404/snowygui/CommonSnow.kt create mode 100644 common/src/main/kotlin/fr/username404/snowygui/Snowy.kt diff --git a/common/src/main/kotlin/fr/username404/snowygui/CommonSnow.kt b/common/src/main/kotlin/fr/username404/snowygui/CommonSnow.kt deleted file mode 100644 index a358e46..0000000 --- a/common/src/main/kotlin/fr/username404/snowygui/CommonSnow.kt +++ /dev/null @@ -1,7 +0,0 @@ -package fr.username404.snowygui - -abstract class CommonSnow { - fun atInit() { - - } -} \ No newline at end of file diff --git a/common/src/main/kotlin/fr/username404/snowygui/Snowy.kt b/common/src/main/kotlin/fr/username404/snowygui/Snowy.kt new file mode 100644 index 0000000..6d87943 --- /dev/null +++ b/common/src/main/kotlin/fr/username404/snowygui/Snowy.kt @@ -0,0 +1,13 @@ +package fr.username404.snowygui + +import org.apache.logging.log4j.LogManager +import org.apache.logging.log4j.Logger + +abstract class Snowy { + companion object { + val logs: Logger = LogManager.getLogger("Snowy") + } + fun atInit() { + logs.info("Init point of SnowyGUI hit.") + } +} \ No newline at end of file diff --git a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt index 642278d..82f2dc9 100644 --- a/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt +++ b/fabric/src/main/kotlin/fr/username404/snowygui/fabric/FabricInit.kt @@ -1,8 +1,8 @@ package fr.username404.snowygui.fabric -import fr.username404.snowygui.CommonSnow +import fr.username404.snowygui.Snowy import net.fabricmc.api.ClientModInitializer -class FabricInit: CommonSnow(), ClientModInitializer { +class FabricInit: Snowy(), ClientModInitializer { override fun onInitializeClient() = atInit() } \ No newline at end of file diff --git a/forge/src/main/kotlin/fr/username404/snowygui/forge/forgeInit.kt b/forge/src/main/kotlin/fr/username404/snowygui/forge/forgeInit.kt index 51948b4..c106fd3 100644 --- a/forge/src/main/kotlin/fr/username404/snowygui/forge/forgeInit.kt +++ b/forge/src/main/kotlin/fr/username404/snowygui/forge/forgeInit.kt @@ -1,6 +1,6 @@ package fr.username404.snowygui.forge -import fr.username404.snowygui.CommonSnow +import fr.username404.snowygui.Snowy import fr.username404.snowygui.config.SnowyConfigScreen import net.minecraftforge.fml.ExtensionPoint import net.minecraftforge.fml.ModLoadingContext @@ -9,7 +9,7 @@ import java.util.function.BiFunction import java.util.function.Supplier @Mod("snowygui") -class ForgeInit: CommonSnow() { +class ForgeInit: Snowy() { init { atInit() ModLoadingContext.get().registerExtensionPoint(