aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-11-05 21:31:39 +1000
committerAlkalus <draknyte1@hotmail.com>2017-11-05 21:31:39 +1000
commit39adfbdb35ca9c040a990b3ef3ad4744f984c36b (patch)
tree8daf8821c6c3e3f0d14ed4760edfd2f3e66d834b /src/Java
parent177c5cddb5f59cd6e1c86fc57f44cfce2b4117c7 (diff)
downloadGT5-Unofficial-39adfbdb35ca9c040a990b3ef3ad4744f984c36b.tar.gz
GT5-Unofficial-39adfbdb35ca9c040a990b3ef3ad4744f984c36b.tar.bz2
GT5-Unofficial-39adfbdb35ca9c040a990b3ef3ad4744f984c36b.zip
$ Should fix #147. Forestry Crash if not loaded.
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
index 66e65fe3a6..09268e49d5 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
@@ -5,6 +5,7 @@ import forestry.core.blocks.BlockRegistry;
import forestry.core.proxy.Proxies;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry;
import gtPlusPlus.xmod.forestry.bees.recipe.FR_Gregtech_Recipes;
import net.minecraft.block.Block;
@@ -16,18 +17,13 @@ public class HANDLER_FR extends BlockRegistry {
public static void preInit(){
if (LoadedMods.Forestry){
- FR_ItemRegistry.Register();
- if (CORE.configSwitches.enableCustomAlvearyBlocks){
- //AlvearyHandler.run();
- }
+ FR_ItemRegistry.Register();
}
}
public static void Init(){
if (LoadedMods.Forestry){
- //apiculture = new BlockDenseBeeHouse();
- //apiculture.setBlockName("gtpp." + "beehouse");
- //GameRegistry.registerBlock(apiculture, ItemBlockForestry.class, StringUtil.cleanBlockName(apiculture));
+
}
}
@@ -46,7 +42,13 @@ public class HANDLER_FR extends BlockRegistry {
@Optional.Method(modid = "Forestry")
private static void createBlockBreakParticles_INTERNAL(final World world, final int x, final int y, final int z, final Block block){
- Proxies.common.addBlockDestroyEffects(world, x, y, z, block, 0);
+ if (LoadedMods.Forestry){
+ forestry.core.proxy.ProxyCommon mCommonProxy = ReflectionUtils.getField("forestry.core.proxy.ProxyCommon", "common");
+ if (mCommonProxy != null){
+ mCommonProxy.addBlockDestroyEffects(world, x, y, z, block, 0);
+ }
+ }
+
}