aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech
diff options
context:
space:
mode:
authorBlood-Asp <bloodasphendrik@gmail.com>2015-12-21 18:44:07 +0100
committerBlood-Asp <bloodasphendrik@gmail.com>2015-12-21 18:44:07 +0100
commit9781ccd9ee09f0f9039465096e09b0544b7eebdd (patch)
treeed974ec9fcf40521be1f2c324529ef349537ad04 /src/main/java/gregtech
parentcc3631c8ae29240e1d6113796fbccc4f658dcf82 (diff)
downloadGT5-Unofficial-9781ccd9ee09f0f9039465096e09b0544b7eebdd.tar.gz
GT5-Unofficial-9781ccd9ee09f0f9039465096e09b0544b7eebdd.tar.bz2
GT5-Unofficial-9781ccd9ee09f0f9039465096e09b0544b7eebdd.zip
fix crash without rf api
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r--src/main/java/gregtech/GT_Mod.java20
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java7
2 files changed, 15 insertions, 12 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 1ce784a8c1..1ee700cd4a 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -238,17 +238,6 @@ public class GT_Mod
GregTech_API.mRFtoEU = GregTech_API.sOPStuff.get(ConfigCategories.general, "100RFtoEU", 20);
GregTech_API.mRFExplosions = GregTech_API.sOPStuff.get(ConfigCategories.general, "RFExplosions", false);
GregTech_API.meIOLoaded = Loader.isModLoaded("EnderIO");
-
- if(GregTech_API.mOutputRF||GregTech_API.mInputRF){
- try {
- Class tClass = cofh.api.energy.IEnergyReceiver.class;
- tClass.getCanonicalName();
- } catch (Exception e) {
- GregTech_API.mOutputRF = false;
- GregTech_API.mInputRF = false;
- System.err.println("RF API not found");
- }
- }
gregtechproxy.mChangeHarvestLevels = GregTech_API.sMaterialProperties.get("havestLevel", "activateHarvestLevelChange", false);
if(gregtechproxy.mChangeHarvestLevels){
@@ -680,6 +669,15 @@ public class GT_Mod
}
}
}
+
+ if(GregTech_API.mOutputRF||GregTech_API.mInputRF){
+ GT_Utility.checkAvailabilities();
+ if(!GT_Utility.RF_CHECK){
+ GregTech_API.mOutputRF = false;
+ GregTech_API.mInputRF = false;
+ }
+ }
+
achievements = new GT_Achievements();
Map.Entry<IRecipeInput, RecipeOutput> tRecipe;
GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables.");
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index 766f3b6b68..b6fa328b79 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -85,7 +85,7 @@ public class GT_Utility {
private static final Map<GT_ItemStack, FluidContainerData> sFilledContainerToData = new HashMap<GT_ItemStack, FluidContainerData>();
private static final Map<GT_ItemStack, Map<Fluid, FluidContainerData>> sEmptyContainerToFluidToData = new HashMap<GT_ItemStack, Map<Fluid, FluidContainerData>>();
public static volatile int VERSION = 509;
- public static boolean TE_CHECK = false, BC_CHECK = false, CHECK_ALL = true;
+ public static boolean TE_CHECK = false, BC_CHECK = false, CHECK_ALL = true, RF_CHECK = false;
public static Map<GT_PlayedSound, Integer> sPlayedSoundMap = new HashMap<GT_PlayedSound, Integer>();
private static int sBookCount = 0;
@@ -336,6 +336,11 @@ public class GT_Utility {
tClass.getCanonicalName();
BC_CHECK = true;
} catch (Throwable e) {/**/}
+ try {
+ Class tClass = cofh.api.energy.IEnergyReceiver.class;
+ tClass.getCanonicalName();
+ RF_CHECK = true;
+ } catch (Throwable e) {/**/}
CHECK_ALL = false;
}
}