summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorTechnici4n <13494793+Technici4n@users.noreply.github.com>2023-11-05 13:23:24 +0100
committerGitHub <noreply@github.com>2023-11-05 13:23:24 +0100
commit8dd9258e72e9d91937160e3f2f4ebc789331953d (patch)
treedca8895ce51b46b3db8a0d83949f071d6e16cc7f /src/main/java
parent1507c3f5c26f04007fa288dcdd4b423765792b0d (diff)
MDK Updates (#15)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/example/examplemod/ExampleMod.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/example/examplemod/ExampleMod.java b/src/main/java/com/example/examplemod/ExampleMod.java
index ecb80cf..f6a02a8 100644
--- a/src/main/java/com/example/examplemod/ExampleMod.java
+++ b/src/main/java/com/example/examplemod/ExampleMod.java
@@ -61,10 +61,10 @@ public class ExampleMod
output.accept(EXAMPLE_ITEM.get()); // Add the example item to the tab. For your own tabs, this method is preferred over the event
}).build());
- public ExampleMod()
+ // The constructor for the mod class is the first code that is run when your mod is loaded.
+ // FML will recognize some parameter types like IEventBus or ModContainer and pass them in automatically.
+ public ExampleMod(IEventBus modEventBus)
{
- IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
-
// Register the commonSetup method for modloading
modEventBus.addListener(this::commonSetup);
@@ -81,7 +81,7 @@ public class ExampleMod
// Register the item to a creative tab
modEventBus.addListener(this::addCreative);
- // Register our mod's ForgeConfigSpec so that Forge can create and load the config file for us
+ // Register our mod's ModConfigSpec so that FML can create and load the config file for us
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, Config.SPEC);
}