use of blusunrize.immersiveengineering.client.gui.GuiBlastFurnace in project ImmersiveEngineering by BluSunrize.
the class ClientEventHandler method onItemTooltip.
@SubscribeEvent
public void onItemTooltip(ItemTooltipEvent event) {
if (event.getItemStack().hasCapability(CapabilityShader.SHADER_CAPABILITY, null)) {
ShaderWrapper wrapper = event.getItemStack().getCapability(CapabilityShader.SHADER_CAPABILITY, null);
ItemStack shader = wrapper != null ? wrapper.getShaderItem() : null;
if (shader != null)
event.getToolTip().add(TextFormatting.DARK_GRAY + shader.getDisplayName());
}
if (ItemNBTHelper.hasKey(event.getItemStack(), "IE:Earmuffs")) {
ItemStack earmuffs = ItemNBTHelper.getItemStack(event.getItemStack(), "IE:Earmuffs");
if (earmuffs != null)
event.getToolTip().add(TextFormatting.GRAY + earmuffs.getDisplayName());
}
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT && ClientUtils.mc().currentScreen != null && ClientUtils.mc().currentScreen instanceof GuiBlastFurnace && BlastFurnaceRecipe.isValidBlastFuel(event.getItemStack()))
event.getToolTip().add(TextFormatting.GRAY + I18n.format("desc.ImmersiveEngineering.info.blastFuelTime", BlastFurnaceRecipe.getBlastFuelTime(event.getItemStack())));
if (IEConfig.oreTooltips && event.isShowAdvancedItemTooltips()) {
for (int oid : OreDictionary.getOreIDs(event.getItemStack())) event.getToolTip().add(TextFormatting.GRAY + OreDictionary.getOreName(oid));
// FluidStack fs = FluidUtil.getFluidContained(event.getItemStack());
// if(fs!=null && fs.getFluid()!=null)
// event.getToolTip().add("Fluid: "+ FluidRegistry.getFluidName(fs));
}
}
Aggregations