summaryrefslogtreecommitdiff
path: root/src/main/java/com/example/examplemod/ExampleMod.java
diff options
context:
space:
mode:
authorneoforge-mdk-automation[bot] <173375039+neoforge-mdk-automation[bot]@users.noreply.github.com>2025-07-06 04:31:10 +0000
committerGitHub <noreply@github.com>2025-07-06 04:31:10 +0000
commit8f623ed7568eb5b8dd6ed848128c9bb7e43cd6f0 (patch)
tree0077f8ca67bd17afa19209a716bf365fb79a1563 /src/main/java/com/example/examplemod/ExampleMod.java
parent0922bdcd50338717cee510bdff7628a2959ed2c0 (diff)
Update MDK with new output from mod generator (#9)
* Update MDK with new output from mod generator * Update MDK with new output from mod generator * Update MDK with new output from mod generator --------- Co-authored-by: NeoForge MDK Automation <173375039+neoforge-mdk-automation[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/com/example/examplemod/ExampleMod.java')
-rw-r--r--src/main/java/com/example/examplemod/ExampleMod.java18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/main/java/com/example/examplemod/ExampleMod.java b/src/main/java/com/example/examplemod/ExampleMod.java
index adc09f4..db1e6de 100644
--- a/src/main/java/com/example/examplemod/ExampleMod.java
+++ b/src/main/java/com/example/examplemod/ExampleMod.java
@@ -4,7 +4,6 @@ import org.slf4j.Logger;
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,11 +19,9 @@ import net.minecraft.world.level.material.MapColor;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.bus.api.SubscribeEvent;
-import net.neoforged.fml.ModContainer;
-import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
-import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
+import net.neoforged.fml.ModContainer;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent;
@@ -40,7 +37,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
@@ -117,15 +114,4 @@ public class ExampleMod {
// Do something when the server starts
LOGGER.info("HELLO from server starting");
}
-
- // You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
- @EventBusSubscriber(modid = MODID, bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
- public static class ClientModEvents {
- @SubscribeEvent
- public static void onClientSetup(FMLClientSetupEvent event) {
- // Some client setup code
- LOGGER.info("HELLO FROM CLIENT SETUP");
- LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
- }
- }
}