Skip to content

Package

mortuusars edited this page Jul 23, 2023 · 5 revisions

Packages are created by opening a Cardboard Box, placing items inside and packing it.
They will store name of a player who packed it as a 'sender' and will display it on the tooltip. (Only in 1.1.0 and up)

Packages can also be used as simple loot-boxes by adding the packedItems tag to the Package NBT.
packedItems can either be a LootTable path or List of ItemStack.

Loot Table example:

/give @s wares:package{packedItems:"minecraft:chests/simple_dungeon"}

{
  "packedItems": "minecraft:chests/simple_dungeon"
}

Items example:

/give @s wares:package{packedItems:[{id:"minecraft:emerald",Count:2},{id:"minecraft:rotten_flesh",Count:1}]}

{
  "packedItems": [
    {
      "id": "minecraft:emerald",
      "Count": 2
    },
    {
      "id": "minecraft:rotten_flesh",
      "Count": 1
    }
  ]
}