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
Add the loot table shown below to a data pack or download the attached data pack
.
Use the
/loot
command to give yourself the loot tableNotice 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
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}]}]}]}
Ran into this on 1.14.4