general code cleanup

try and add changes generation back into gradle again
This commit is contained in:
2016-07-27 11:29:58 +02:00
parent e8976365a2
commit faa70ed224
32 changed files with 49 additions and 124 deletions

View File

@@ -16,7 +16,7 @@ public class TraitHeroic extends AbstractTrait {
public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
int durability = ToolHelper.getCurrentDurability(tool);
int durabilitymax = ToolHelper.getMaxDurability(tool);
float calc = (float) (newDamage + (newDamage / 2) / (durability * durabilitymax / (durabilitymax - durability - 1)));
float calc = newDamage + (newDamage / 2) / (durability * durabilitymax / (durabilitymax - durability - 1));
if ((float) durability < (float) (0.10 * durabilitymax) || player.getHealth() < player.getMaxHealth() / 8 || (target.getHealth() == target.getMaxHealth() && random.nextFloat() > 0.8)) {
return super.damage(tool, player, target, damage, calc, isCritical);
} else return super.damage(tool, player, target, damage, newDamage, isCritical);