mojira.dev
MC-236558

damage tag on arrows cannot be set to non-integer numeral if set from integer numeral in scoreboard value.

How to recreate

1. create any scoreboard objective and set any entity to have a value of 1500 in that scoreboard

2. shoot/summon an arrow
3. do the command, "/execute as @e[type=arrow,limit=1] store result entity @s damage double 0.001 run scoreboard players get @p <scoreboard objective name>
4. get the damage value of the arrow (/data get entity @e[type=arrow,limit=1] damage
5. notice how it is 1.0d, instead of being 1.5d

Comments 4

store result entity @s damage byte 0.001

Bytes don't allow decimals; it's an 8-bit integer (-128 through 127). You want to use a double, instead.

Invalid due to user error.

Sorry I typed the command in the bug report wrong!

That's not the only mistake

scoreboard players get entity @p <scoreboard objective name>

"entity" is not a valid parameter here.

Please copy-paste the command you used, rather than retyping it.

Also that :/ sorry I typed this in a rush.

I didn’t think about that

Ihasdisconnected

(Unassigned)

Unconfirmed

(Unassigned)

command

1.17.1

Retrieved