package slimeknights.tconstruct.tools.traits; import com.google.common.collect.ImmutableList; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import java.util.List; import slimeknights.tconstruct.library.Util; import slimeknights.tconstruct.library.traits.AbstractTrait; public class TraitSuperheat extends AbstractTrait { protected float bonus = 0.35f; public TraitSuperheat() { super("superheat", 0xffffff); } @Override public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) { if(target.isBurning()) { newDamage += damage * bonus; } return newDamage; } @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))); } }