Loot tables are technical JSON tables that represent what items should be in a naturally generated chest or what items should drop when killing a mob.
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 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:
- The root tag
- LootTable: Loot table to be used to fill the chest when it is next opened. 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 chest is opened and only then items will be put in the chest.
For entities:
- 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 entities 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 will randomly choose something from its list of items based on the number of rolls
- A pool
- conditions: Determines conditions for this pool to be used.
- A condition
- condition: Name of condition. Valid conditions are described below.
- A condition
- rolls: Determines the exact number of attempted rolls within the pool, as opposed to a range.
- rolls: Determines the minimum and maximum time an item pool can be used.
- min: Minimum number of times a pool will be used
- max: Maximum number of times a pool will be used
- items: A list of all items in this pool
- An item
- conditions: Determines conditions for this item to be used.
- A condition
- condition: Name of condition. Valid conditions are described below.
- A condition
- item: ID name of the item. For example,
minecraft:diamond - functions: Determines special actions to add to an item. If any function is unset, it will not be used.
- A function:
- function: Name of function to use. Valid functions are described below.
- conditions: Determines conditions for this function to take place.
- A condition
- condition: Name of condition. Valid conditions are described below.
- A condition
- A function:
- weight: Determines how often this item will be chosen. Items with higher weights will be used more often
- conditions: Determines conditions for this item to be used.
- An item
- conditions: Determines conditions for this pool to be used.
- A pool
- pools: A list of all pools for this entity. Each pool will randomly choose something from its list of items based on the number of rolls
Functions
Loot tables use various functions which add special data to an item, such as stack size or 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 - Determines the level of enchantment to apply to this item.
- treasure: Determines whether treasure enchantments are allowed on this item.
- levels: Determines exact enchantment level to use, as opposed to a range.
- levels: Determines the minimum and maximum enchantment to apply, which is mostly equivalent to using an enchantment table with this level.
- min: Minimum level to use.
- max: Maximum level to use.
- furnace_smelt - Smelts the item as it would be in a furnace. Used to cook food for animals on death.
- looting_enchant - Determines the effects of Looting on this item. If unused, Looting will have no effect.
- count: Determines exact number of additional items from looting, as opposed to a range.
- count: Determines the minimum and maximum increase for this item per level of Looting.
- min: Minimum increase.
- max: Maximum increase.
- set_count - Determines the minimum and maximum stack size. If unused, a stack size of 1 will be used.
- count: Determines exact number of items provided, as opposed to a range.
- count: Determines the minimum and maximum stack size for this item.
- min: Minimum stack size.
- max: Maximum stack size.
- set_data - Determines the damage value of the item.
- data: Exact damage value of the item, as opposed to a range.
- data: Determines the minimum and maximum damage value for this item.
- min: Minimum damage.
- max: Maximum damage.
- set_nbt - Adds NBT data to an item
- tag: Tag 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 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 - Determines required properties for this to be used
- entity: Determines 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 that must match for the condition.
- on_fire: The entity must be on fire
- entity: Determines the entity to check for the condition. Set to
- entity_scores - Checks for the scores of an entity for the drop to happen
- entity: Determines 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
- entity: Determines the entity to check for the condition. Set to
- killed_by_player - Requires the entity to be killed by the player
- inverse: Reverse the condition to only allow item drop if not killed by a player.
- random_chance - Changes the chance of the pool.
- chance: Determines the base chance for this item to drop.
- random_chance_with_looting - Changes the chance of the pool based on Looting
- chance: Determines the base chance for this item to drop
- looting_multiplier: Determines the amount to increase the chance per level of Looting.
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
- 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
- magma_cube
- mushroom_cow
- ocelot
- pig
- rabbit
- shulker
- silverfish
- skeleton
- slime
- snowman - snow golems
- spider
- squid
- villager_golem - iron golems
- wolf
- zombie
- zombie_pigman
- sheep
- empty - contains no items
- chests - Items from loot chests
History
| u | |||||
|---|---|---|---|---|---|
1.9{{Extension DPL}}<ul><li>[[Ink Sac|Ink Sac]]<br/>{{For|the variant dropped by Glow squids|Glow Ink Sac}}
{{Item
| image = Ink Sac.png
| renewable = Yes
| stackable = Yes (64)
}}
An '''ink sac''' is an [[item]] dropped by a [[squid]] upon death used to create [[black dye]], [[dark prismarine]]{{only|BE|short=1}}, and [[Book and Quill|books and quills]].
== Obtaining ==
=== Mob loot ===
==== Squid ====
{{see also|Tutorials/Squid farming|title1=Squid farming}}
A [[squid]] drops one to three ink sacs upon death. The maximum amount is increased by 1 per level of [[Looting]], for a maximum of 1 to 6 with Looting III.
=== Fishing ===
Ink sacs can be obtained as a "junk" item from [[fishing]]. The [[Luck of the Sea]] [[enchantment]] decreases the chance.
=== Trading ===
[[Wandering trader]]s sometimes sell 3 ink sacs for an [[emerald]] {{in|bedrock}}. Apprentice level [[Trading#Librarian|librarians]] also buy 5 ink sacs for one [[emerald]].
=== Natural generation ===
{{LootChestItem|ink-sac}}
== Usage ==
=== Crafting ingredient ===
{{crafting usage}}
{{IN|bedrock}}, ink sacs can be also used in banner patterns:
{{banner crafting usage}}
=== Loom ingredient ===
{{Banner loom usage|Ink Sac}}
=== Dye ===
{{Dye usage}}
* Each type of [[Prismarine#Dark Prismarine|dark prismarine]] can be crafted using varying amounts of 8 [[Prismarine Shard#prismarine shards|prismarine shards]].
=== Trading ===
Journeyman-level librarian [[villager]]s have a {{frac|2|3}} chance to buy five ink sacs for an [[emerald]]. They always offer the trade {{in|bedrock|lc=}}.
=== Signs ===
Ink sacs can be applied to [[sign]]s or [[hanging sign]]s to revert glowing text back to default.
== Sounds ==
{{edition|java}}:
{{Sound table
|sound=Ink sac1.ogg
|sound2=Ink sac2.ogg
|sound3=Ink sac3.ogg
|subtitle=Ink Sac splotches
|source=block
|description=When an ink sac is used on a sign
|id=item.ink_sac.use
|translationkey=subtitles.item.ink_sac.use
|volume=1.0
|pitch=''varies'' <ref group=sound>Each sound can be 0.85, 0.88, or 0.9</ref>
|distance=16
|foot=1}}
{{edition|bedrock}}:
{{Sound table
|type=bedrock
|sound=Ink sac1.ogg
|sound2=Ink sac2.ogg
|sound3=Ink sac3.ogg
|source=sound
|description=When an ink sac is used on a sign
|id=sign.ink_sac.use
|volume=1.0
|pitch=1.0
|foot=1}}
== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Ink Sac
|spritetype=item
|nameid=ink_sac
|form=item
|foot=1}}
{{edition|bedrock}}:
{{ID table
|edition=bedrock
|showaliasids=y
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Ink Sac
|spritetype=item
|nameid=ink_sac
|aliasid=dye / 0
|id=413
|form=item
|translationkey=item.dye.black.name
|foot=1}}
== Video ==
{{video note|Ink sacs can no longer be used as a dye in Java Edition.}}
<div style="text-align:center">{{yt|ABYCZfawO60}}</div>
== History ==
{{History|java beta}}
{{History||1.2|[[File:Ink Sac JE1 BE1.png|32px]] Added ink sacks, together with all other dyes.}}
{{History||1.2_02|"Ink Sack" has been renamed to "Ink Sac".}}
{{History|java}}
{{History||1.3.1|snap=12w17a|Ink sacs are now used to craft [[book and quill]]s.}}
{{History||1.4.2|snap=12w34a|Added the ability to [[Armor#Dyeing|dye]] leather [[armor]] and [[wolf]] collars.}}
{{History||1.4.6|snap=12w49a|Ink sacs can now be crafted with [[gunpowder]] to create a [[firework star]].}}
{{History||1.6.1|snap=13w19a|[[Stained clay]] can now be [[crafting|crafted]].}}
{{History||1.7.2|snap=13w41a|[[Stained glass]] can now be crafted.}}
{{History||1.8|snap=14w25a|Ink sacs are now used to craft [[dark prismarine]].}}
{{History|||snap=14w30a|Added [[banner]]s, which can be [[dye]]d with ink sacs.}}
{{History||1.11|snap=16w39a|Ink sacs can now be used to dye [[shulker box]]es.}}
{{History||1.12|snap=17w06a|Ink sacs are now used to craft black [[concrete powder]].}}
{{History|||snap=17w15a|Ink sacs can now be used to dye [[bed]]s.}}
{{History||1.13|snap=17w47a|The different data values for the <code>dye</code> ID have been split up into their own IDs.
|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 351.}}
{{History||1.14|snap=18w43a|Ink sacs can now be used to craft [[black dye]].
|Ink sacs can no longer be used as a [[dye]].
|All of the dye-related functions and crafting recipes of ink sac (except books and quills and dark prismarine) have been transferred to black dye.
|[[File:Ink Sac JE2 BE2.png|32px]] The texture of ink sacs has been changed.}}
{{History|||snap=19w11a|Librarian [[villager]]s now [[trading|buy]] ink sacs.}}
{{History||1.15|snap=Pre-release 1|Ink sacs are no longer used to craft [[dark prismarine]].}}
{{History||1.17|snap=21w03a|Ink sacs can now be used to remove the text's glowing effect of a [[sign]].}}
{{History||1.20<br>(Experimental)|link=1.19.3|snap=22w42a|Ink sacs can now be used to remove the text's glowing effect of a [[hanging sign]].}}
{{History|pocket alpha}}
{{History||v0.3.0|[[File:Ink Sac JE1 BE1.png|32px]] Added ink sacs. They are currently unobtainable and serve no purpose.}}
{{History||v0.8.0|snap=build 1|Ink sacs can now be used to craft [[cocoa beans]].}}
{{History|||snap=build 3|Ink sacs are now available in [[creative]].}}
{{History||v0.9.0|snap=build 1|Ink sacs now generate in [[village]] and [[stronghold]] [[chest]]s.}}
{{History||v0.11.0|snap=build 1|Ink sacs can now be obtained from [[squid]].
|Ink sacs can now be obtained as a junk [[item]] from [[fishing]].}}
{{History||v0.14.0|snap=build 1|Ink sacs now can now be used to dye water in [[cauldron]]s.}}
{{History||v0.16.0|snap=build 1|Ink sacs are no longer used to craft [[cocoa beans]].
|Ink sacs can now be used to craft [[dark prismarine]].}}
{{History|pocket}}
{{History||1.0.0|snap=alpha 0.17.0.1|Ink sacs can now be used to dye [[shulker]]s.}}
{{History||1.1.0|snap=alpha 1.1.0.0|Ink sacs are now used to re-dye [[bed]]s.
|Ink sacs can now be used to dye [[shulker box]]es.}}
{{History|bedrock}}
{{History||1.2.0|snap=beta 1.2.0.2|Ink sacs can now be used to craft [[book and quill]]s.
|Added [[banner]]s, which can be [[dye]]d with ink sacs.
|Ink sacs can now be crafted with [[gunpowder]] to create [[firework star]]s.
|Ink sacs can now be used to craft black [[concrete powder]].
|[[Stained glass]] can now be [[crafting|crafted]].}}
{{History||1.4.0|snap=beta 1.2.20.1|Ink sacs can now be crafted from iron, sulfur, and 4 oxygen in the [[compound creator]]s.
|Ink sacs can now be used to craft [[balloon]]s and [[glow stick]]s.}}
{{History||1.8.0|snap=beta 1.8.0.10|Ink sacs can now be used to craft [[black dye]].}}
{{History||1.10.0|snap=beta 1.10.0.3|Ink sacs can now be bought from [[wandering trader]]s.
|[[File:Ink Sac JE2 BE2.png|32px]] The texture of ink sacs has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.4|Ink sacs can now be [[trading|sold]] to librarian [[villager]]s.}}
{{History||1.16.100|snap=beta 1.16.100.56|The ID of ink sacs has been changed from {{cd|dye/0}} to {{cd|ink_sac}}.}}
{{History||1.16.210|snap=beta 1.16.210.59|Ink sacs can now be used to revert glowing text on signs to normal.}}
{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.00|switch=1.0.1|wiiu=Patch 1|[[File:Ink Sac JE1 BE1.png|32px]] Added ink sacs.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Ink Sac JE2 BE2.png|32px]] The texture of ink sacs has been changed.}}
{{History|New 3DS}}
{{History||0.1.0|[[File:Ink Sac JE1 BE1.png|32px]] Added ink sacs.}}
{{History|foot}}
== Issues ==
{{issue list}}
== References ==
{{reflist}}
{{Items}}
[[Category:Bedrock Edition specific information]]
[[Category:Items]]
[[Category:Dyes]]
[[Category:Renewable resources]]
[[cs:Váček inkoustu]]
[[de:Tintenbeutel]]
[[es:Saco de tinta]]
[[fr:Poche d'encre]]
[[hu:Tintazsák]]
[[ja:イカスミ]]
[[ko:먹물 주머니]]
[[nl:Inktzak]]
[[pl:Torbiel z atramentem]]
[[pt:Bolsa de tinta]]
[[ru:Чернильный мешок]]
[[uk:Чорнильний мішок]]
[[zh:墨囊]]</li><li>[[Portfolio|Portfolio]]<br/>{{exclusive|education}}
{{Item
| image = Portfolio.png
| renewable = No
| stackable = Yes (64)
}}
A '''portfolio''' is an [[item]] that can save [[photo]]s taken with a [[camera]].<ref>https://education.minecraft.net/support/knowledge-base/using-cameras-portfolios/</ref>
== Obtaining ==
Portfolios can be obtained in the [[creative inventory]] or through the {{cmd|give}} command.
== Usage ==
[[File:Portfolio Interface.png|thumb|upright=1.5|The portfolio interface]]
Once a photo has been taken using the [[camera]], it appears in the portfolio. Once equipped, right-clicking brings up a two-page book of photos the [[player]] has taken, in chronological order. Captions can be added below each picture. Pressing the "Export Portfolio" button creates a .zip file with all photos as JPGs in a specified folder. The portfolio is also used to load custom items in [[Minecraft China]].
== Data values ==
=== ID ===
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Portfolio
|spritetype=item
|nameid=portfolio
|id=456
|form=item
|foot=1}}
== History ==
{{History|pocket alpha}}
{{History||v0.16.0|snap=build 1|[[File:Portfolio BE1.png|32px]] Added portfolios.}}
{{History|||snap=build 2|Portfolios have been removed.}}
{{History|bedrock}}
{{History||1.16.100|Data-driven portfolios, allowing for add-ons to create custom portfolios. Normal Portfolios are still unobtainable.}}
{{History|education}}
{{History||1.0|[[File:Portfolio BE1.png|32px]] Added portfolios.}}
{{History|foot}}
== References ==
{{Reflist}}
{{Items}}
{{Education Edition}}
[[Category:Non-renewable resources]]
[[Category:Education Edition items]]
[[Category:Storage]]
[[de:Fotoalbum]]
[[es:Portafolio]]
[[ja:ポートフォリオ]]
[[ko:포트폴리오]]
[[pl:Portfolio]]
[[pt:Portfólio]]
[[ru:Портфолио]]
[[uk:Портфоліо]]
[[zh:公文包]]</li></ul> | October 19, 2015 | Dinnerbone announces loot tables. | |||
| 15w43a | Added loot tables. | ||||
| 15w43b | Added condition entity_scores. | ||||