@Override public String getLocalizedDesc() { return Util.translateFormatted(String.format(LOC_Desc, EXTRA_TRAIT_IDENTIFIER), material.getLocalizedName()); }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getModifierIdentifier()); return ImmutableList.of(Util.translateFormatted(loc, Util.df.format(bonusDamage))); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getModifierIdentifier()); return ImmutableList.of(Util.translateFormatted(loc, Util.dfPercent.format(bonus))); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getModifierIdentifier()); return ImmutableList.of(Util.translateFormatted(loc, Util.dfPercent.format(bonus))); } }
@Override public String getLocalizedDesc() { return Util.translateFormatted(String.format(LOC_Desc, "fortify"), material.getLocalizedName()); }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getIdentifier()); ModifierNBT.IntegerNBT data = ModifierNBT.readInteger(modifierTag); int duration = getFireDuration(data); float dmg = getFireDamage(data); return ImmutableList.of( Util.translateFormatted(loc, Util.df.format(dmg)), Util.translateFormatted(loc + 2, Util.df.format(duration)) ); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getModifierIdentifier()); return ImmutableList.of(Util.translateFormatted(loc, Util.df.format(calcBonus(tool)))); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getModifierIdentifier()); float bonus = bonusModifier(modifierTag); return ImmutableList.of(Util.translateFormatted(loc, Util.dfPercent.format(bonus))); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getModifierIdentifier()); return ImmutableList.of(Util.translateFormatted(loc, Util.df.format(calcBonus(tool)))); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getIdentifier()); float duration = getDuration(tool); duration /= 20f; return ImmutableList.of(Util.translateFormatted(loc, Util.df.format(duration))); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getModifierIdentifier()); float amount = lifesteal(modifierTag); return ImmutableList.of(Util.translateFormatted(loc, Util.dfPercent.format(amount))); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getIdentifier()); float chance = getBlockDestroyChange(tool); return ImmutableList.of(Util.translateFormatted(loc, Util.dfPercent.format(chance))); }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = Util.translate(LOC_Extra, getIdentifier()); return ImmutableList.of(Util.translateFormatted(loc, Util.df.format(bonusDamage))); } }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { Data data = ModifierNBT.readTag(modifierTag, Data.class); assert data != null; String loc = String.format(LOC_Extra, getIdentifier()); return ImmutableList.of( Util.translateFormatted(loc, data.storedXp) ); }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getIdentifier()); if(I18n.canTranslate(loc)) { float dmg = calcIncreasedDamage(modifierTag, 0); return ImmutableList.of(Util.translateFormatted(loc, Util.df.format(dmg))); } return super.getExtraInfo(tool, modifierTag); } }
@Override public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { if(config.getConfig(WailaRegistrar.CONFIG_PROGRESS) && accessor.getTileEntity() instanceof IProgress) { IProgress te = (IProgress) accessor.getTileEntity(); float progress = te.getProgress(); if(progress > 0f) { currenttip.add(Util.translateFormatted("gui.waila.casting.progress", Util.dfPercent.format(progress))); } } return currenttip; }
@Override public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) { String loc = String.format(LOC_Extra, getIdentifier()); if(I18n.canTranslate(loc)) { float chance = getReinforcedChance(modifierTag); String chanceStr = Util.dfPercent.format(chance); if(chance >= 1f) { chanceStr = Util.translate("modifier.%s.unbreakable", getIdentifier()); } return ImmutableList.of(Util.translateFormatted(loc, chanceStr)); } return super.getExtraInfo(tool, modifierTag); } }
@Override public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { if(config.getConfig(WailaRegistrar.CONFIG_CASTING) && accessor.getTileEntity() instanceof TileCasting) { TileCasting te = (TileCasting) accessor.getTileEntity(); ItemStack output = te.getCurrentResult(); if(output != null) { currenttip.add(Util.translateFormatted("gui.waila.casting.recipe", output.getDisplayName())); } } return currenttip; }
private static void canApplyWithEnchantment(IToolMod iToolMod, Set<Enchantment> enchantments) throws TinkerGuiException { for(Enchantment enchantment : enchantments) { if(!iToolMod.canApplyTogether(enchantment)) { String enchName = I18n.translateToLocal(enchantment.getName()); throw new TinkerGuiException(Util.translateFormatted("gui.error.incompatible_enchantments", iToolMod.getLocalizedName(), enchName)); } } }
@Override public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) { TileEntity te = world.getTileEntity(data.getPos()); if(te instanceof TileCasting) { TileCasting casting = (TileCasting) te; ItemStack output = casting.getCurrentResult(); if(output != null) { probeInfo.horizontal().text(Util.translateFormatted("gui.waila.casting.recipe", output.getDisplayName())); } } } }