Skip to content

Commit

Permalink
Fix ActAdd integration and push version to 0.9.3 (requires ActAdd API…
Browse files Browse the repository at this point in the history
… version >=28)
  • Loading branch information
XDjackieXD committed Nov 12, 2016
1 parent e980cfb commit b310539
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down
13 changes: 10 additions & 3 deletions src/main/java/at/chaosfield/openradio/OpenRadio.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";
Expand Down Expand Up @@ -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.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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("<laserMaxDistance>", (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("<laserMaxDistance>", Integer.toString((int)((OpenRadio.instance.settings.LensMultiplierTier[2] + 1) * 2 * OpenRadio.instance.settings.LaserMaxDistanceTier[2])))
);
}
}

0 comments on commit b310539

Please sign in to comment.