Skip to content

Commit

Permalink
Removed hard dependency for AE2
Browse files Browse the repository at this point in the history
  • Loading branch information
XDjackieXD committed Jul 30, 2015
1 parent 79f95b7 commit 6a9d76a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buildscript {
apply plugin: 'idea'
apply plugin: 'forge'

version = "0.3.0"
version = "0.3.1"
group = "at.chaosfield.openradio" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "OpenRadio"

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/at/chaosfield/openradio/CreativeTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import at.chaosfield.openradio.common.init.Blocks;
import at.chaosfield.openradio.common.init.Items;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
Expand All @@ -28,7 +29,9 @@ public void displayAllReleventItems(List list){
this.list = list;

this.addBlock(Blocks.laserBlock);
this.addBlock(Blocks.aeencoderBlock);

if(Loader.isModLoaded("appliedenergistics2"))
this.addBlock(Blocks.aeencoderBlock);

this.addItem(Items.laserSocketItem);
this.addItem(Items.lensItem);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/chaosfield/openradio/OpenRadio.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Created by Jakob Riepler (XDjackieXD)
*/

@Mod(name = "Open Radio", modid = OpenRadio.MODID, version = "0.3.0", modLanguage = "java", dependencies = "required-after:OpenComputers@[1.5.0,);required-after:appliedenergistics2")
@Mod(name = "Open Radio", modid = OpenRadio.MODID, version = "0.3.1", modLanguage = "java", dependencies = "required-after:OpenComputers@[1.5.0,)")
public class OpenRadio{

public static final String MODID = "openradio";
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/at/chaosfield/openradio/common/init/Blocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@
import at.chaosfield.openradio.OpenRadio;
import at.chaosfield.openradio.common.block.AEEncoderBlock;
import at.chaosfield.openradio.common.block.LaserBlock;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;

/**
* Created by Jakob Riepler (XDjackieXD)
*/
public class Blocks {
public static LaserBlock laserBlock;
public static AEEncoderBlock aeencoderBlock;
public static LaserBlock laserBlock = null;
public static AEEncoderBlock aeencoderBlock = null;

//Register all blocks (Has to be called during FML Init)
public static void init(){
laserBlock = new LaserBlock();
aeencoderBlock = new AEEncoderBlock();
GameRegistry.registerBlock(laserBlock, OpenRadio.MODID + ".laser");
GameRegistry.registerBlock(aeencoderBlock, OpenRadio.MODID + ".aeencoder");
if(Loader.isModLoaded("appliedenergistics2")) {
aeencoderBlock = new AEEncoderBlock();
GameRegistry.registerBlock(aeencoderBlock, OpenRadio.MODID + ".aeencoder");
}
}
}
4 changes: 3 additions & 1 deletion src/main/java/at/chaosfield/openradio/proxy/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import at.chaosfield.openradio.OpenRadio;
import at.chaosfield.openradio.common.tileentity.AEEncoderTileEntity;
import at.chaosfield.openradio.common.tileentity.LaserTileEntity;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;

/**
Expand All @@ -11,7 +12,8 @@
public class CommonProxy{
public void registerTileEntities(){
GameRegistry.registerTileEntity(LaserTileEntity.class, OpenRadio.MODID + ":laser");
GameRegistry.registerTileEntity(AEEncoderTileEntity.class, OpenRadio.MODID + ":aeencoder");
if(Loader.isModLoaded("appliedenergistics2"))
GameRegistry.registerTileEntity(AEEncoderTileEntity.class, OpenRadio.MODID + ":aeencoder");
}

public void registerRenders(){}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"credits": "OpenComputers for some parts of the Textures",
"logoFile": "",
"screenshots": [],
"requiredMods": [ "Forge" ],
"dependencies": []
"requiredMods": [ "Forge", "OpenComputers@[1.5.0,)" ],
"dependencies": [ "appliedenergistics2" ]
}
]

0 comments on commit 6a9d76a

Please sign in to comment.