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/eio/handler/HandlerTooltip_EIO.java29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java b/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java
index 1066bea75a..c00eb5254a 100644
--- a/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java
+++ b/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java
@@ -6,11 +6,13 @@ import java.lang.reflect.Field;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import gregtech.api.enums.Materials;
+import gtPlusPlus.core.handler.events.BlockEventHandler;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.eio.material.MaterialEIO;
@@ -40,16 +42,16 @@ public class HandlerTooltip_EIO {
Class<?> oMainClass = Class.forName("crazypants.enderio.EnderIO");
Class<?> oIngotClass = Class.forName("crazypants.enderio.material.ItemAlloy");
if (oMainClass != null && oIngotClass != null){
-
+
Field oAlloyField = oMainClass.getDeclaredField("itemAlloy");
oAlloyField.setAccessible(true);
Object oAlloy = oAlloyField.get(oMainClass);
-
+
if (oAlloy != null){
if (oIngotClass.isInstance(oAlloy) || Item.class.isInstance(oAlloy)){
mIngot = (Item) oAlloy;
}
-
+
}
}
}
@@ -127,6 +129,27 @@ public class HandlerTooltip_EIO {
catch (ClassNotFoundException e) {
}
}
+
+ if (!BlockEventHandler.blockLimestone.isEmpty()) {
+ for (ItemStack h : BlockEventHandler.blockLimestone) {
+ if (h != null && Block.getBlockFromItem(h.getItem()) == Block.getBlockFromItem(event.itemStack.getItem())) {
+ if (!ItemUtils.getModId(h).toLowerCase().contains("biomesoplenty")) {
+ event.toolTip.add("May contain Fluorite Ore");
+ }
+ }
+ }
+ }
+ if (!BlockEventHandler.oreLimestone.isEmpty()) {
+ for (ItemStack h : BlockEventHandler.oreLimestone) {
+ if (h != null && Block.getBlockFromItem(h.getItem()) == Block.getBlockFromItem(event.itemStack.getItem())) {
+ if (!ItemUtils.getModId(h).toLowerCase().contains("biomesoplenty")) {
+ event.toolTip.add("May contain Fluorite Ore");
+ }
+ }
+ }
+ }
+
+
}
}