Mojira Archive
MC-137709

Chest block loot table doesn't define dropping its contents

The bug

The fact that chests drop their contents isn't defined in their block loot table. Apparently this is still hardcoded, while it is possible to do it with a block loot table.

What the current table looks like

{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:copy_name",
              "source": "block_entity"
            }
          ],
          "name": "minecraft:chest"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:survives_explosion"
        }
      ]
    }
  ]
}

What the block loot table should look like

{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:copy_name",
              "source": "block_entity"
            }
          ],
          "name": "minecraft:chest"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:survives_explosion"
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:dynamic",
          "name": "minecraft:contents"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:survives_explosion"
        }
      ]
    }
  ]
}

Invalid

Alex³

[Mojang] Bartosz Bok

2018-10-24, 11:54 PM

2018-10-25, 11:22 AM

2018-10-25, 11:22 AM

3

2

Unconfirmed

Minecraft 18w43b

-