From b31053940156bcc9da3e7f1dd37a8f5f5d07258b Mon Sep 17 00:00:00 2001 From: Jakob Riepler Date: Sat, 12 Nov 2016 23:33:59 +0100 Subject: [PATCH] Fix ActAdd integration and push version to 0.9.3 (requires ActAdd API version >=28) --- build.gradle | 4 ++-- .../java/at/chaosfield/openradio/OpenRadio.java | 13 ++++++++++--- .../at/chaosfield/openradio/integration/Init.java | 2 +- .../integration/actuallyAdditions/BookletEntry.java | 6 +++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index b57161f..789c5f6 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ apply plugin: 'idea' apply plugin: 'net.minecraftforge.gradle.forge' -version = "0.9.2-MC1.10.2" +version = "0.9.3-MC1.10.2" group = "at.chaosfield.openradio" archivesBaseName = "OpenRadio" @@ -44,7 +44,7 @@ repositories { dependencies { compile "li.cil.oc:OpenComputers:MC1.9.4-1.6.+:api" - provided "de.ellpeck.actuallyadditions:ActuallyAdditions:1.10.2-r68:api" + provided "de.ellpeck.actuallyadditions:ActuallyAdditions-unstable:1.10.2-r71-260:api" //no 1.10.2 version of ae yet :( //compile "appeng:appliedenergistics2:rv2-stable-10:dev" diff --git a/src/main/java/at/chaosfield/openradio/OpenRadio.java b/src/main/java/at/chaosfield/openradio/OpenRadio.java index 5c27077..d9b36a2 100644 --- a/src/main/java/at/chaosfield/openradio/OpenRadio.java +++ b/src/main/java/at/chaosfield/openradio/OpenRadio.java @@ -12,6 +12,7 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -21,7 +22,7 @@ * Created by Jakob Riepler (XDjackieXD) */ -@Mod(name = "Open Radio", modid = OpenRadio.MODID, version = "0.9.0", modLanguage = "java", dependencies = "required-after:OpenComputers@[1.6.0,)") +@Mod(name = "Open Radio", modid = OpenRadio.MODID, version = "0.9.3", modLanguage = "java", dependencies = "required-after:OpenComputers@[1.6.0,)") public class OpenRadio{ public static final String MODID = "openradio"; @@ -57,9 +58,15 @@ public void init(FMLInitializationEvent event){ Crafting.init(); //Register the crafting recipes proxy.init(event); //Register TileEntities, Renders and other things + logger.info("Init complete."); + } + + //FML Init + @Mod.EventHandler + public void postInit(FMLPostInitializationEvent event){ if(Init.isActAddLoaded) - BookletEntry.init(); + BookletEntry.postInit(); - logger.info("Init complete."); + logger.info("Post init complete."); } } \ No newline at end of file diff --git a/src/main/java/at/chaosfield/openradio/integration/Init.java b/src/main/java/at/chaosfield/openradio/integration/Init.java index 02bd2bc..30dca13 100644 --- a/src/main/java/at/chaosfield/openradio/integration/Init.java +++ b/src/main/java/at/chaosfield/openradio/integration/Init.java @@ -7,7 +7,7 @@ */ public class Init{ public static boolean isActAddLoaded = Loader.isModLoaded("actuallyadditions"); - public static int minActAddVersion = 25; + public static int minActAddVersion = 28; public static String[] actAddLaserRelayEnergy = {"actuallyadditions:blockLaserRelay", "actuallyadditions:blockLaserRelayAdvanced", "actuallyadditions:blockLaserRelayExtreme"}; public static String[] actAddLaserRelayItem = {"actuallyadditions:blockLaserRelayItem", "actuallyadditions:blockLaserRelayItemWhitelist"}; public static String[] actAddLaserRelayFluid = {"actuallyadditions:blockLaserRelayFluids"}; diff --git a/src/main/java/at/chaosfield/openradio/integration/actuallyAdditions/BookletEntry.java b/src/main/java/at/chaosfield/openradio/integration/actuallyAdditions/BookletEntry.java index e51da8b..50ad534 100644 --- a/src/main/java/at/chaosfield/openradio/integration/actuallyAdditions/BookletEntry.java +++ b/src/main/java/at/chaosfield/openradio/integration/actuallyAdditions/BookletEntry.java @@ -11,13 +11,13 @@ * Created by Jakob Riepler (XDjackieXD) */ public class BookletEntry{ - public static void init(){ + public static void postInit(){ if(Integer.parseInt(ActuallyAdditionsAPI.API_VERSION) >= Init.minActAddVersion) ActuallyAdditionsAPI.methodHandler.generateBookletChapter( "openradio.laserrelay", - ActuallyAdditionsAPI.entryMisc, + ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(Items.laserItem), - ActuallyAdditionsAPI.methodHandler.generatePicturePage(1, new ResourceLocation(OpenRadio.MODID, "textures/gui/actAddPageLaserRelay.png"), 118).addTextReplacement("", (int)((OpenRadio.instance.settings.LensMultiplierTier[2] + 1) * 2 * OpenRadio.instance.settings.LaserMaxDistanceTier[2])) + ActuallyAdditionsAPI.methodHandler.generatePicturePage(1, new ResourceLocation(OpenRadio.MODID, "textures/gui/actAddPageLaserRelay.png"), 118).addTextReplacement("", Integer.toString((int)((OpenRadio.instance.settings.LensMultiplierTier[2] + 1) * 2 * OpenRadio.instance.settings.LaserMaxDistanceTier[2]))) ); } }