-
Bug
-
Resolution: Duplicate
-
None
-
23w51b
-
None
-
Unconfirmed
-
Commands
The bug
The output of /attribute <entity> <attribute> modifier value get always outputs the unscaled value of the modifier, and makes no mention of the scale parameter, even if provided.
If run inside an /execute store, the stored value is properly scaled.
This is in contrast to /data get, where the command outputs the scale parameter (if supplied) and the scaled value.
Expected result
The command would mention the scale parameter and scaled modifier value, like /data get.
Steps to reproduce
- Create a dummy modifier
/attribute @s minecraft:generic.luck modifier add 01234567-89ab-cdef-0123-456789abcdef "Dummy modifier" 1 add
- Create an example objective and make it visible
/scoreboard objectives add example dummy "Example" /scoreboard objectives setdisplay sidebar example
- Retrieve the modifier value, scale it by 5 and store it in the example objective
/execute store result score @s example run attribute @s generic.luck modifier value get 01234567-89ab-cdef-0123-456789abcdef 5
- Observe the unexpected output:
Value of modifier 01234567-89ab-cdef-0123-456789abcdef on attribute Luck for entity [...] is 1.0
- Meanwhile, the player's score has the correct value of 5.
- Observe the unexpected output:
- Repeat the above, but via /data get, and scale by 10.
/execute store result score @s example run data get entity @s Attributes[{Name:"minecraft:generic.luck"}].Modifiers[0].Amount 10
- Observe the correct output:
Attributes[{Name:"minecraft:generic.luck"}].Modifiers[0].Amount on [...] after scale factor of 10.00 is 10
- Meanwhile, the player's score is updated to 10, as expected.
- Observe the correct output:
- duplicates
-
MC-226898 Wrong Chat box Output of command attribute get <scale>
- Open