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

Chest block loot table doesn't define dropping its contents

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 18w43b
    • None
    • Unconfirmed

      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"
              }
            ]
          }
        ]
      }
      

            boq [Mojang] Bartosz Bok
            AlexMCool Alex³
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: