TeamLapen / Vampirism

A Minecraft mod called Vampirism
https://vampirism.dev
Other
195 stars 55 forks source link

Vampire sword attack speed is displayed as 300% #315

Closed flamechair closed 3 years ago

flamechair commented 6 years ago

Versions

Issue Description

Vampire sword attack speed registers as 300%

Reproduce Steps

Get vampire sword (either) Look at attack speed

Additional Information

maxanier commented 6 years ago

Not sure if this is intentional or a bug in Forge. I would guess the latter. Forge takes the modifier from the sword (e.g. -0.8) and adds the player base value on-top (4). The result is displayed as percent (x100), that's where the 300 comes from. However, during damage calculation it does 4 + 4*(-0.8) which is either -80% or 20%.

We could create a forge issue for that, but I am not sure if it is worth the trouble.

Relevant code section: ItemStack#getTooltip around line 890 (for 1.12.2)

maxanier commented 3 years ago

Seems like this is no longer an issue with latest Vampirism and MC1.16