Remove flooring of damage as it no longer is useful with the new damage calculation

This commit is contained in:
garyantonyo 2021-07-22 11:20:49 -04:00
parent 35778640ba
commit 2ded6bd2fa
2 changed files with 3 additions and 2 deletions

View File

@ -244,7 +244,8 @@ public class PotatoCannonItem extends ShootableItem {
TextFormatting darkGreen = TextFormatting.DARK_GREEN; TextFormatting darkGreen = TextFormatting.DARK_GREEN;
float damageF = type.getDamage() * additionalDamageMult; float damageF = type.getDamage() * additionalDamageMult;
IFormattableTextComponent damage = new StringTextComponent("" + MathHelper.floor(damageF)); IFormattableTextComponent damage = new StringTextComponent(
damageF == MathHelper.floor(damageF) ? "" + MathHelper.floor(damageF) : "" + damageF);
IFormattableTextComponent reloadTicks = new StringTextComponent("" + type.getReloadTicks()); IFormattableTextComponent reloadTicks = new StringTextComponent("" + type.getReloadTicks());
IFormattableTextComponent knockback = IFormattableTextComponent knockback =
new StringTextComponent("" + (type.getKnockback() + additionalKnockback)); new StringTextComponent("" + (type.getKnockback() + additionalKnockback));

View File

@ -176,7 +176,7 @@ public class PotatoProjectileEntity extends DamagingProjectileEntity implements
Vector3d hit = ray.getLocation(); Vector3d hit = ray.getLocation();
Entity target = ray.getEntity(); Entity target = ray.getEntity();
PotatoCannonProjectileTypes projectileType = getProjectileType(); PotatoCannonProjectileTypes projectileType = getProjectileType();
float damage = MathHelper.floor(projectileType.getDamage() * additionalDamageMult); float damage = projectileType.getDamage() * additionalDamageMult;
float knockback = projectileType.getKnockback() + additionalKnockback; float knockback = projectileType.getKnockback() + additionalKnockback;
Entity owner = this.getOwner(); Entity owner = this.getOwner();