# Modül:LootChest/doc

## İçindekiler

- 1 .base usage (Template:LootChest)
- 2 .base2 usage (Template:LootChestItem)
- 3 Maintenance
- 4 Test cases
- 4.1 Item tests
- 4.2 Chest tests
- 4.2.1 {{LootChest|dev=1}}
- 4.2.2 {{LootChest|chance}}
- 4.2.3 {{LootChest|chance|dev=1}}
- 4.2.4 {{LootChest|stronghold-altar|stronghold-library|stronghold-storeroom|dev=1}}
- 4.2.5 {{LootChest|altar|library|storeroom|stacksize|chance|dev=1}}
- 4.2.6 {{LootChest|bonus|dev=1}}
- 4.2.7 {{LootChest|desert|dev=1}}
- 4.2.8 {{LootChest|jungle}}
- 4.2.9 {{LootChest|dungeon|dev=1}}
- 4.2.10 {{LootChest|end-city|dev=1}}
- 4.2.11 {{LootChest|igloo|dev=1}}
- 4.2.12 {{LootChest|mineshaft|dev=1}}
- 4.2.13 {{LootChest|nether-fortress|dev=1}}
- 4.2.14 {{LootChest|village|dev=1}}
- 4.2.15 {{LootChest|village|chance|dev=1}}

- 4.3 Notes

## .base usage (Template:LootChest)[kaynağı değiştir]

Generates a table of the contents of the designated chests, with columns corresponding to various statistics about the availability of those items.

### Invoking[kaynağı değiştir]

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[kaynağı değiştir]

bonus,

desert-temple ( desert ),

dungeon,

end-city,

igloo,

jungle-temple ( jungle ),

jungle-temple-dispenser,

mineshaft,

nether-fortress ( nether, fortress ),

stronghold-altar ( altar ),

stronghold-library ( library ),

stronghold-storeroom ( storeroom ),

village-blacksmith ( blacksmith ),

village-two-room-house,

woodland-mansion ( mansion )

### Column parameters[kaynağı değiştir]

chance: the odds of getting any of this item in a single chest.,

chests: the number of chests expected 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 found in this chest.,

weight: the weight of this item relative to other items in the chest.

### Example[kaynağı değiştir]

`{{#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)[kaynağı değiştir]

Prints a summary of this item's availability in the various worldgen chests.

### Invoking[kaynağı değiştir]

It takes exactly one item name as a parameter.

{{#invoke:LootChest|base2|<itemParam>}}

### Item parameters[kaynağı değiştir]

acacia-wood, acacia-wood-only, activator-rail, apple, arrow, beetroot, beetroot-seeds, bone, book, bread, bucket, carrot, chainmail-chestplate, coal, compass, detector-rail, diamond, diamond-chestplate, diamond-hoe, diamond-horse-armor, disc-13, disc-cat, emerald, empty, empty-map, enchanted-book, enchanted-book-rnd, enchanted-diamond-boots, enchanted-diamond-chestplate, enchanted-diamond-helmet, enchanted-diamond-leggings, enchanted-diamond-pickaxe, enchanted-diamond-shovel, enchanted-diamond-sword, enchanted-iron-boots, enchanted-iron-chestplate, enchanted-iron-helmet, enchanted-iron-leggings, enchanted-iron-pickaxe, enchanted-iron-shovel, enchanted-iron-sword, ender-pearl, flint-and-steel, gold-ingot, gold-nugget, golden-apple, golden-chestplate, golden-horse-armor, golden-sword, gunpowder, iron-boots, iron-chestplate, iron-helmet, iron-horse-armor, iron-ingot, iron-leggings, iron-pickaxe, iron-sword, lapis-lazuli, melon-seeds, name-tag, nether-wart, notch-apple, oak-sapling, oak-wood, oak-wood-only, obsidian, paper, potato, powered-rail, pumpkin-seeds, rail, raw-salmon, redstone, rotten-flesh, saddle, sand, seeds, spider-eye, stick, stone-axe, stone-pickaxe, string, torch, wheat, wood-planks, wooden-axe, wooden-hoe, wooden-pickaxe

### Example[kaynağı değiştir]

`{{#invoke:LootChest|base2|iron-ingot}}`

→ Iron ingots can be found in 18.8% of dungeon chests and 18.8% of woodland mansion chests in stacks of 1–4; in 19.2% of nether fortress chests, 18.2% of desert temple chests, 46.1% of village blacksmith chests, 44.5% of jungle temple chests, 32.0% of chest minecarts in abandoned mineshafts, 23.4% of stronghold altar chests, and 35.6% of stronghold storeroom chests, all in stacks of 1–5; and in 39.4% of End city chests in stacks of 4–8.

`{{#invoke:LootChest|base2|emerald}}`

→ Emeralds can be found in 7.7% of igloo chests in stacks of 1, in 18.2% of desert temple chests and 10.5% of jungle temple chests in stacks of 1–3, and in 9.1% of End city chests in stacks of 2–6.

## Maintenance[kaynağı değiştir]

The tables are current as of 1.8.8 (should be checked/updated to 1.12).

The tables are current as of snapshot 15w47a (should be checked/updated to ).

- The source for 15w47a was the loot table from the .jar. – Sealbudsman
^{talk}/_{contr}22:30, 18 November 2015 (UTC)

### Source[kaynağı değiştir]

- The data is set up within
`p`

so that it can be pulled directly from (or compared directly to) the minecraft loot table 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[kaynağı değiştir]

`p.items`

`'`

*<item-id>*' = { '*<sprite-type>*' [, id='*<sprite-id>*'] [, link='*<item-link>*'] [, title='*<item-text>*'] [, cannot_stack=*false*] [, plural=*(false|'<custom-plural-word>')*] [, note='*<note-name>*'] }

`p.notes`

`'`

*<note-name>*' = '*<note-full-text>*'

`p.chests[n].pools[n]`

`p.chests[n].poolsDev[n]`

- rolls

`{`

*<min-number-of-stacks>*,*<max-number-of-stacks>*}

`p.chests[n].pools[n].items`

`p.chests[n].poolsDev[n].items`

`'`

*<item-id>*' = {*<min-stack-size>*,*<max-stack-size>*,*<item-weight>*}

`p.synonyms`

`'`

*<chest-name-synonym>*' = '*<original-interally-valid-chest-name>*'- Allows additional chest names to be used as parameters, in addition to the ones defined in p.chests.

`p.display_names`

`'`

*<chest-name-given-via-parameter>*' = '*<name-displayed-in-single-chest-table>*'- If a single chest parameter is used, this defines the name it is called in the summary text above the table.

`p.columns`

`'`

*<column-name>*' = '*<column-full-description>*'- The column descriptions, found either in the tooltip on the column header, or in the summary text above the table.

#### Keys[kaynağı değiştir]

: A different ID, from Template:ItemSprite or Template:BlockSprite.*id*

: A link to a page that is different from the sprite-id name.*link*

: A name for an item that is different from the sprite-id name.*title*

: Indicates that a note will appear next to this item in the table.*note*

: used in LootChestItem. Use this to indicate that the item comes in groups rather than in stacks.*cannot_stack*

: used in LootChestItem. Use*plural*

when 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.*false*

#### Values[kaynağı değiştir]

: these must match a sprite name for the items/block as defined in Module:BlockSprite/IDs or Module:ItemSprite/IDs, unless*<item-id>*

is included in the item definition.*id*

: these must match a sprite name for the items/block as defined in Module:BlockSprite/IDs or Module:ItemSprite/IDs.*<sprite-id>*

: either*<sprite-type>*

or*item**block*

### Functions[kaynağı değiştir]

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).

- chance that

## Test cases[kaynağı değiştir]

### Item tests[kaynağı değiştir]

Acacia or dark oak wood can be found in 68.4% of bonus chests in stacks of 1–3.

Activator rails can be found in 27.1% of chest minecarts in abandoned mineshafts in stacks of 1–4.

Apples can be found in 61.6% of village blacksmith chests, 74.3% of igloo chests, 33.7% of stronghold altar chests, and 50.0% of stronghold storeroom chests, all in stacks of 1–3; and in 83.8% of bonus chests in stacks of 1–2.

Arrows can be found in all dispensers in jungle temples in stacks of 2–7.

Beetroot seeds can be found in 21.5% of End city chests in stacks of 1–10, and in 18.8% of dungeon chests, 32.0% of chest minecarts in abandoned mineshafts, and 18.8% of woodland mansion chests, all in stacks of 2–4.

Beetroots can be found in 55.3% of village two-room house chests in stacks of 5–8.

Bones can be found in 29.0% of desert temple chests and 72.2% of jungle temple chests in stacks of 4–6, and in 59.0% of desert temple chests, 57.8% of dungeon chests, and 57.8% of woodland mansion chests, all in stacks of 1–8.

Books can be found in 94.6% of stronghold library chests in stacks of 1–3.

Bread can be found in 35.3% of dungeon chests and 35.3% of woodland mansion chests in stacks of 1; in 61.6% of village blacksmith chests, 45.0% of chest minecarts in abandoned mineshafts, 33.7% of stronghold altar chests, and 50.0% of stronghold storeroom chests, all in stacks of 1–3; and in 61.5% of bonus chests in stacks of 1–2.

Buckets can be found in 18.8% of dungeon chests and 18.8% of woodland mansion chests in stacks of 1.

Carrots can be found in 82.0% of village two-room house chests in stacks of 4–8.

Chainmail chestplates can be found in 15.1% of woodland mansion chests in groups of 1.

Coal can be found in 27.4% of dungeon chests, 74.3% of igloo chests, and 27.4% of woodland mansion chests, all in stacks of 1–4; and in 32.0% of chest minecarts in abandoned mineshafts and 35.6% of stronghold storeroom chests in stacks of 3–8.

Compasses can be found in 11.0% of stronghold library chests in stacks of 1.

Detector rails can be found in 27.1% of chest minecarts in abandoned mineshafts in stacks of 1–4.

Diamond chestplates can be found in 7.7% of woodland mansion chests in groups of 1.

Diamond hoes can be found in 22.2% of woodland mansion chests in groups of 1.

Diamond horse armor can be found in 11.8% of nether fortress chests, 6.3% of desert temple chests, 5.7% of village blacksmith chests, 5.4% of jungle temple chests, 7.7% of dungeon chests, 4.6% of End city chests, and 2.5% of stronghold altar chests, all in groups of 1.

Diamonds can be found in 19.2% of nether fortress chests, 6.3% of desert temple chests, 16.3% of village blacksmith chests, 15.5% of jungle temple chests, and 7.4% of stronghold altar chests, all in stacks of 1–3; in 10.5% of chest minecarts in abandoned mineshafts in stacks of 1–2; and in 21.5% of End city chests in stacks of 2–7.

Emeralds can be found in 7.7% of igloo chests in stacks of 1, in 18.2% of desert temple chests and 10.5% of jungle temple chests in stacks of 1–3, and in 9.1% of End city chests in stacks of 2–6.

Empty maps can be found in 11.0% of stronghold library chests in stacks of 1.

Enchanted books can be found in 23.7% of desert temple chests, 15.1% of dungeon chests, 14.1% of chest minecarts in abandoned mineshafts, and 15.1% of woodland mansion chests, all in groups of 1.

Enchanted books can be found in 72.2% of stronghold library chests, 5.4% of jungle temple chests, 2.5% of stronghold altar chests, and 4.0% of stronghold storeroom chests, all in groups of 1.

Enchanted diamond boots can be found in 13.4% of End city chests in groups of 1.

Enchanted diamond chestplates can be found in 13.4% of End city chests in groups of 1.

Enchanted diamond helmets can be found in 13.4% of End city chests in groups of 1.

Enchanted diamond leggings can be found in 13.4% of End city chests in groups of 1.

Enchanted diamond pickaxes can be found in 13.4% of End city chests in groups of 1.

Enchanted diamond shovels can be found in 13.4% of End city chests in groups of 1.

Enchanted diamond swords can be found in 13.4% of End city chests in groups of 1.

Enchanted iron boots can be found in 13.4% of End city chests in groups of 1.

Enchanted iron chestplates can be found in 13.4% of End city chests in groups of 1.

Enchanted iron helmets can be found in 13.4% of End city chests in groups of 1.

Enchanted iron leggings can be found in 13.4% of End city chests in groups of 1.

Enchanted iron pickaxes can be found in 13.4% of End city chests in groups of 1.

Enchanted iron shovels can be found in 13.4% of End city chests in groups of 1.

Enchanted iron swords can be found in 13.4% of End city chests in groups of 1.

Ender pearls can be found in 23.4% of stronghold altar chests in stacks of 1.

Flint and steel can be found in 19.2% of nether fortress chests in groups of 1.

Gold horse armor can be found in 29.4% of nether fortress chests, 12.4% of desert temple chests, 5.7% of village blacksmith chests, 5.4% of jungle temple chests, 15.1% of dungeon chests, 4.6% of End city chests, and 2.5% of stronghold altar chests, all in groups of 1.

Gold ingots can be found in 49.8% of nether fortress chests, 26.0% of village blacksmith chests, 17.0% of chest minecarts in abandoned mineshafts, 12.2% of stronghold altar chests, and 19.0% of stronghold storeroom chests, all in stacks of 1–3; in 18.2% of desert temple chests, 60.2% of jungle temple chests, and 54.0% of End city chests, all in stacks of 2–7; and in 9.7% of dungeon chests and 9.7% of woodland mansion chests in stacks of 1–4.

Gold nuggets can be found in 57.9% of igloo chests in stacks of 1–3.

Golden apples (enchanted) can be found in 2.6% of desert temple chests, 3.1% of dungeon chests, 1.4% of chest minecarts in abandoned mineshafts, and 3.1% of woodland mansion chests, all in stacks of 1.

Golden apples (normal) can be found in 23.7% of desert temple chests, 22.2% of dungeon chests, 28.2% of chest minecarts in abandoned mineshafts, all igloo chests, 22.2% of woodland mansion chests, and 2.5% of stronghold altar chests, all in stacks of 1.

Golden chestplates can be found in 19.2% of nether fortress chests in groups of 1.

Golden swords can be found in 19.2% of nether fortress chests in groups of 1.

Gunpowder can be found in 59.0% of desert temple chests, 57.8% of dungeon chests, and 57.8% of woodland mansion chests, all in stacks of 1–8.

Iron boots can be found in 26.0% of village blacksmith chests and 12.2% of stronghold altar chests in groups of 1.

Iron chestplates can be found in 26.0% of village blacksmith chests and 12.2% of stronghold altar chests in groups of 1.

Iron helmets can be found in 26.0% of village blacksmith chests and 12.2% of stronghold altar chests in groups of 1.

Iron horse armor can be found in 19.2% of nether fortress chests, 18.2% of desert temple chests, 5.7% of village blacksmith chests, 5.4% of jungle temple chests, 22.2% of dungeon chests, 4.6% of End city chests, and 2.5% of stronghold altar chests, all in groups of 1.

Iron ingots can be found in 18.8% of dungeon chests and 18.8% of woodland mansion chests in stacks of 1–4; in 19.2% of nether fortress chests, 18.2% of desert temple chests, 46.1% of village blacksmith chests, 44.5% of jungle temple chests, 32.0% of chest minecarts in abandoned mineshafts, 23.4% of stronghold altar chests, and 35.6% of stronghold storeroom chests, all in stacks of 1–5; and in 39.4% of End city chests in stacks of 4–8.

Iron leggings can be found in 26.0% of village blacksmith chests and 12.2% of stronghold altar chests in groups of 1.

Iron pickaxes can be found in 26.0% of village blacksmith chests, 7.0% of chest minecarts in abandoned mineshafts, 12.2% of stronghold altar chests, and 4.0% of stronghold storeroom chests, all in groups of 1.

Iron swords can be found in 26.0% of village blacksmith chests and 12.2% of stronghold altar chests in groups of 1.

Lapis lazuli can be found in 17.0% of chest minecarts in abandoned mineshafts in stacks of 4–9.

Melon seeds can be found in 18.8% of dungeon chests, 32.0% of chest minecarts in abandoned mineshafts, and 18.8% of woodland mansion chests, all in stacks of 2–4.

Music disc (13) can be found in 22.2% of dungeon chests and 22.2% of woodland mansion chests in groups of 1.

Music disc (cat) can be found in 22.2% of dungeon chests and 22.2% of woodland mansion chests in groups of 1.

Name tags can be found in 29.0% of dungeon chests, 42.3% of chest minecarts in abandoned mineshafts, and 29.0% of woodland mansion chests, all in stacks of 1.

Nether wart can be found in 19.2% of nether fortress chests in stacks of 3–7.

Nothing can be found in 18.2% of desert temple chests and 7.0% of chest minecarts in abandoned mineshafts in stacks of 1.

Oak saplings can be found in 26.0% of village blacksmith chests in stacks of 3–7.

Oak, spruce, birch or jungle wood can be found in 68.4% of bonus chests in stacks of 1–3.

Obsidian can be found in 26.0% of village blacksmith chests in stacks of 3–7, and in 8.0% of nether fortress chests in stacks of 2–4.

Paper can be found in 94.6% of stronghold library chests in stacks of 2–7.

Potatoes can be found in 82.0% of village two-room house chests in stacks of 5–8.

Powered rails can be found in 27.1% of chest minecarts in abandoned mineshafts in stacks of 1–4.

Pumpkin seeds can be found in 18.8% of dungeon chests, 32.0% of chest minecarts in abandoned mineshafts, and 18.8% of woodland mansion chests, all in stacks of 2–4.

Rails can be found in 78.4% of chest minecarts in abandoned mineshafts in stacks of 4–8.

Raw salmon can be found in 61.5% of bonus chests in stacks of 1–2.

Redstone can be found in 27.4% of dungeon chests and 27.4% of woodland mansion chests in stacks of 1–4, and in 17.0% of chest minecarts in abandoned mineshafts, 12.2% of stronghold altar chests, and 19.0% of stronghold storeroom chests, all in stacks of 4–9.

Rotten flesh can be found in 57.9% of igloo chests in stacks of 1, in 29.0% of desert temple chests and 62.8% of jungle temple chests in stacks of 3–7, and in 59.0% of desert temple chests, 57.8% of dungeon chests, and 57.8% of woodland mansion chests, all in stacks of 1–8.

Saddles can be found in 35.7% of nether fortress chests, 23.7% of desert temple chests, 16.3% of village blacksmith chests, 15.5% of jungle temple chests, 29.0% of dungeon chests, 13.4% of End city chests, and 2.5% of stronghold altar chests, all in groups of 1.

Sand can be found in 59.0% of desert temple chests in stacks of 1–8.

Spider eyes can be found in 29.0% of desert temple chests in stacks of 1–3.

Sticks can be found in 68.4% of bonus chests in stacks of 1–12.

Stone axes can be found in 14.9% of igloo chests and 25.0% of bonus chests in groups of 1.

Stone pickaxes can be found in 25.0% of bonus chests in groups of 1.

String can be found in 59.0% of desert temple chests, 57.8% of dungeon chests, and 57.8% of woodland mansion chests, all in stacks of 1–8.

Torches can be found in 65.7% of chest minecarts in abandoned mineshafts in stacks of 1–16.

Wheat can be found in 35.3% of dungeon chests and 35.3% of woodland mansion chests in stacks of 1–4, in 57.9% of igloo chests in stacks of 2–3, and in 93.7% of village two-room house chests in stacks of 8–12.

Wheat seeds can be found in 55.3% of village two-room house chests in stacks of 2–4.

Wood planks can be found in 68.4% of bonus chests in stacks of 1–12.

Wooden axes can be found in 75.0% of bonus chests in groups of 1.

Wooden hoes can be found in 14.3% of village two-room house chests in groups of 1.

Wooden pickaxes can be found in 75.0% of bonus chests in groups of 1.

### Chest tests[kaynağı değiştir]

#### {{LootChest|dev=1}}[kaynağı değiştir]

#### {{LootChest|chance}}[kaynağı değiştir]

**Lua error in Modül:ItemSprite at line 7: attempt to call field 'getUrl' (a nil value).**

#### {{LootChest|chance|dev=1}}[kaynağı değiştir]

#### {{LootChest|stronghold-altar|stronghold-library|stronghold-storeroom|dev=1}}[kaynağı değiştir]

#### {{LootChest|altar|library|storeroom|stacksize|chance|dev=1}}[kaynağı değiştir]

#### {{LootChest|bonus|dev=1}}[kaynağı değiştir]

#### {{LootChest|desert|dev=1}}[kaynağı değiştir]

#### {{LootChest|jungle}}[kaynağı değiştir]

**Lua error in Modül:ItemSprite at line 7: attempt to call field 'getUrl' (a nil value).**

#### {{LootChest|dungeon|dev=1}}[kaynağı değiştir]

#### {{LootChest|end-city|dev=1}}[kaynağı değiştir]

#### {{LootChest|igloo|dev=1}}[kaynağı değiştir]

#### {{LootChest|mineshaft|dev=1}}[kaynağı değiştir]

#### {{LootChest|nether-fortress|dev=1}}[kaynağı değiştir]

#### {{LootChest|village|dev=1}}[kaynağı değiştir]

#### {{LootChest|village|chance|dev=1}}[kaynağı değiştir]

### Notes[kaynağı değiştir]