diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/eio/handler')
| -rw-r--r-- | src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java b/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java index 915140df2c..1066bea75a 100644 --- a/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java +++ b/src/Java/gtPlusPlus/xmod/eio/handler/HandlerTooltip_EIO.java @@ -5,30 +5,33 @@ import static gtPlusPlus.core.lib.CORE.ConfigSwitches.disableEnderIOIngotTooltip import java.lang.reflect.Field; import cpw.mods.fml.common.eventhandler.SubscribeEvent; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + import gregtech.api.enums.Materials; + import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.util.item.ItemUtils; +import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.eio.material.MaterialEIO; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.player.ItemTooltipEvent; public class HandlerTooltip_EIO { - Item mIngot; - ItemStack mPulsatingIron; - ItemStack mConductiveIron; - ItemStack mRedstoneAlloy; - ItemStack mElectricalSteel; - ItemStack mEnergeticAlloy; - ItemStack mVibrantAlloy; - ItemStack mSoularium; - ItemStack mDarkIron; + private static volatile Item mIngot; + private static volatile ItemStack mPulsatingIron; + private static volatile ItemStack mConductiveIron; + private static volatile ItemStack mRedstoneAlloy; + private static volatile ItemStack mElectricalSteel; + private static volatile ItemStack mEnergeticAlloy; + private static volatile ItemStack mVibrantAlloy; + private static volatile ItemStack mSoularium; + private static volatile ItemStack mDarkIron; @SubscribeEvent public void onItemTooltip(ItemTooltipEvent event){ //Is EIO loaded? - if (disableEnderIOIngotTooltips && LoadedMods.EnderIO){ + if (!disableEnderIOIngotTooltips && LoadedMods.EnderIO){ //Is the EIO Ingot Item null? //If it is, reflect in. @@ -90,8 +93,8 @@ public class HandlerTooltip_EIO { //If stacks match, add a tooltip. - if (this.mIngot != null){ - if (event.itemStack.getItem() == this.mIngot){ + if (mIngot != null){ + if (event.itemStack.getItem() == mIngot){ if (event.itemStack.getItemDamage() == 0){ event.toolTip.add(MaterialEIO.ELECTRICAL_STEEL.vChemicalFormula); } |
