If you give yourself an item that has a knockback_resistance attribute modifier, The tooltip scales the modifier’s amount by 10.
Using the example command below, the tooltip says the item grants +5 knockback resistance, while in reality it grants 50% (flat) knockback resistance.
/give @s minecraft:phantom_membrane[minecraft:attribute_modifiers=[{id:"kbr",type:"knockback_resistance",amount:0.5,operation:"add_value",slot:"mainhand"}]]
Can confirm in 1.21.5-pre2, this has always bothered me. I rewrote the description to make it easier to read.
Putting aside the scaling issue for a moment, I would argue that knockback_resistance and explosion_knockback_resistance are the only attributes which players expect to read as a percentage and should therefore have different tooltips. Whereas a regular tooltip should read eg.
operation
Output
Notes
add_value
+3 Attack Damage
add_multiplied_base
+300% Base Attack Damage
Also a change request
add_multiplied_total
+300% Total Attack Damage
Also a change request
a knockback resistance tooltip should read eg.
operation
Output
add_value
+30% Knockback Resistance
add_multiplied_base
+30% Base Knockback Resistance
add_multiplied_total
+30% Total Knockback Resistance
While this would not resolve all the comprehensibility issues with KBR tooltips, considering that only
add_valueis used for KBR in vanilla, the improvement would be significant for the average player. Players would see that “this netherite helmet makes me take 10% less knockback“ as opposed to “this netherite helmet increases my knockback resistance by 0.1 (or 1, until this bug is fixed) in some unknown metric“.