Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-270134

Loot table set_count function does not function properly when combined with max_stack_size component on items that have lower stack limits

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 24w13a
    • None
    • Confirmed
    • Commands, Loot tables

      To reproduce:

      1. Attempt to give yourself 64 stackable-to-64 saddles using the following loot table.

      /loot give @s loot {"pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"minecraft:saddle","functions":[{"function":"minecraft:set_count",count:64},{"function":"minecraft:set_components","components":{"minecraft:max_stack_size":64}}]}]}]}

      See that you only get one saddle.

      2. Attempt to give yourself 64 stackable-to-64 armor stands by using the following loot table:

      /loot give @s loot {"pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"minecraft:armor_stand","functions":[{"function":"minecraft:set_count",count:64},{"function":"minecraft:set_components","components":{"minecraft:max_stack_size":64}}]}]}]}

      See that you only get only 16 armor stands.

      set_count is capped by the default max_stack_size component of the item id, rather than properly obeying the max_stack_size component provided in the loot table.

            Unassigned Unassigned
            CreeperMagnet_ CreeperMagnet_
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: