From 38155d73efb4befa54657ac1512f1cb97db5907f Mon Sep 17 00:00:00 2001 From: NeoForge MDK Automation <173375039+neoforge-mdk-automation[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 00:02:42 +0000 Subject: [PATCH 1/3] Update MDK with new output from mod generator --- .../java/com/example/examplemod/ExampleMod.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/example/examplemod/ExampleMod.java b/src/main/java/com/example/examplemod/ExampleMod.java index 1a32ce3..0997177 100644 --- a/src/main/java/com/example/examplemod/ExampleMod.java +++ b/src/main/java/com/example/examplemod/ExampleMod.java @@ -4,7 +4,6 @@ import com.mojang.logging.LogUtils; -import net.minecraft.client.Minecraft; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.Component; @@ -20,10 +19,12 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.SubscribeEvent; -import net.neoforged.fml.ModLoadingContext; import net.neoforged.fml.common.Mod; import net.neoforged.fml.config.ModConfig; +import net.neoforged.fml.ModLoadingContext; +import net.neoforged.fml.common.Mod.EventBusSubscriber; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraft.client.Minecraft; import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; import net.neoforged.neoforge.common.NeoForge; import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent; @@ -39,7 +40,7 @@ public class ExampleMod { // Define mod id in a common place for everything to reference public static final String MODID = "examplemod"; // Directly reference a slf4j logger - private static final Logger LOGGER = LogUtils.getLogger(); + public static final Logger LOGGER = LogUtils.getLogger(); // Create a Deferred Register to hold Blocks which will all be registered under the "examplemod" namespace public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(MODID); // Create a Deferred Register to hold Items which will all be registered under the "examplemod" namespace @@ -118,10 +119,10 @@ public void onServerStarting(ServerStartingEvent event) { } // You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent - @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) - public static class ClientModEvents { + @EventBusSubscriber(modid = ExampleMod.MODID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) + static class ClientModEvents { @SubscribeEvent - public static void onClientSetup(FMLClientSetupEvent event) { + static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); From 8c5252b3061338255567084e9f0d4a60250dd985 Mon Sep 17 00:00:00 2001 From: NeoForge MDK Automation <173375039+neoforge-mdk-automation[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 22:02:42 +0000 Subject: [PATCH 2/3] Update MDK with new output from mod generator --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 829db6c..6db58b7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java-library' id 'maven-publish' - id 'net.neoforged.moddev' version '2.0.96' + id 'net.neoforged.moddev' version '2.0.97' id 'idea' } From 3e86f3c3105fe9ad0df452f6916e328797482439 Mon Sep 17 00:00:00 2001 From: NeoForge MDK Automation <173375039+neoforge-mdk-automation[bot]@users.noreply.github.com> Date: Sat, 5 Jul 2025 12:02:46 +0000 Subject: [PATCH 3/3] Update MDK with new output from mod generator --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6db58b7..525958c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java-library' id 'maven-publish' - id 'net.neoforged.moddev' version '2.0.97' + id 'net.neoforged.moddev' version '2.0.99' id 'idea' }