From 180f16161cdb0bd68dc1cab8651f828871987b00 Mon Sep 17 00:00:00 2001 From: cpw Date: Fri, 15 Feb 2019 21:53:52 -0500 Subject: [PATCH] Fix the MDK.. Signed-off-by: cpw --- .../main/java/com/example/examplemod/ExampleMod.java | 11 ++++++----- mdk/src/main/resources/META-INF/mods.toml | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/mdk/src/main/java/com/example/examplemod/ExampleMod.java b/mdk/src/main/java/com/example/examplemod/ExampleMod.java index 88204a0cc..d0fa6c839 100644 --- a/mdk/src/main/java/com/example/examplemod/ExampleMod.java +++ b/mdk/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 blockRegistryEvent) { + public static void onBlocksRegistry(final RegistryEvent.Register blockRegistryEvent) { // register a new block here LOGGER.info("HELLO from Register Block"); } diff --git a/mdk/src/main/resources/META-INF/mods.toml b/mdk/src/main/resources/META-INF/mods.toml index 7c52e292c..7ce23d414 100644 --- a/mdk/src/main/resources/META-INF/mods.toml +++ b/mdk/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