Loot tables are upcoming technical JSON tables that represent what items should be in a naturally generated chest, what items should drop when killing a mob, or what items can be fished.
Usage
The loot tables are structured as a String tag which determines the table to use, and a Long tag determining the seed. Chests or mobs with the same seed and table will drop the same items. Loot tables do not determine which slot of a chest is used; that is randomly determined based on the seed.
For Chests, Trapped Chests and Storage Minecarts:
-
- LootTable: Loot table to be used to fill the chest when it is next opened, or the items are otherwise interacted with. When the chest is part of a double chest, only the half corresponding to the tagged single-chest will be affected.
- LootTableSeed: Seed for generating the loot table. 0 or omitted will use a random seed.
These tags will be removed once the items have been interacted with (by opening the chest, breaking the chest, etc.), and only then will items be put in the chest.
For Mobs:
- The root tag.
- DeathLootTable: Loot table to be used for the items that drop when the entity is killed.
- DeathLootTableSeed: Seed for generating the loot table. 0 or omitted will use a random seed.
The loot tables of Mobs and Chests can be altered with /entitydata and /blockdata.
Tags
Loot tables are defined using the JSON format. Below are a list of tags used.
- The root tag
- pools: A list of all pools for this entity. Each pool used will generate items from its list of items based on the number of rolls. Pools are applied in order.
- A pool
- conditions: Determines conditions for this pool to be used. If multiple conditions are specified, all must pass.
- A condition
- condition: Name of condition. Valid conditions are described below.
- A condition
- rolls: Specifies the exact number of rolls on the pool.
- rolls: Specifies a random number of rolls within a range.
- min: Minimum number of rolls.
- max: Maximum number of rolls.
- entries: A list of all things that can be produced by this pool. One entry is chosen per roll as a weighted random selection from all entries without failing conditions.
- An entry
- conditions: Determines conditions for this entry to be used. If multiple conditions are specified, all must pass.
- A condition
- condition: Name of condition. Valid conditions are described below.
- A condition
- type: Type of entry. Can be
itemfor item entries,loot_tableto produce items from another loot table, oremptyfor an entry that generates nothing. - name:
- For type 'item', ID name of the item to be produced, e.g.
minecraft:diamond. The default, if not changed byfunctions, is a stack of 1 of the default instance of the item. - For type 'loot_table', loot table to be used, e.g.
minecraft:gameplay/fishing/junk.
- For type 'item', ID name of the item to be produced, e.g.
- functions: For type 'item', applies functions to the item stack being produced. Functions are applied in order, so for example
looting_enchantmust be afterset_countto work correctly. - weight: Determines how often this entry will be chosen out of all the entries in the pool. Entries with higher weights will be used more often (chance is this entry's weight⁄total of all considered entries' weights).
- luck: Unused, but set in the built-in fishing.json. Possibly intended to be
luck_multiplier. - luck_multiplier: Increases the entry's
weightbased on luck being applied to this application of the loot table, formula isfloor( weight + weight * luck_multiplier * luck ). Currently, luck is only set (to the level of the Luck of the Sea enchantment) when fishing, and is not passed throughloot_tableentries.
- conditions: Determines conditions for this entry to be used. If multiple conditions are specified, all must pass.
- An entry
- conditions: Determines conditions for this pool to be used. If multiple conditions are specified, all must pass.
- A pool
- pools: A list of all pools for this entity. Each pool used will generate items from its list of items based on the number of rolls. Pools are applied in order.
Functions
Loot tables use various functions to change the item stack being produced, such as adjusting the stack size or adding enchantments. Below are a list of valid functions, and the tags used by them. The tags are placed in the same function object as function:.
- enchant_with_levels - Enchants the item, with the specified enchantment level (roughly equivalent to using an enchantment table at that level).
- treasure: Determines whether treasure enchantments are allowed on this item.
- levels: Specifies the exact enchantment level to use.
- levels: Specifies a random enchantment level within a range.
- min: Minimum level to use.
- max: Maximum level to use.
- furnace_smelt - Smelts the item as it would be in a furnace. Used in combination with the
entity_propertiescondition to cook food for animals on death. - looting_enchant - Adjusts the stack size based on the level of the Looting enchantment on the
killerentity.- count: Specifies an exact number of additional items per level of looting.
- count: Specifies a random number (within a range) of additional items per level of looting. Note the random number generated may be fractional, and will be rounded after multiplying by the looting level.
- min: Minimum increase.
- max: Maximum increase.
- set_count - Sets the stack size.
- count: Specifies the exact stack size to set.
- count: Specifies a random stack size within a range.
- min: Minimum stack size.
- max: Maximum stack size.
- set_damage - Sets the item's damage value (durability) for tools.
- damage: Specifies the damage fraction to set (1.0 is undamaged, 0.0 is zero durability left).
- damage: Specifies a random damage fraction within a range.
- min: Minimum value.
- max: Maximum value.
- set_data - Sets the item data value of the item.
- data: Specifies the exact value to set.
- data: Specifies a random value within a range.
- min: Minimum value.
- max: Maximum value.
- set_nbt - Adds NBT data to an item.
- tag: Tag string to add, similar to those used by commands. Note that the first bracket is required and quotation marks need to be escaped using a backslash (
\).
- tag: Tag string to add, similar to those used by commands. Note that the first bracket is required and quotation marks need to be escaped using a backslash (
Conditions
Loot tables use various conditions which add requirements to a drop, pool, or function. Below are a list of valid conditions, and the tags used by them. The tags are placed in the same condition object as condition:.
- entity_properties - Test properties of an entity.
- entity: Specifies the entity to check for the condition. Set to
thisto use the entity that died,killerfor the killer, orkiller_playerfor a killer that is a player. - properties: Properties to be checked.
- on_fire: Test whether the entity is or is not on fire.
- entity: Specifies the entity to check for the condition. Set to
- entity_scores - Test the scoreboard scores of an entity.
- entity: Specifies the entity to check for the condition. Set to
thisto use the entity that died,killerfor the killer, orkiller_playerfor a killer that is a player. - scores: Scores to check. All specifies scores must pass for the condition to pass.
- A score: Key name is the objective while the value is the exact score value required for the condition to pass. Note that this is broken as of 15w43b.
- A score: Key name is the objective while the value specifies a range of score values required for the condition to pass. Note that only the minimum score works as of 15w43b.
- min: Minimum score.
- max: Maximum score.
- entity: Specifies the entity to check for the condition. Set to
- killed_by_player - Test if a
killer_playerentity is available.- inverse: If true, the condition passes if
killer_playeris not available.
- inverse: If true, the condition passes if
- random_chance - Test if a random number 0.0–1.0 is less than a specified value.
- chance: Success rate as a number 0.0–1.0.
- random_chance_with_looting - Test if a random number 0.0–1.0 is less than a specified value, affected by the level of Looting on the
killerentity.- chance: Base success rate.
- looting_multiplier: Looting adjustment to the base success rate. Formula is
chance + looting_level * looting_multiplier.
List of loot tables
Below is a list of all loot tables that exist by default. More tables can be added in the world save for use with custom maps.
- loot_tables
- chests - Items from loot chests
- abandoned_mineshaft - Minecarts with chests found in abandoned mine shafts
- desert_pyramid - Chests found in the treasure room inside Desert Temples
- end_city_treasure - Chests found in End Cities
- igloo_chest - The chest that appears in the basements in igloos
- jungle_temple - Chests found inside Jungle Temples
- nether_bridge - Chests found in Nether Fortresses
- simple_dungeon - Dungeon chests
- spawn_bonus_chest - Bonus chests that appear in a new world when bonus chests are enabled
- stronghold_corridor - Chests found on slab altars in corridors in strongholds
- stronghold_crossing - The chest in the upper level of store rooms in strongholds
- stronghold_library - Chests found in a library in strongholds
- village_blacksmith - The chest found in the Blacksmith's house in a Village
- entities - Items dropped from entities. May cause issues when applied to chests, due to some items spawning in stacks of 0
- sheep - Sheep with wool, also inherited by colored sheep
- black
- blue
- brown
- cyan
- gray
- green
- light_blue
- lime
- magenta
- orange
- pink
- purple
- red
- silver
- white
- yellow
- bat
- blaze
- cave_spider
- chicken
- cow
- creeper
- elder_guardian
- enderman
- endermite
- ghast
- giant
- guardian
- horse
- iron_golem
- magma_cube
- mushroom_cow
- ocelot
- pig
- rabbit
- sheep - Sheep without wool
- shulker
- silverfish
- skeleton
- skeleton_horse
- slime
- snowman - Snow golems
- spider
- squid
- witch
- wolf
- zombie
- zombie_horse
- zombie_pigman
- sheep - Sheep with wool, also inherited by colored sheep
- gameplay
- fishing
- fish
- junk
- treasure
- fishing - Loads the three tables from the fishing folder, applying luck to each one
- fishing
- empty - Contains no items
- chests - Items from loot chests
Custom Maps
Custom maps can use loot tables to change what loot will spawn in chests or drop by mobs. They can either change existing loot tables or create new ones. This is the file structure:
- <world save folder>
- data
- loot_tables
- minecraft
- loot_tables
- data
The JSON files go in this folder. For example, the file for zombies would go in data/loot_tables/minecraft/entities/zombie.json. This will make every zombie in that world use your loot table rather than the default zombie loot table. To use custom loot tables, add the file to the "minecraft" directory. Then, summon the mob with the data tag DeathLootTable set to the name of the file (without the .json extension).
History
| u | |||||
|---|---|---|---|---|---|
1.9{{Extension DPL}}<ul><li>[[Rabbit's Foot|Rabbit's Foot]]<br/>{{Item
| image = Rabbit's Foot.png
|type=
| renewable = Yes
| stackable = Yes (64)
}}
A '''rabbit's foot''' is a [[brewing]] item obtained from [[rabbit]]s.
== Obtaining ==
=== Mob loot ===
Each [[rabbit]] has a 10% chance to drop a rabbit's foot when killed by the [[player]]. This chance can be increased by 3% per level using a sword enchanted with [[Looting]].
A [[fox]] sometimes spawns with a rabbit's foot in its mouth, which always drops upon death. Alternatively, the player can drop a [[food]] item, which causes the fox to drop the rabbit's foot.
=== Cat gifts ===
{{main|Cat#Gifts}}
A tamed [[cat]] has a 70% chance of giving the player a gift when the player wakes up from a [[bed]], and the gift has a 16.13% chance to be a rabbit's foot.
== Usage ==
=== Brewing ingredient ===
{{Brewing
|head=1
|Rabbit's Foot
|Mundane Potion
|base=Water Bottle
}}
{{brewing
|foot=1
|showname=1
|Rabbit's Foot
|Potion of Leaping
}}
=== Trading ===
Journeyman-level cleric [[villager]]s buy rabbit's feet for an [[emerald]] as part of their trade: {{in|java}} they buy 2, and {{in|bedrock}} they buy 4.
== Video ==
<div style="text-align:center">{{yt|Ba3QN3uCniU}}</div>
== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Rabbit's Foot
|spritetype=item
|nameid=rabbit_foot
|form=item
|foot=1}}
{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Rabbit's Foot
|spritetype=item
|nameid=rabbit_foot
|id=528
|form=item
|foot=1}}
== History ==
{{History|java}}
{{History||1.8|snap=June 30, 2014|slink=https://twitter.com/TheMogMiner/status/483636993780232192|[[Ryan Holtz]] tweeted images of a rabbit's foot with some other new [[item]]s.}}
{{History|||snap=14w27a|[[File:Rabbit's Foot JE1.png|32px]] Added rabbit's foot.
|Added the [[potion of Leaping]]; it is [[brewing|brewed]] by adding a rabbit's foot to an [[awkward potion]]. The rabbit's foot also creates the [[mundane potion]] when brewed into a [[water bottle]].}}
{{History|||snap=14w33b|[[File:Rabbit's Foot JE2 BE1.png|32px]] The texture of the rabbit's foot has been changed. The new texture was created by [[wikipedia:Reddit|Reddit]] user [http://www.reddit.com/u/zeldahuman zeldahuman].<ref>{{reddit|2bjzes/a_reminder_of_the_blocks_and_items_added_in_18_so|cj69zie|context=3}}</ref><ref>{{reddit|2c5f35/minecraft_snapshot_14w31a_has_been_released|cjct7gb}}</ref>}}
{{History||1.8.1|snap=pre1|Potions of Leaping, which use rabbit's foot, can now be extended using [[redstone]].}}
{{History||1.9|snap=15w46a|The drop rate of rabbit's foot has been quadrupled.{{more info|Before/After rates}}}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 414.}}
{{History||1.14|snap=18w43a|[[File:Rabbit's Foot JE3 BE2.png|32px]] The texture of rabbit's foot has been changed.}}
{{History|||snap=18w44a|[[Cat]]s now offer rabbit's feet as [[Cat#Gifts|gifts]].}}
{{History|||snap=19w07a|Added [[fox]]es, which sometimes spawn with rabbit's feet in their mouths.}}
{{History|||snap=19w11a|Cleric [[villager]]s now [[trading|buy]] rabbit's feet.}}
{{History|pocket alpha}}
{{History||v0.12.1|snap=build 1|[[File:Rabbit's Foot JE2 BE1.png|32px]] Added rabbit's foot to the [[Creative]] mode [[inventory]].}}
{{History||v0.13.0|snap=build 1|Rabbit's foot can now be obtained as a rare [[drops|drop]] upon killing [[rabbit]]s.
|Rabbit's foot can now be [[brewing|brewed]] to make [[potions of Leaping]].}}
{{History|bedrock}}
{{History||1.8.0|snap=beta 1.8.0.8|Tamed [[cat]]s can now give the [[player]] rabbit's foot as a gift.}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Rabbit's Foot JE3 BE2.png|32px]] The texture of rabbit's foot has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.4|Rabbit's foot can now be [[trading|sold]] to cleric [[villager]]s.}}
{{History||1.13.0|snap=beta 1.13.0.1|Added [[fox]]es, which can [[drops|drop]] rabbit's foot.}}
{{History|console}}
{{History||xbox=TU31|xbone=CU19|ps=1.22|wiiu=Patch 3|switch=1.0.1|[[File:Rabbit's Foot JE2 BE1.png|32px]] Added rabbit's foot.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Rabbit's Foot JE3 BE2.png|32px]] The texture of rabbit's foot has been changed.}}
{{History|New 3DS}}
{{History||0.1.0|[[File:Rabbit's Foot JE2 BE1.png|32px]] Added rabbit's foot.}}
{{History|foot}}
== Issues ==
{{issue list}}
== Trivia ==
* The superstition that [[wikipedia:Rabbit's_foot|a rabbit's foot is a lucky charm]] applies equally to Minecraft as it does in the real world: it does not actually increase luck.
== Gallery ==
<gallery>
Rabbit Items 4 Ryan Holtz.png|First image of the item by [[Ryan Holtz]].
Rabbit Items 5 Ryan Holtz.png|Ryan Holtz brewing the item into a potion.
Rabbit Items 6 Ryan Holtz.png|Ryan Holtz enhancing the potion.
</gallery>
== References ==
{{reflist}}
== External Links ==
*[https://www.minecraft.net/en-us/article/taking-inventory--rabbit-s-foot Taking Inventory: Rabbit's Foot] – Minecraft.net on May 3, 2019
{{items}}
[[de:Hasenpfote]]
[[es:Pata de conejo]]
[[fr:Patte de lapin]]
[[it:Zampa di coniglio]]
[[ja:ウサギの足]]
[[ko:토끼발]]
[[nl:Konijnenpootje]]
[[pl:Królicza łapka]]
[[pt:Pé de coelho]]
[[ru:Кроличья лапка]]
[[uk:Кроляча лапка]]
[[zh:兔子脚]]
[[Category:Renewable resources]]
[[Category:Brewing recipe]]</li><li>[[:Category:Minecraft Legends resources|Category:Minecraft Legends resources]]<br/>[[Category:Minecraft Legends]]
[[Category:Items]]
[[pt:Categoria:Recursos do Minecraft Legends]]</li></ul> | October 19, 2015 | Dinnerbone announces loot tables. | |||
| 15w43a | Added loot tables. | ||||
| 15w43b | Added condition entity_scores. | ||||
| 15w43c | Renamed "villager_golem.json" to "iron_golem.json" | ||||
| Added fishing loot tables, sheep without wool, and zombie and skeleton horses. | |||||
| Renamed the tag item: to name:, and the tag items: to entries: | |||||
| Added the tag type: and support to load a loot table instead of an item. | |||||
| Added the tag luck: to default files, though it currently does nothing in the code. | |||||
| Added the function set_damage | |||||
| Help | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Menu screens |
| ||||||||||||||||||
| Game customization | |||||||||||||||||||
| Editions |
| ||||||||||||||||||
| Miscellaneous | |||||||||||||||||||