-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tooltip related extension methods for Attribute & Attribute related tooltip fix #1371
base: 1.21.x
Are you sure you want to change the base?
Conversation
|
This looks like a more minimal version of the Your solution supplies Apothic Attributes uses The other method, |
The
The player context is for cases like providing tooltips in the style how vanilla displays the attack damage and attack speed for items, they need a player context to get the attribute base value. Tooltip flag is not natively available for the |
We could do that, though it depends what level of control we want to express over the tooltips - I have an event for this functionality in AA here But it depends on AA's tooltip handling rules, which entirely replace the vanilla ones to provide more control. |
Context
ItemStack
, like the weapon attack damage and attack speed modifier and theAttributes.KNOCKBACK_RESISTANCE
.PotionContents#addPotionTooltip
does not respectAttribute#getStyle
(This is a vanilla bug, haven't search about it on Mojira yet).Features
BooleanAttribute
also benefits from this extension as now it is showed in tooltip in the style ofEnables <Attribute>
andDisables <Attribute>
instead of+1 <Attribute>
and-100% <Attribute>
, which is more user friendly.PotionContents#addPotionTooltip
, so it may use a custom consuming description other than thepotion.whenDrank
, which is useful for mods who wish to utilize the method in their non-potion item (like foods) tooltip.Fixes
PotionContents#addPotionTooltip
does not respectAttribute#getStyle(boolean)
.NAMETAG_DISTANCE
's sentiment toNEUTRAL
, replacing the oldBENEFICIAL
default.