PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
55 stars 21 forks source link

`movementSpeed` attribute (and all attributes other than `attackSpeed` and `attackDamage`) not showing up in lore #2711

Open yorik100 opened 1 year ago

yorik100 commented 1 year ago

Terms

Discord tag (optional)

yorik100#5011

What happened?

If you have a weapon with attackdamage, attackspeed and speed, speed wont be shown in lore

Steps to reproduce the issue

  1. Create a weapon with attakdamage, attackspeed and speed
  2. Hover your cursor over that weapon
  3. Speed attribute doesn't show

Server version

Paper version git-Paper-546 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT)

ItemsAdder Version

3.4.1f2

ProtocolLib Version

5.1.0

LoneLibs Version

1.0.24

FULL server log

Not needed

Error (optional)

No response

Problematic items yml configuration file (optional)

No response

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

In game : image In settings : image

Speed boost is getting applied, it's just not showing up in lore

LoneDev6 commented 1 year ago

Yes this is normal, for now you have to set it in the lore manually. I'll try to see if I can code a fix for that but could be tricky.

Thanks

yorik100 commented 1 year ago

Yes this is normal, for now you have to set it in the lore manually. I'll try to see if I can code a fix for that but could be tricky.

Thanks

Remember that other attributes exist, including knockback resistance and bonus health

LoneDev6 commented 11 months ago

More info here: https://github.com/PluginBugs/Issues-ItemsAdder/issues/448#issuecomment-792871597

You have to disable this in config.yml of ItemsAdder. fix-show-attack-and-damage-as-lore: false

ItemsAdder has to do some tricks to show the correct value for damage and speed of weapons because the game uses a stupid calculation and would show slightly imprecise values (+4 for speed and +1 for damage).

To do that ItemsAdder hides the vanilla information using the item flag HIDE_ATTRIBUTES, but the downside is that it hides all attributes not only speed and damage. So I have to manually write these in the lore, but I prefer not to write ALL possible attributes for performance reasons. If you have more than speed and damage attributes you can write them on your own using the lore attribute of the ItemsAdder item.

Let me know if the solution is good or not.