Mojira Archive
MC-271112

The set_attributes loot function only allows floats while the item component supports doubles

Expected behaviour:

As the item component "attribute_modifiers" supports doubles, the "set_attribute_modifiers" loot table function should also support doubles.

Observed behaviour:

When modifying an item's data with /data or directly putting an attribute in the /give command, you have the full 'double' range of values. But when using an item modifier with "set_attribute_modifiers", the value gets converted to a float with less precision.

 

How to reproduce:

  • Install the attached Datapack (1.20.5)
  • /reload
  • Run "/function report:run", it will give you a stone and a grass block.
  • Use "/data get entity @s SelectedItem" on both items and notice how the attribute values don't match, despite being the same in the datapack function.

Unresolved

SilicatYT

2024-04-24, 08:24 PM

2024-04-28, 07:09 PM

1

0

Confirmed

Low

Platform

Commands

1.20.5

-