You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flySpeed has no lang and it doesn't apply when holding an item
Goals
Give attribute.name.generic.flyingSpeed proper lang for all languages. Apply flySpeed attribute when a player holds an item with it (main or off hand), this way, its consistent with all other attributes.
Non Goals
attribute.name.generic.flyingSpeed lang entries for one language only. Apply flySpeed attribute only when in the main hand.
Motivation
Consistency, other attributes apply when a held item has it, but this one doesn't for some reason. I fixed it myself in my Attribute Modifier mod so implementation is rather easy.
Description
Every player tick, when holding a non-empty item stack, get the attribute modifiers of the held main and off hand item in different MultiMap<String, AttributeModifier> variables and check both if they contain the key "generic.flyingSpeed", if so setFlySpeed((float) attributes.get("generic.flyingSpeed").iterator().next().getAmount()), else setFlySpeed(0.05F) (0.05F being the default fly speed).
Feel free to check out my implementation on this as I'm directly explaining how I did it.
Dependencies
No response
References
No response
Guidelines
I have and will continue to adhere to the guidelines
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
flySpeed has no lang and it doesn't apply when holding an item
Goals
Give attribute.name.generic.flyingSpeed proper lang for all languages. Apply flySpeed attribute when a player holds an item with it (main or off hand), this way, its consistent with all other attributes.
Non Goals
attribute.name.generic.flyingSpeed lang entries for one language only. Apply flySpeed attribute only when in the main hand.
Motivation
Consistency, other attributes apply when a held item has it, but this one doesn't for some reason. I fixed it myself in my Attribute Modifier mod so implementation is rather easy.
Description
Every player tick, when holding a non-empty item stack, get the attribute modifiers of the held main and off hand item in different MultiMap<String, AttributeModifier> variables and check both if they contain the key "generic.flyingSpeed", if so setFlySpeed((float) attributes.get("generic.flyingSpeed").iterator().next().getAmount()), else setFlySpeed(0.05F) (0.05F being the default fly speed).
Feel free to check out my implementation on this as I'm directly explaining how I did it.
Dependencies
No response
References
No response
Guidelines
All reactions