summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/example/examplemod/ExampleMod.java11
-rw-r--r--src/main/resources/META-INF/mods.toml6
2 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/com/example/examplemod/ExampleMod.java b/src/main/java/com/example/examplemod/ExampleMod.java
index 88204a0..d0fa6c8 100644
--- a/src/main/java/com/example/examplemod/ExampleMod.java
+++ b/src/main/java/com/example/examplemod/ExampleMod.java
@@ -35,7 +35,7 @@ public class ExampleMod
// Register the doClientStuff method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
- // Register ourselves for server, registry and other game events we are interested in
+ // Register ourselves for server and other game events we are interested in
MinecraftForge.EVENT_BUS.register(this);
}
@@ -54,7 +54,7 @@ public class ExampleMod
private void enqueueIMC(final InterModEnqueueEvent event)
{
// some example code to dispatch IMC to another mod
- InterModComms.sendTo("forge", "helloworld", () -> { LOGGER.info("Hello world"); return "Hello world";});
+ InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
}
private void processIMC(final InterModProcessEvent event)
@@ -66,16 +66,17 @@ public class ExampleMod
}
// You can use SubscribeEvent and let the Event Bus discover methods to call
@SubscribeEvent
- public static void onServerStarting(FMLServerStartingEvent event) {
+ public void onServerStarting(FMLServerStartingEvent event) {
// do something when the server starts
LOGGER.info("HELLO from server starting");
}
- // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD event bus
+ // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
+ // Event bus for receiving Registry Events)
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
public static class RegistryEvents {
@SubscribeEvent
- public void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
+ public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
// register a new block here
LOGGER.info("HELLO from Register Block");
}
diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml
index 7c52e29..7ce23d4 100644
--- a/src/main/resources/META-INF/mods.toml
+++ b/src/main/resources/META-INF/mods.toml
@@ -6,7 +6,7 @@
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
-loaderVersion="[24,)" #mandatory (24 is current forge version)
+loaderVersion="[25,)" #mandatory (24 is current forge version)
# A URL to refer people to when problems occur with this mod
issueTrackerURL="http://my.issue.tracker/" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI
@@ -42,7 +42,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
# Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory
# The version range of the dependency
- versionRange="[24,)" #mandatory
+ versionRange="[25,)" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER
@@ -51,6 +51,6 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
[[dependencies.examplemod]]
modId="minecraft"
mandatory=true
- versionRange="[1.13]"
+ versionRange="[1.13.2]"
ordering="NONE"
side="BOTH" \ No newline at end of file