mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 16:33:42 +01:00
update PotatoCannonItem damage description to reflect changes to PotatoProjectileEntity
This commit is contained in:
parent
2cea2e1c0f
commit
64e822626e
1 changed files with 5 additions and 5 deletions
|
@ -226,7 +226,7 @@ public class PotatoCannonItem extends ShootableItem {
|
|||
public void appendHoverText(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag) {
|
||||
int power = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.POWER_ARROWS, stack);
|
||||
int punch = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.PUNCH_ARROWS, stack);
|
||||
final float additionalDamage = power * 2;
|
||||
final float additionalDamageMult = 1 + power * .2f;
|
||||
final float additionalKnockback = punch * .5f;
|
||||
|
||||
getAmmoforPreview(stack).ifPresent(ammo -> {
|
||||
|
@ -243,14 +243,14 @@ public class PotatoCannonItem extends ShootableItem {
|
|||
TextFormatting green = TextFormatting.GREEN;
|
||||
TextFormatting darkGreen = TextFormatting.DARK_GREEN;
|
||||
|
||||
float damageF = type.getDamage() + additionalDamage;
|
||||
float damageF = type.getDamage() * additionalDamageMult;
|
||||
IFormattableTextComponent damage = new StringTextComponent(
|
||||
damageF == MathHelper.floor(damageF) ? "" + MathHelper.floor(damageF) : "" + damageF);
|
||||
IFormattableTextComponent reloadTicks = new StringTextComponent("" + type.getReloadTicks());
|
||||
IFormattableTextComponent knockback =
|
||||
new StringTextComponent("" + (type.getKnockback() + additionalKnockback));
|
||||
|
||||
damage = damage.withStyle(additionalDamage > 0 ? green : darkGreen);
|
||||
damage = damage.withStyle(additionalDamageMult > 1 ? green : darkGreen);
|
||||
knockback = knockback.withStyle(additionalKnockback > 0 ? green : darkGreen);
|
||||
reloadTicks = reloadTicks.withStyle(darkGreen);
|
||||
|
||||
|
|
Loading…
Reference in a new issue