Minecraft Wiki
Advertisement
Crafting Table
This article describes content that may be included in a future update. 
This content has appeared in development versions, but the full update containing it has not been released yet.

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, Storage Minecarts and Minecarts with Hoppers:

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

Custom maps can use loot tables to change what loot will spawn in chests or drop by mobs. They can either modify existing loot tables or create new ones. This is the file structure:

  • <world save folder>
    • data
      • loot_tables

Each folder under "loot_tables" is a namespace. The default files are under the namespace "minecraft", but custom maps and mods each have their own namespaces. For example, if you were to create a custom map called "Awesome Parkour Map," your namespace might be "awesome_parkour_map" (they can't contain spaces). It would contain any loot tables the map uses.

To override the default loot tables, you would place them in the "minecraft" namespace. They are organized by entities, chests, and fishing, as shown in the section List of loot tables. To use a custom namespace, set the loot table tag to "namespace:table_name", where "namespace" is the name of your namespace and "table_name" is the filename of your table, without the .json extension.

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.
        •  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.
        •  bonus_rolls: Specifies the exact number of bonus rolls on the pool per point of luck. Rounded down after multiplying.
        •  bonus_rolls: Specifies a random number of bonus rolls within a range. Rounded down after multiplying.
          •  min: Minimum number of bonus rolls.
          •  max: Maximum number of bonus 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.
            •  type: Type of entry. Can be item for item entries, loot_table to produce items from another loot table, or empty for 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 by functions, 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.
            •  functions: For type 'item', applies functions to the item stack being produced. Functions are applied in order, so for example looting_enchant must be after set_count to work correctly.
              •  A function:
                •  function: Name of the function to apply. Valid functions are described below.
                •  conditions: Determines conditions for this function to be applied. If multiple conditions are specified, all must pass.
                  •  A condition
                    •  condition: Name of condition. Valid conditions are described below.
            •  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 weighttotal of all considered entries' weights).
            •  quality: Modifies the entry's weight based on the killing/opening/fishing player's luck attribute. Formula is floor( weight + quality * generic.luck).

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_randomly - Enchants the item with one randomly-selected enchantment. The level of the enchantment, if applicable, will be random.
    •  enchantments: List of enchantment names to choose from. If omitted, all enchantments applicable to the item will be possible.
  • 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_properties condition to cook food from animals on death.
  • looting_enchant - Adjusts the stack size based on the level of the Looting enchantment on the killer entity.
    •  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_attributes - Add attribute modifiers to the item.
    •  modifiers
      •  A modifier
        •  name: Name of the modifier.
        •  attribute: The name of the attribute this modifier is to act upon.
        •  operation: Must be either "addition", "multiply_base" or "multiply_total".
        •  amount: Specifies the exact amount of change of the modifier.
        •  amount: Specifies a random amount within a range.
          •  min: Minimum amount.
          •  max: Maximum amout.
        •  id: Optional : UUID of the modifier following. If non specified, a new UUID will be generated.
        •  slot: Slots the item must be in for the modifier to take effect, this value can be one of the following : "mainhand", "offhand", "feet", "legs", "torso", or "head".
        •  slot: One of the listed slots will be chosen randomly.
  • 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 (\).

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 this to use the entity that died, killer for the killer, or killer_player for a killer that is a player.
    •  properties: Properties to be checked.
      •  on_fire: Test whether the entity is or is not on fire.
  • entity_scores - Test the scoreboard scores of an entity.
    •  entity: Specifies the entity to check for the condition. Set to this to use the entity that died, killer for the killer, or killer_player for 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.
      •  A score: Key name is the objective while the value specifies a range of score values required for the condition to pass.
        •  min: Minimum score.
        •  max: Maximum score.
  • killed_by_player - Test if a killer_player entity is available.
    •  inverse: If true, the condition passes if killer_player is not available.
  • 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 killer entity.
    •  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
    • 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
    • gameplay
      • fishing
        • fish
        • junk
        • treasure
      • fishing - Loads the three tables from the fishing folder, applying luck to each one
    • empty - Contains no items

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
        • customdirectory

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 add custom loot tables, create a new file in a new directory. Then, summon the mob with the data tag DeathLootTable set to the name of the directory and file (without the .json extension), such as DeathLootTable:"customdirectory:path/to/table".

History

u
1.9
{{Extension DPL}}<ul><li>[[Melon Slice|Melon Slice]]<br/>{{Dungeons hatnote|type=consumable|Melon}}
{{Item
| title = Melon Slice
|typeimage=Melon Slice.png
| renewable = Yes
| heals = {{hunger|2}}
| stackable = Yes (64)
}}
A '''melon slice'''{{efn|Known as '''Melon Slice''' {{in|java}} and '''Melon''' {{in|bedrock}}.}} is a [[food]] item that can be eaten by the [[player]].

== Obtaining ==

=== Block loot ===

{{see also|Tutorials/Pumpkin and melon farming|title1 = Pumpkin and melon farming}}

Melon slices can be obtained by breaking (harvesting) [[melon]]s using any [[tool]] or by hand. [[Axe]]s, followed by [[sword]]s, are the fastest tools for harvesting melons.  A melon drops 3–7 melon slices, when broken; by hand, using a [[tool]], or after being broken by the movement of a [[piston]], with an average of 4.64 slices per melon.

Breaking a melon with a tool enchanted with [[Fortune]] increases the potential number of drops by 1 slice per level, up to a maximum of 9 slices.

== Usage ==

=== Food ===
{{see also|Tutorials/Hunger management|title1=Hunger management}}

To eat a melon slice, press and hold {{control|use}} while it is selected in the hotbar. Eating one restores {{hunger|2}} [[hunger]] and 1.2 hunger 
[[Hunger#Mechanics|saturation]].

=== Crafting ingredient ===

{{crafting usage}}

=== Composting ===
Placing a melon slice into a [[composter]] has a 50% chance of raising the compost level by 1.

==Sounds==
{{Sound table/Entity/Food}}

== Data values ==

=== ID ===

{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Melon Slice
|spritetype=item
|nameid=melon_slice
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|showaliasids=y
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|spritename=melon-slice
|displayname=Melon
|spritetype=item
|nameid=melon_slice
|aliasid=melon
|id=272
|form=item
|translationkey=item.melon.name
|foot=1}}

== Advancements ==
{{load advancements|Husbandry;A Balanced Diet}}

== History ==
{{History|java beta}}
{{History||1.8|snap=Pre-release|[[File:Melon Slice JE1 BE1.png|32px]] Added melons.}}
{{History|java}}
{{History||1.0.0|snap=Beta 1.9 Prerelease 4|Melons are now used in the [[crafting]] recipe of [[glistering melon]]s.}}
{{History|||snap=Beta 1.9 Prerelease 5|Melons once again drop the correct number of slices.}}
{{History||1.3.1|snap=12w21a|Melons can now be [[trading|bought]] from farmer [[villager]]s, at 5–8 melon slices for 1 [[emerald]].}}
{{History||1.7.2|snap=13w37a|Block ID 105, [[melon stem]], has been removed from the {{cmd|give}} [[commands|command]].}}
{{History||1.8|snap=14w02a|[[Villager]]s no longer [[trading|sell]] melons. They now buy [[melon]]s instead.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 360.}}
{{History|||snap=18w20b|"Melon" has been renamed to "Melon Slice."
|The ID of melon slices has been changed from <code>melon</code> to <code>melon_slice</code>.}}
{{History||1.14|snap=18w43a|[[File:Melon Slice JE2 BE2.png|32px]] The texture of melon slices has been changed.}}
{{History|||snap=19w03a|Placing a melon slice into the new [[composter]] has a 20% chance of raising the compost level by 1.}}
{{History|||snap=19w05a|Melon slices now have a 50% chance of increasing the compost level in a composter by 1.}}

{{History|pocket alpha}}
{{History||v0.5.0|[[File:Melon Slice JE1 BE1.png|32px]] Added melons. 
|Melons restore {{health|2}} each, rather than {{hunger|2}}.}}
{{History||v0.12.1|snap=?|Added Melon slice to the Creative inventory.}}
{{History|||snap=build 1|Melons now restores [[hunger]] instead of [[health]].
|Melons can no longer be obtained from [[nether reactor]]s.}}
{{History|pocket}}
{{History||1.1.0|snap=alpha 1.1.0.3|[[Breaking]] a [[melon]] with [[shears]] now always yields 9 melons.}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Melon Slice JE2 BE2.png|32px]] The texture of melons has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.1|Melons can now be used to fill up [[composter]]s.}}
{{History|||snap=beta 1.11.0.4|Melons can now be [[trading|sold]] to farmer [[villager]]s.}}
{{History||1.16.0|snap=beta 1.16.0.57|[[Trading]] has been changed, melon slices can no longer be sold to farmer villagers.}}
{{History||1.16.100|snap=beta 1.16.100.56|The ID of melon slices has been changed from <code>melon</code> to <code>melon_slice</code>.}}

{{History|console}}
{{History||xbox=TU5|xbone=CU1|ps=1.0|wiiu=Patch 1|[[File:Melon Slice JE1 BE1.png|32px]] Added melons.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Melon Slice JE2 BE2.png|32px]] The texture of melons has been changed.}}

{{History|new 3ds}}
{{History||0.1.0|[[File:Melon Slice JE1 BE1.png|32px]] Added melons.}}
{{History|foot}}

== Issues ==
{{issue list}}

== See also ==
* [[Pumpkin]]
* [[Glistering Melon Slice]]

== Notes ==
{{fnlist}}

{{Items}}

[[Category:Plants]]

[[cs:Meloun]]
[[de:Melone]]
[[es:Rodaja de sandía]]
[[fr:Tranche de pastèque]]
[[hu:Dinnye Szelet]]
[[ko:수박]]
[[nl:Meloenschijf]]
[[pl:Arbuz]]
[[pt:Fatia de melancia]]
[[ru:Ломтик арбуза]]
[[zh:西瓜片]]
[[Category:Food]]
[[Category:Renewable resources]]</li><li>[[Steak|Steak]]<br/>{{Item
| title = Steak
| image = Steak.png
| renewable = Yes
| heals = {{hunger|8}}
| stackable = Yes (64)
}}

'''Steak''' ({{in|java}}) or '''cooked beef''' ({{in|bedrock}}) is a [[food]] [[item]] obtained from [[cow]]s, [[mooshroom]]s, or from cooking [[raw beef]].

== Obtaining ==

=== Mob loot ===

==== Cows ====

When a [[cow]] or [[mooshroom]] is killed, it drops [[raw beef]]. If a cow dies while on fire, it drops steak instead. If the cow is killed using a weapon with the [[Looting]] enchantment, the maximum number of steak drops increases by 1 per level.

=== Cooking ===

Raw beef can be cooked in a [[furnace]], [[smoker]], or [[campfire]]. Each steak removed from a furnace output slot gives 0.35 [[experience]] (22.4 experience per stack).
{{Smelting
|Raw Beef
|Steak
|0,35
}}

=== Villager gifts ===
{{IN|java}}, butcher [[Villager|villagers]] may give players steak if they have the [[Hero of the Village]] status effect.

== Usage ==

=== Food ===

To eat steak, press and hold {{control|use}} while it is selected in the hotbar. Eating one restores {{hunger|8}} [[hunger]] and 12.8 hunger 
[[saturation]]. 

=== Wolves ===

Steak can be used to [[breed]] and heal tamed [[wolves]], lead them around, and make baby tamed wolves grow up faster by 10% of the remaining time.

==Sounds==
{{Sound table/Entity/Food}}

== Data values ==

=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Steak
|spritetype=item
|nameid=cooked_beef
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Cooked Beef
|spritetype=item
|nameid=cooked_beef
|id=274
|form=item
|foot=1}}

== Advancements ==
{{load advancements|Husbandry;A Balanced Diet}}

== History ==

{{History|java beta}}
{{History||1.8|snap=Pre-release|[[File:Steak JE1 BE1.png|32px]] Added steak.
|Steak has been introduced as the cooked result of [[raw beef]].
|Steak is a new [[food]] [[item]] dropped by [[cow]]s in addition to their [[leather]]. 
|The icon for steak is used as the image for the [[cooked porkchop]] before [[Java Edition Beta 1.8|Beta 1.8]], as the cooked porkchop's icon was updated to a lighter colored piece of meat.}}
{{History|java}}
{{History||1.2.1|snap=12w03a|Steak can now be used to [[breed]] [[wolves]].}}
{{History||1.3.1|snap=12w21a|Steak can now be [[trading|bought]] from butcher [[villager]]s, at 6–7 steak for 1 [[emerald]].}}
{{History|||snap=1.3|[[File:Steak JE2.png|32px]] The texture of steak has been changed.}}
{{History||1.4.2|snap=12w37a|[[File:Steak JE3 BE2.png|32px]] The texture of steak has been changed, so that it no longer has a dark outline.}}
{{History||1.8|snap=14w02a|[[Villager]]s no longer [[trade]] steak.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 364.}}
{{History||1.14|snap=18w43a|[[File:Steak JE4 BE3.png|32px]] The texture of steak has been changed.}}
{{History|||snap=19w13a|Butcher villagers now give steak to players under the [[Hero of the Village]] effect.}}

{{History|pocket alpha}}
{{History||v0.4.0|[[File:Steak JE1 BE1.png|32px]] Added steak.}}
{{History||v0.5.0|Steak now restores {{hp|8}} instead of {{hp|4}}.}}
{{History||v0.8.0|snap=build 1|[[File:Steak JE3 BE2.png|32px]] The texture of steak has been changed, so that it no longer has a dark outline.}}
{{History||v0.12.1|snap=build 1|Steak now restores [[hunger]] instead of [[health]].}}
{{History||v0.16.0|snap=build 4|"Steak" has been renamed to "Cooked Beef."}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Steak JE4 BE3.png|32px]] The texture of cooked beef has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.4|Cooked beef can now be [[trading|bought]] from butcher [[villager]]s.}}

{{History|console}}
{{History||xbox=TU5|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Steak JE1 BE1.png|32px]] Added steak.}}
{{History||xbox=TU12|[[File:Steak JE3 BE2.png|32px]] The steak's texture has been changed, so that it no longer has a dark outline.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Steak JE4 BE3.png|32px]] The texture of steak has been changed.}}

{{History|new3DS}}
{{History||0.1.0|[[File:Steak JE3 BE2.png|32px]] Added steak.}}
{{History|foot}}

== Issues ==
{{issue list}}

== Gallery ==
<gallery>
Jeb steak.png|Raw beef and steak shown in the [[inventory]] from a preview screenshot.
Eating Steak.png|A still frame of the player eating a steak.
Steak SDGP.png|Steak in the [[Super Duper Graphics Pack]].
</gallery>

== Notes ==
{{fnlist}}

{{Items}}

[[cs:Propečený steak]]
[[de:Steak]]
[[es:Filete asado]]
[[fr:Steak]]
[[hu:Steak]]
[[it:Bistecca]]
[[ja:ステーキ]]
[[ko:스테이크]]
[[nl:Biefstuk]]
[[pl:Befsztyk]]
[[pt:Filé]]
[[ru:Жареная говядина]]
[[tr:Biftek]]
[[uk:Стейк]]
[[zh:牛排]]
[[Category:Food]]
[[Category:Renewable resources]]</li></ul>
October 19, 2015Dinnerbone announces loot tables.
15w43aAdded loot tables.
15w43bAdded condition entity_scores.
15w43cRenamed "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
15w44aAdded the function enchant_randomly and set_attributes.
15w44bAdded the  quality tag.
Removed  luck and  luck_multiplier tags.
Added the  bonus_rolls tag.
Advertisement