How to reproduce: put any item in the first slot of your hotbar and run the following command:
/item modify entity @s hotbar.0 {conditions:[{condition:"minecraft:random_chance",chance:0}],function:"minecraft:sequence",functions:[{function:"minecraft:set_item",item:"minecraft:diamond"}]}Even though the condition is impossible (0% chance), the item turns into a diamond. If instead of a sequence we specify the set_item directly:
/item modify entity @s hotbar.0 {conditions:[{condition:"minecraft:random_chance",chance:0}],function:"minecraft:set_item",item:"minecraft:diamond"}it works as expected and doesn’t turn the item to diamond. This issue also affects item modifiers in json files in datapacks.
Comments 0
No comments.