Fix the MDK..

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-02-15 21:53:52 -05:00
parent f71f347082
commit f4f3c9bd2d
2 changed files with 9 additions and 8 deletions

View file

@ -35,7 +35,7 @@ public class ExampleMod
// Register the doClientStuff method for modloading // Register the doClientStuff method for modloading
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); 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); MinecraftForge.EVENT_BUS.register(this);
} }
@ -54,7 +54,7 @@ public class ExampleMod
private void enqueueIMC(final InterModEnqueueEvent event) private void enqueueIMC(final InterModEnqueueEvent event)
{ {
// some example code to dispatch IMC to another mod // 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) 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 // You can use SubscribeEvent and let the Event Bus discover methods to call
@SubscribeEvent @SubscribeEvent
public static void onServerStarting(FMLServerStartingEvent event) { public void onServerStarting(FMLServerStartingEvent event) {
// do something when the server starts // do something when the server starts
LOGGER.info("HELLO from server starting"); 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) @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
public static class RegistryEvents { public static class RegistryEvents {
@SubscribeEvent @SubscribeEvent
public void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) { public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
// register a new block here // register a new block here
LOGGER.info("HELLO from Register Block"); LOGGER.info("HELLO from Register Block");
} }

View file

@ -6,7 +6,7 @@
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version # 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 # A URL to refer people to when problems occur with this mod
issueTrackerURL="http://my.issue.tracker/" #optional issueTrackerURL="http://my.issue.tracker/" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI # 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 # Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory mandatory=true #mandatory
# The version range of the dependency # 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 # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering="NONE" ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER # 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]] [[dependencies.examplemod]]
modId="minecraft" modId="minecraft"
mandatory=true mandatory=true
versionRange="[1.13]" versionRange="[1.13.2]"
ordering="NONE" ordering="NONE"
side="BOTH" side="BOTH"