aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java26
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java (renamed from src/Java/gtPlusPlus/xmod/thaumcraft/common/HANDLER_Thaumcraft.java)3
3 files changed, 20 insertions, 14 deletions
diff --git a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
index 09268e49d5..a4af51f4e5 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
@@ -1,9 +1,9 @@
package gtPlusPlus.xmod.forestry;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
import cpw.mods.fml.common.Optional;
-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;
@@ -11,9 +11,7 @@ import gtPlusPlus.xmod.forestry.bees.recipe.FR_Gregtech_Recipes;
import net.minecraft.block.Block;
import net.minecraft.world.World;
-public class HANDLER_FR extends BlockRegistry {
-
- //public static BlockDenseBeeHouse apiculture;
+public class HANDLER_FR {
public static void preInit(){
if (LoadedMods.Forestry){
@@ -43,12 +41,18 @@ 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){
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);
+ Class oClass;
+ try {
+ oClass = Class.forName("forestry.core.proxy.ProxyCommon");
+ Object oProxy = ReflectionUtils.getField(oClass, "common");
+ if (oProxy != null && oClass.isInstance(oProxy)){
+ Method mParticles = oClass.getDeclaredMethod("addBlockDestroyEffects", World.class, int.class, int.class, int.class, Block.class, int.class);
+ mParticles.invoke(oProxy, world, x, y, z, block, 0);
+ }
}
- }
-
+ catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ }
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java
index 65733c440a..89deeb931d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java
@@ -37,7 +37,10 @@ import net.minecraftforge.event.world.BlockEvent;
* This is an example on how you can create a Tool ItemStack, in this case a Bismuth Wrench:
* GT_MetaGenerated_Tool.sInstances.get("gt.metatool.01").getToolWithStats(16, 1, Materials.Bismuth, Materials.Bismuth, null);
*/
-@Optional.InterfaceList(value = {@Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = MOD_ID_RC), @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft")})
+@Optional.InterfaceList({@Optional.Interface(iface = "forestry.api.arboriculture.IToolGrafter", modid = "Forestry"),
+ @Optional.Interface(iface = "mods.railcraft.api.core.items.IToolCrowbar", modid = "Railcraft"),
+ @Optional.Interface(iface = "buildcraft.api.tools.IToolWrench", modid = "BuildCraft"),
+ @Optional.Interface(iface = "crazypants.enderio.api.tool.ITool", modid = "EnderIO")})
public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool implements IDamagableItem, IToolCrowbar, IToolWrench {
/**
* All instances of this Item Class are listed here.
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/common/HANDLER_Thaumcraft.java b/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java
index 7c5d2407cd..5dec772d03 100644
--- a/src/Java/gtPlusPlus/xmod/thaumcraft/common/HANDLER_Thaumcraft.java
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/HANDLER_Thaumcraft.java
@@ -1,4 +1,4 @@
-package gtPlusPlus.xmod.thaumcraft.common;
+package gtPlusPlus.xmod.thaumcraft;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.xmod.thaumcraft.common.block.TC_BlockHandler;
@@ -23,5 +23,4 @@ public class HANDLER_Thaumcraft {
}
}
-
}