mojira.dev
MCPE-238796

Loot table functions stop working after the count is set to 0

The bug

When a loot table’s set_count function sets the count of an item to 0, all subsequent loot functions, including those that would set its count back above 0, are ignored. This is the cause of MCPE-35307.

How to reproduce

  1. Download and open the attached world. It contains two loot tables. One sets the item count to 5, then 8. The other sets the item count to 0, then 8.

  2. Run /loot give @s loot setcount1

  3. Run /loot give @s loot setcount2

Expected result

You should get 8 apples and 8 diamonds

Observed result

You only get 8 apples

Linked issues

Attachments

Comments 1

This issue has been reviewed by our team.

Please add new, relevant information if it helps us understand or reproduce the issue. To show that you’re affected, use the vote feature rather than commenting.

If a fix is implemented, it will be listed in our official changelogs.

For major outages or urgent assistance, visit the Minecraft Help Center.

tryashtar

(Unassigned)

1622848

Confirmed

Windows

26.30.27 Preview, 26.20

26.60.21 Preview, 26.60

Retrieved