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

No entity source of profile available on block loot tables in certain cases

    XMLWordPrintable

    Details

    • Confirmation Status:
      Unconfirmed
    • Category:
      Loot tables

      Description

      An entity source of profile on loot tables isn't available in some cases without the loot table being triggered by a player breaking a block or using a loot command as an entity.

      For example, a block's loot table can be triggered due to terrain explosion damage with its source being a tnt entity, creeper, wither skull, etc. However, those type of source profiles aren't available.

      Example:

      A replaced block's loot table...

      {
        "type": "minecraft:block",
        "pools": [
          {
            "rolls": 1,
            "entries": [
              {
                "type": "minecraft:item",
                "name": "minecraft:stone",
                "functions": [
                  {
                    "function": "copy_nbt",
                    "source": "this",
                    "ops": [
                      {
                        "source": "{}",
                        "target": "EntitySourceProfile",
                        "op": "replace"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
      

      Triggered by a player either breaking this block or via a loot command as an entity will store the entire player's/entity's NBT data in the item being dropped under its NBT data inĀ  "EntitySourceProfile".
      The item dropped via this loot table triggered with terrain explosion damage won't apply any data to the item as those cases don't seem to be supported.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Teixon Teixon
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: