.base usage (Template:LootChest)
Generates a table of the contents of the designated chests, with columns corresponding to various statistics about the availability of those items.
Invoking
It takes any number of chest parameters, and any number of column parameters, in no particular order.
If no chest parameters are listed, it displays them all; likewise for column parameters.
{{#invoke:LootChest|base
[ |<chestParam1> ... |<chestParamN> ]
[ |<columnHideParam1> ... |<columnHideParamN> ]
}}
Chest parameters
ancient-city,
ancient-city-ice-box,
bastion-bridge,
bastion-generic,
bastion-hoglin-stable,
bastion-treasure,
bonus,
bonus-barrel,
brushable-cold-ocean-ruins,
brushable-desert-temple,
brushable-desert-well,
brushable-trail-ruins,
brushable-trail-ruins-rare,
brushable-warm-ocean-ruins,
buried-treasure,
desert-temple ( desert ),
dungeon,
end-city,
igloo,
jungle-temple ( jungle ),
jungle-temple-dispenser,
mineshaft,
nether-fortress ( nether-fortress, nether ),
pillager-outpost ( outpost ),
ruined-portal,
shipwreck-map,
shipwreck-supply,
shipwreck-treasure,
stronghold-altar ( altar ),
stronghold-library ( library ),
stronghold-storeroom ( storeroom ),
underwater-ruin-big,
underwater-ruin-small,
village-armorer ( armorer ),
village-butcher ( butcher ),
village-cartographer ( cartographer ),
village-desert-house ( desert-house ),
village-fisherman ( fisherman ),
village-fletcher ( fletcher ),
village-mason ( mason ),
village-plains-house ( plains-house ),
village-savanna-house ( savanna-house ),
village-shepherd ( shepherd ),
village-snowy-house ( snowy-house ),
village-taiga-house ( taiga-house ),
village-tannery ( tannery ),
village-temple ( temple ),
village-toolsmith ( toolsmith ),
village-weaponsmith ( weaponsmith ),
woodland-mansion ( mansion )
Column parameters
chance: The odds of finding any of this item in a single chest.,
chests: The average number of chests the player should expect to search to find any of this item.,
items: The number of items expected per chest, averaged over a large number of chests.,
stacksize: The size of stacks (or for unstackable items, number) of this item on any given roll.,
weight: The weight of this item relative to other items in the pool.
Example
{{#invoke:LootChest|base}} → all chests and all columns
{{#invoke:LootChest|base|blacksmith|jungle|bonus|chance|stacksize}} → only blacksmith and jungle chests, and only 'stacksize' and 'chance' columns
.base2 usage (Template:LootChestItem)
Prints a summary of this item's availability in the various worldgen chests.
Invoking
It takes exactly one item name as a parameter.
{{#invoke:LootChest|base2|<itemParam>}}
Item parameters
acacia-log, acacia-sapling, activator-rail, amethyst-shard, ancient-debris, angler-pottery-sherd, apple, archer-pottery-sherd, arms-up-pottery-sherd, arrow, baked-potato, bamboo, barrel, basalt, beetroot, beetroot-seeds, beetroot-soup, bell, birch-log, birch-sapling, black-wool, blade-pottery-sherd, block-of-gold, block-of-iron, blue-dye, blue-ice, blue-key, blue-stained-glass-pane, bone, bone-block, book, book-and-quill, bottle-o'-enchanting, bread, brewer-pottery-sherd, brick, brown-candle, brown-mushroom, brown-wool, bucket, buried-treasure-map, burn-pottery-sherd, cactus, cake, candle, carrot, chain, chainmail-boots, chainmail-chestplate, chainmail-helmet, chainmail-leggings, clay-ball, clock, coal, coast-armor-trim-smithing-template, cocoa-beans, compass, cooked-cod, cooked-porkchop, cooked-salmon, crimson-fungus, crimson-nylium, crimson-roots, crossbow, crying-obsidian, damaged-diamond-boots, damaged-diamond-chestplate, damaged-diamond-helmet, damaged-diamond-leggings, damaged-diamond-sword, damaged-level-enchanted-crossbow, damaged-level-enchanted-diamond-hoe, damaged-level-enchanted-netherite-boots, damaged-level-enchanted-netherite-chestplate, damaged-level-enchanted-netherite-helmet, damaged-level-enchanted-netherite-leggings, damaged-level-enchanted-netherite-sword, damaged-netherite-boots, damaged-netherite-chestplate, damaged-netherite-helmet, damaged-netherite-leggings, damaged-netherite-sword, damaged-random-enchanted-crossbow, damaged-random-enchanted-crossbow-2, damaged-random-enchanted-diamond-boots, damaged-random-enchanted-diamond-boots-2, damaged-random-enchanted-diamond-chestplate, damaged-random-enchanted-diamond-chestplate-2, damaged-random-enchanted-diamond-helmet, damaged-random-enchanted-diamond-helmet-2, damaged-random-enchanted-diamond-leggings, damaged-random-enchanted-diamond-leggings-2, damaged-random-enchanted-diamond-pickaxe, damaged-random-enchanted-diamond-shovel, damaged-random-enchanted-diamond-shovel-2, damaged-random-enchanted-diamond-sword, damaged-random-enchanted-diamond-sword-2, damaged-random-enchanted-iron-sword, damaged-random-enchanted-netherite-axe, damaged-random-enchanted-netherite-boots, damaged-random-enchanted-netherite-chestplate, damaged-random-enchanted-netherite-helmet, damaged-random-enchanted-netherite-hoe, damaged-random-enchanted-netherite-leggings, damaged-random-enchanted-netherite-pickaxe, damaged-random-enchanted-netherite-shovel, damaged-random-enchanted-netherite-sword, dandelion, danger-pottery-sherd, dark-oak-log, dark-oak-sapling, dead-bush, detector-rail, diamond, diamond-boots, diamond-chestplate, diamond-helmet, diamond-hoe, diamond-horse-armor, diamond-leggings, diamond-shovel, diamond-sword, disc-13, disc-cat, disc-fragment-5, disc-mellohi, disc-otherside, disc-pigstep, disc-relic, disc-wait, dune-armor-trim-smithing-template, echo-shard, egg, emerald, empty, empty-map, enchanted-book, enchanted-book-rnd, enchanted-book-rnd-efficiency, enchanted-book-rnd-mending, enchanted-book-rnd-quick-charge, enchanted-book-rnd-soul-speed, enchanted-book-rnd-swift-sneak, enchanted-book-rnd-unbreaking, enchanted-fishing-rod, enchanted-golden-apple, ender-pearl, explorer-pottery-sherd, eye-armor-trim-smithing-template, feather, fern, fire-charge, flint, flint-and-steel, flower-pot, friend-pottery-sherd, furnace, gilded-blackstone, glistering-melon-slice, glow-berries, glowstone, goat-horn, gold-ingot, gold-nugget, golden-apple, golden-boots, golden-carrot, golden-chestplate, golden-helmet, golden-hoe, golden-horse-armor, golden-leggings, golden-sword, grass, gray-wool, green-candle, green-dye, gunpowder, heart-of-the-sea, heart-pottery-sherd, heartbreak-pottery-sherd, host-armor-trim-smithing-template, howl-pottery-sherd, ink-sac, iron-axe, iron-boots, iron-chestplate, iron-helmet, iron-horse-armor, iron-ingot, iron-leggings, iron-nugget, iron-pickaxe, iron-shovel, iron-sword, jungle-log, jungle-sapling, lapis-lazuli, large-fern, lead, leather, leather-boots, leather-cap, leather-pants, leather-tunic, level-enchanted-bow, level-enchanted-diamond-boots, level-enchanted-diamond-boots-2, level-enchanted-diamond-chestplate, level-enchanted-diamond-chestplate-2, level-enchanted-diamond-helmet, level-enchanted-diamond-helmet-2, level-enchanted-diamond-leggings, level-enchanted-diamond-leggings-2, level-enchanted-diamond-leggings-3, level-enchanted-diamond-pickaxe, level-enchanted-diamond-shovel, level-enchanted-diamond-sword, level-enchanted-diamond-sword-2, level-enchanted-golden-boots, level-enchanted-golden-chestplate, level-enchanted-golden-helmet, level-enchanted-golden-hoe, level-enchanted-golden-leggings, level-enchanted-iron-boots, level-enchanted-iron-boots-2, level-enchanted-iron-chestplate, level-enchanted-iron-chestplate-2, level-enchanted-iron-helmet, level-enchanted-iron-helmet-2, level-enchanted-iron-leggings, level-enchanted-iron-leggings-2, level-enchanted-iron-pickaxe, level-enchanted-iron-shovel, level-enchanted-iron-sword, level-enchanted-iron-sword-2, level-enchanted-leather-boots, level-enchanted-leather-cap, level-enchanted-leather-pants, level-enchanted-leather-tunic, level-enchanted-stone-sword, light-blue-dye, light-blue-stained-glass-pane, light-gray-wool, light-weighted-pressure-plate, lodestone, magenta-stained-glass-pane, magma-block, magma-cream, mangrove-log, map, melon-seeds, miner-pottery-sherd, moss-block, mourner-pottery-sherd, name-tag, nether-quartz, nether-wart, netherite-boots, netherite-chestplate, netherite-helmet, netherite-ingot, netherite-leggings, netherite-scrap, netherite-upgrade-smithing-template, oak-hanging-sign, oak-log, oak-planks, oak-sapling, oak-sign, obsidian, orange-dye, packed-ice, paper, pink-stained-glass-pane, plenty-pottery-sherd, poisonous-potato, polished-basalt, poppy, potato, potion-of-healing, potion-of-regeneration, potion-of-water-breathing, powered-rail, prismarine-crystals, prize-pottery-sherd, pumpkin, pumpkin-pie, pumpkin-seeds, purple-candle, purple-stained-glass-pane, rail, raiser-armor-trim-smithing-template, random-effect-arrow, random-effect-lingering-potion, random-effect-potion, random-effect-splash-potion, random-effect-tipped-arrow, random-enchanted-crossbow, random-enchanted-diamond-pickaxe, random-enchanted-golden-axe, random-enchanted-golden-boots, random-enchanted-golden-chestplate, random-enchanted-golden-helmet, random-enchanted-golden-hoe, random-enchanted-golden-leggings, random-enchanted-golden-pickaxe, random-enchanted-golden-shovel, random-enchanted-golden-sword, random-enchanted-leather-boots, random-enchanted-leather-cap, random-enchanted-leather-pants, random-enchanted-leather-tunic, raw-beef, raw-cod, raw-mutton, raw-porkchop, raw-salmon, red-candle, red-key, red-stained-glass-pane, redstone, rib-armor-trim-smithing-template, rotten-flesh, saddle, sand, sculk, sculk-catalyst, sculk-sensor, sentry-armor-trim-smithing-template, shaper-armor-trim-smithing-template, sheaf-pottery-sherd, shears, shelter-pottery-sherd, silence-armor-trim-smithing-template, skull-pottery-sherd, smooth-stone, sniffer-egg, snort-pottery-sherd, snout-armor-trim-smithing-template, snout-banner-pattern, snow-block, snowball, soul-sand, soul-speed-enchanted-golden-boots, soul-torch, spectral-arrow, spider-eye, spire-armor-trim-smithing-template, spruce-hanging-sign, spruce-log, spruce-sapling, spruce-sign, stick, stone, stone-axe, stone-bricks, stone-pickaxe, string, suspicious-stew, suspicious-stew-2, sweet-berries, tall-grass, tide-armor-trim-smithing-template, tnt, torch, tripwire-hook, vex-armor-trim-smithing-template, ward-armor-trim-smithing-template, water-bucket, wayfinder-armor-trim-smithing-template, wheat, wheat-seeds, white-dye, white-wool, wild-armor-trim-smithing-template, wooden-axe, wooden-hoe, wooden-pickaxe, yellow-dye, yellow-key, yellow-stained-glass-pane
Example
{{#invoke:LootChest|base2|iron-ingot}} →
| Item | Structure | Container | Quantity | Chance |
|---|---|---|---|---|
| Java Edition | ||||
| Iron Ingot | Dungeon | Chest | 1–4 | 18.5% |
| Mineshaft | Chest | 1–5 | 27.3% | |
| Bastion remnant | Bridge chest | 4–9 | 11.2% | |
| Treasure chest | 3–9 | 33.7% | ||
| Generic chest | 1–6 | 19% | ||
| Buried treasure | Chest | 1–4 | 99.4% | |
| Desert temple | Chest | 1–5 | 18% | |
| End city | Chest | 4–8 | 38.4% | |
| Jungle temple | Chest | 1–5 | 37.4% | |
| Nether fortress | Chest | 1–5 | 19% | |
| Pillager Outpost | Chest | 1–3 | 30.5% | |
| Shipwreck | Treasure chest | 1–5 | 97.4% | |
| Stronghold | Storeroom chest | 1–5 | 34.3% | |
| Altar chest | 1–5 | 23% | ||
| Village | Armorer's chest | 1–3 | 54.2% | |
| Weaponsmith's chest | 1–5 | 45.1% | ||
| Toolsmith's chest | 1–5 | 41.2% | ||
| Woodland mansion | Chest | 1–4 | 18.5% | |
| Bedrock Edition | ||||
| Iron Ingot | Dungeon | Chest | 1–4 | 18.5% |
| Mineshaft | Chest | 1–5 | 27.3% | |
| Bastion remnant | Bridge chest | 4–9 | 11.2% | |
| Treasure chest | 3–9 | 33.7% | ||
| Generic chest | 1–6 | 19% | ||
| Buried treasure | Chest | 3–5 | 57.2% | |
| Desert temple | Chest | 1–5 | 18% | |
| End city | Chest | 4–8 | 38.4% | |
| Jungle temple | Chest | 1–5 | 37.3% | |
| Nether fortress | Chest | 1–5 | 19% | |
| Pillager Outpost | Chest | 1–3 | 30.5% | |
| Shipwreck | Treasure chest | 1–5 | 97.4% | |
| Stronghold | Altar chest | 1–5 | 22.4% | |
| Storeroom chest | 1–5 | 28.5% | ||
| Village | Weaponsmith's chest | 1–5 | 45.1% | |
| Toolsmith's chest | 1–5 | 41.2% | ||
| Armorer's chest | 1–3 | 54.2% | ||
| Woodland mansion | Chest | 1–4 | 18.5% | |
{{#invoke:LootChest|base2|emerald}} →
| Item | Structure | Container | Quantity | Chance |
|---|---|---|---|---|
| Java Edition | ||||
| Emerald | Buried treasure | Chest | 4–8 | 59.9% |
| Desert temple | Chest | 1–3 | 18% | |
| Suspicious sand | 1 | 12.5% | ||
| Desert well | Suspicious sand | 1 | 12.5% | |
| End city | Chest | 2–6 | 9% | |
| Igloo | Chest | 1 | 7.6% | |
| Jungle temple | Chest | 1–3 | 8.7% | |
| Warm Ocean ruins | Warm ruins suspicious sand | 1 | 13.3% | |
| Cold ruins suspicious gravel | 1 | 13.3% | ||
| Shipwreck | Treasure chest | 1–5 | 73.7% | |
| Trail ruins | Suspicious gravel | 1 | 4.4% | |
| Underwater ruins | Big ruins chest | 1 | 14.9% | |
| Small ruins chest | 1 | 16.4% | ||
| Village | Shepherd's chest | 1 | 12.3% | |
| Tanner's chest | 1–4 | 17.3% | ||
| Armorer's chest | 1 | 31.8% | ||
| Fisherman's chest | 1 | 24.2% | ||
| Desert house chest | 1–3 | 14.3% | ||
| Fletcher's chest | 1 | 12.3% | ||
| Plains house chest | 1–4 | 22.8% | ||
| Savanna house chest | 1–4 | 21.5% | ||
| Butcher's chest | 1 | 10.2% | ||
| Taiga house chest | 1–4 | 18.6% | ||
| Temple chest | 1–4 | 25.4% | ||
| Snowy house chest | 1–4 | 9.9% | ||
| Mason's chest | 1 | 20.8% | ||
| Bedrock Edition | ||||
| Emerald | Desert temple | Suspicious sand | 1 | 12.5% |
| Chest | 1–3 | 18% | ||
| Desert well | Suspicious sand | 1 | 12.5% | |
| End city | Chest | 2–6 | 9% | |
| Igloo | Chest | 1 | 7.6% | |
| Jungle temple | Chest | 1–3 | 8.7% | |
| Cold Ocean ruins | Cold ruins suspicious gravel | 1 | 13.3% | |
| Warm ruins suspicious sand | 1 | 13.3% | ||
| Shipwreck | Treasure chest | 1–5 | 73.7% | |
| Stronghold | Altar chest | 1–3 | 7.1% | |
| Trail ruins | Suspicious gravel | 1 | 4.3% | |
| Underwater ruins | Big ruins chest | 1 | 14.9% | |
| Small ruins chest | 1 | 16.4% | ||
| Village | Snowy house chest | 1–4 | 9.9% | |
| Temple chest | 1–4 | 25.4% | ||
| Plains house chest | 1–4 | 22.8% | ||
| Taiga house chest | 1–4 | 20.3% | ||
| Savanna house chest | 1–4 | 21.5% | ||
| Mason's chest | 1 | 20.8% | ||
| Armorer's chest | 1 | 31.8% | ||
| Butcher's chest | 1 | 10.2% | ||
| Shepherd's chest | 1 | 12.3% | ||
| Fletcher's chest | 1 | 12.3% | ||
| Desert house chest | 1–3 | 14.3% | ||
| Tanner's chest | 1–4 | 17.3% | ||
Maintenance
The data is current as of 1.8 (should be checked/updated to ).
- The source for 1.8 was MCP 9.10. – Sealbudsman (Aaron)
T/C 01:15, 8 July 2015 (UTC)
Source
- The data is set up within
pso that it can be pulled directly from (or compared directly to) the minecraft jar files, or the MCP files. - stack size given here (and given in code) can be larger than the stackable size of the item, prominently in the case of enchanted books. However this fact does not affect the calculated values. This is because the game puts the right number of items, but unstacked rather than stacked.
Data structure
p.items
'<sprite-id>' = { <sprite-type> [, link=<item-link>] [, title=<item-text>] [, cannot_stack=false] [, plural=(false|<custom-plural-word>)] }
p.chests[n].numstacks
{ <min-number-of-stacks>, <max-number-of-stacks> }
p.chests[n].items
'<sprite-id>' = { <min-stack-size>, <max-stack-size>, <item-weight> }
Keys
link: Use this to indicate a link to a page that is different from the sprite-id name.title: Use this to indicate a name for an item that is different from the sprite-id name.cannot_stack: used in LootChestItem. Use this to indicate that the item comes in groups rather than in stacks.plural: used in LootChestItem. Usefalsewhen a word has no plural, like 'Nether Wart'. Use a custom plural word when you cannot simply append an 's' to the base word to make it plural.
Values
<sprite-id>: these must match a sprite name for the items/block as defined in Module:BlockSprite/IDs or Module:ItemSprite/IDs.<sprite-type>: eitheritemorblock
Functions
The following functions are made available at the top of the file, for ease of inspection.
calc_average_amount_this_item_per_chest
- average number of a certain item (not number of stacks), per-chest (not per-structure).
calc_chance_any_of_this_item_per_chest
- chance that at least one of a certain item will be found, per-chest (not per-structure).
calc_num_chests_to_find_this_item
- the expected number of chests of this type a player sould have to search, to find at least one of a certain item.