From d838887c4be67591ce14540295e35eca3615e536 Mon Sep 17 00:00:00 2001 From: Gate Guardian <147252672+qwer523@users.noreply.github.com> Date: Sat, 7 Sep 2024 21:15:37 +0800 Subject: [PATCH] Fix (#6) * fix * fix --- src/main/java/com/example/examplemod/ExampleModCommon.java | 2 +- .../com/example/examplemod/config/ExampleConfigHolder.java | 4 ++-- .../java/com/example/examplemod/data/ExampleLangHandler.java | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/examplemod/ExampleModCommon.java b/src/main/java/com/example/examplemod/ExampleModCommon.java index 2c708a7..780ecc4 100644 --- a/src/main/java/com/example/examplemod/ExampleModCommon.java +++ b/src/main/java/com/example/examplemod/ExampleModCommon.java @@ -10,10 +10,10 @@ public class ExampleModCommon implements ExampleMod { public static ExampleModCommon instance; public ExampleModCommon() { - super(); instance = this; ExampleConfigHolder.init(); REGISTRATE.addDataGenerator(MOProviderTypes.MO_LANG, ExampleLangHandler::init); + REGISTRATE.registerRegistrate(); LOGGER.info("ExampleMod's Initialization Completed!"); } diff --git a/src/main/java/com/example/examplemod/config/ExampleConfigHolder.java b/src/main/java/com/example/examplemod/config/ExampleConfigHolder.java index da1ea19..cd2183e 100644 --- a/src/main/java/com/example/examplemod/config/ExampleConfigHolder.java +++ b/src/main/java/com/example/examplemod/config/ExampleConfigHolder.java @@ -1,12 +1,12 @@ package com.example.examplemod.config; -import com.example.examplemod.ExampleModCommon; +import com.example.examplemod.ExampleMod; import dev.toma.configuration.Configuration; import dev.toma.configuration.config.Config; import dev.toma.configuration.config.format.ConfigFormats; -@Config(id = ExampleModCommon.MODID) +@Config(id = ExampleMod.MODID) public class ExampleConfigHolder { public static ExampleConfigHolder INSTANCE; diff --git a/src/main/java/com/example/examplemod/data/ExampleLangHandler.java b/src/main/java/com/example/examplemod/data/ExampleLangHandler.java index 66b56fb..8f3ae5c 100644 --- a/src/main/java/com/example/examplemod/data/ExampleLangHandler.java +++ b/src/main/java/com/example/examplemod/data/ExampleLangHandler.java @@ -4,9 +4,7 @@ public class ExampleLangHandler { - private ExampleLangHandler() { - /**/ - } + private ExampleLangHandler() {} public static void init(MOLangProvider provider) {} }