aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle16
-rw-r--r--build.properties4
-rw-r--r--src/main/java/com/github/technus/tectech/TecTech.java9
-rw-r--r--src/main/java/com/github/technus/tectech/auxiliary/Reference.java1
-rw-r--r--src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java10
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java6
6 files changed, 37 insertions, 9 deletions
diff --git a/build.gradle b/build.gradle
index 1a1a61aa64..d8aac059a3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -43,6 +43,12 @@ minecraft {
replace "GRADLETOKEN_VERSION", "${config.tectech.version}"
}
+configurations {
+ provided
+ embedded
+ compile.extendsFrom provided, embedded
+}
+
repositories {
maven {
name 'UsrvDE'
@@ -52,11 +58,21 @@ repositories {
name = "ic2"
url = "http://maven.ic2.player.to/"
}
+ ivy {
+ name 'CoFHLib'
+ artifactPattern "http://addons-origin.cursecdn.com/files/${config.cofhlib.cf}/[module]-[revision].[ext]"
+ }
+ ivy {
+ name 'CoFHCore'
+ artifactPattern "http://addons-origin.cursecdn.com/files/${config.cofhcore.cf}/[module]-[revision].[ext]"
+ }
}
dependencies {
compile "eu.usrv:YAMCore:${config.minecraft.version}-${config.yamcore.version}:deobf"
compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
+ provided name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
+ provided name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
}
task getGregTech(type: Download) {
diff --git a/build.properties b/build.properties
index baa074fd66..f77bc158d5 100644
--- a/build.properties
+++ b/build.properties
@@ -6,5 +6,9 @@ ic2.version=2.2.790-experimental
nei.version=1.0.3.74
gregtech.jenkinsbuild=401
gregtech.version=5.09.27.35
+cofhcore.cf=2246/920
+cofhcore.version=[1.7.10]3.0.3-303-dev
+cofhlib.cf=2246/918
+cofhlib.version=[1.7.10]1.0.3-175-dev
yamcore.version=0.5.70 \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java
index 1a74b762bb..a2879c16d8 100644
--- a/src/main/java/com/github/technus/tectech/TecTech.java
+++ b/src/main/java/com/github/technus/tectech/TecTech.java
@@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
import java.util.List;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, dependencies = "required-after:Forge@[10.13.4.1614,);"
- + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;")
+ + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore")
public class TecTech {
@SidedProxy(clientSide = Reference.CLIENTSIDE, serverSide = Reference.SERVERSIDE)
@@ -38,13 +38,15 @@ public class TecTech {
@Instance(Reference.MODID)
public static TecTech instance;
+ public static LogHelper Logger = new LogHelper(Reference.MODID);
private static IngameErrorLog Module_AdminErrorLogs = null;
public static GT_CustomLoader GTCustomLoader = null;
public static TecTechConfig ModConfig;
public static XSTR Rnd = null;
- public static LogHelper Logger = new LogHelper(Reference.MODID);
public static CreativeTabs mainTab = null;
+ public static boolean hasCOFH=false;
+
public static void AddLoginError(String pMessage) {
if (Module_AdminErrorLogs != null)
Module_AdminErrorLogs.AddErrorLogOnAdminJoin(pMessage);
@@ -68,12 +70,13 @@ public class TecTech {
@EventHandler
public void load(FMLInitializationEvent event) {
-
proxy.registerRenderInfo();
}
@EventHandler
public void PostLoad(FMLPostInitializationEvent PostEvent) {
+ hasCOFH=Loader.isModLoaded(Reference.COFHCORE);
+
QuantumGlass.run();
debug_container_EM.run();
diff --git a/src/main/java/com/github/technus/tectech/auxiliary/Reference.java b/src/main/java/com/github/technus/tectech/auxiliary/Reference.java
index 709ba7f620..7c858dafc8 100644
--- a/src/main/java/com/github/technus/tectech/auxiliary/Reference.java
+++ b/src/main/java/com/github/technus/tectech/auxiliary/Reference.java
@@ -7,4 +7,5 @@ public class Reference {
public static final String COLLECTIONNAME = "TecTech";
public static final String CLIENTSIDE = "com.github.technus.tectech.proxy.ClientProxy";
public static final String SERVERSIDE = "com.github.technus.tectech.proxy.CommonProxy";
+ public static final String COFHCORE = "CoFHCore";
}
diff --git a/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java b/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java
index 98f11cb4d4..a1c153b245 100644
--- a/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java
+++ b/src/main/java/com/github/technus/tectech/elementalMatter/classes/rElementalRecipe.java
@@ -7,12 +7,12 @@ import net.minecraftforge.fluids.FluidStack;
* Created by Tec on 02.03.2017.
*/
public class rElementalRecipe implements Comparable<rElementalRecipe> {
- public cElementalDefinitionStackTree inEM;
- public cElementalDefinitionStackTree outEM;
- public ItemStack[] outItems;
- public FluidStack[] outFluids;
+ public final cElementalDefinitionStackTree inEM;
+ public final cElementalDefinitionStackTree outEM;
+ public final ItemStack[] outItems;
+ public final FluidStack[] outFluids;
public Object[] extension = null;
- private short comparableID=0;
+ public final short comparableID;
public rElementalRecipe(
cElementalDefinitionStackTree inEMnotNull,
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
index 90e1bd655c..8cc69930b8 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
@@ -2,9 +2,12 @@ package com.github.technus.tectech.thing.metaTileEntity.multi;
import cofh.api.energy.IEnergyContainerItem;
import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.auxiliary.Reference;
import com.github.technus.tectech.elementalMatter.commonValues;
import com.github.technus.tectech.thing.metaTileEntity.GT_MetaTileEntity_MultiblockBase_EM;
import com.github.technus.tectech.thing.metaTileEntity.multi.gui.GT_GUIContainer_MultiMachineEM;
+import cpw.mods.fml.common.Loader;
+import cpw.mods.fml.common.Optional;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import ic2.api.item.ElectricItem;
@@ -88,7 +91,7 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
doChargeItemStackSpecial((ISpecialElectricItem) ofThis,itemStack);
}else if(itemStack.getItem() instanceof IElectricItem){
doChargeItemStack((IElectricItem) ofThis,itemStack);
- }else if(itemStack.getItem() instanceof IEnergyContainerItem){
+ }else if(TecTech.hasCOFH && itemStack.getItem() instanceof IEnergyContainerItem){
doChargeItemStackRF((IEnergyContainerItem) ofThis,itemStack);
}
mEfficiencyIncrease = 10000;
@@ -150,6 +153,7 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
}
}
+ @Optional.Method(modid=Reference.COFHCORE)
private void doChargeItemStackRF(IEnergyContainerItem item, ItemStack stack )
{
try {