mojira.dev
MC-212671

Loot table tag entry with "expand": true does not apply functions

The bug

When a loot entry uses the tag type and has expand set to true, any functions on that loot entry won't be applied to the item.

How to reproduce

  1. Add the loot table shown below to a data pack or download the attached data pack

[media]
  1. .

  2. Use the /loot command to give yourself the loot table

  3. Notice that you only get one item, when you expect to get a full stack.

Example loot table

{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:tag",
          "name": "minecraft:logs",
          "expand": true,
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 64
            }
          ]
        }
      ]
    }
  ]
}

Linked issues

Attachments

Comments 3

Ran into this on 1.14.4

Still in 1.21.1 and 24w33a.

A one-line-command to reproduce this bug:

/loot give @s loot {pools:[{rolls:1,entries:[{type:tag,name:logs,expand:true,functions:[{function:set_count,count:64}]}]}]}

Can confirm in 1.21.4

Misode

boq

Confirmed

Loot tables

21w03a, 1.16.5, 1.18, 1.19.2, 1.21.1, 24w33a

Retrieved