Minecraft Wiki
Register
Advertisement
For the command, see Commands/function.
Move arrows
It has been suggested that this page be moved to Bedrock Edition function(s).
If this move affects many pages or may potentially be controversial, do not move the page until a consensus is reached.
 [discuss]
Reason: Consistency with other articles that have a Java and bedrock variant; plural should be discussed
When moving, be sure to use the appropriate tool instead of simply copying and pasting the page's contents, to preserve edit history.
Information icon
This feature is exclusive to Bedrock Edition. 

Functions allow players to run lists of commands using text files with the extension .mcfunction. This page covers how to use functions in Bedrock Edition.

Usage[]

Text files must be placed into a top-level folder named "functions" within a behavior pack, located at com.mojang/behavior_packs/[behavior_pack]/functions.

Subfolders and namespacing[]

Subfolders can be added to this folder to serve as namespaces.

For example, running the function sub/foo runs the file located at [behavior_pack]/functions/sub/foo.mcfunction.

/reload[]

Note: Currently /reload reloads only functions that already exist at the time the game is launched, meaning changes can be made to existing functions but the game must be restarted for newly added functions.

Success results[]

Upon successfully running a function, a message displays in chat: "Executed [amount] Command(s) from function [function file directory]." In version 1.12.0 this is "Successfully executed [amount] function entries."

Function syntax[]

Within the .mcfunction file, one valid command is placed per line, without the usual forward slash /. Players can add comments within the function text file by preceding them with a #.

min_engine_version[]

Functions require a minimum engine version specified in the pack manifest.json file.

This field determines which version of a command to run. The number specified here should match the version number of the game. For example, lets say that /fill was changed in 1.9.0. If your behavior pack has "min_engine_version": [1, 8, 0] and runs a function that contains /fill, it runs the older version of fill (as if the version was still 1.8.0).

Manifest example[]

{
    "format_version": 1,
    "header": {
        "description": "Function worldedit",
        "name": "Function worldedit",
        "uuid": "11111111-1111-1111-1111-111111111111",
        "version": [1, 11, 3],
        "min_engine_version": [1, 11, 3]
    },
    "modules": [
        {
            "description": "",
            "type": "data",
            "uuid": "22222222-2222-2222-2222-222222222222",
            "version": [1, 11, 3]
        }
    ]
}

Simple function example[]

title @p title Test
setblock ~ ~2 ~ diamond_ore
say Test
#this is a comment

More complex function example[]

This function builds a basic stone and wood house around the executor. Note that because the function runs commands in order, the glass windows and wooden door replace the stone walls created by the first command.

fill ~-2 ~-1 ~-2 ~2 ~2 ~2 stonebrick 0 hollow
fill ~-2 ~-1 ~-2 ~2 ~-1 ~2 planks
fill ~ ~ ~2 ~ ~ ~2 wooden_door 1
fill ~-2 ~1 ~ ~-2 ~1 ~ glass
fill ~2 ~1 ~ ~2 ~1 ~ glass
fill ~ ~1 ~-2 ~ ~1 ~-2 glass

Running a function[]

Functions attempt to run all commands within a single tick, including the commands of nested functions called within another function.

Limits[]

A single function call runs up to 10,000 commands (including calls to other functions, i.e. recursion).

Commands[]

/function[]

  • Allows players to run a function once
  • The commands in the function are run through the entity or command block that ran the /function command.
  • Usage: /function <path/to/function/file>

History[]

Bedrock Edition
1.8.0
{{Extension DPL}}<ul><li>[[Dupe Hack|Dupe Hack]]<br/>{{for|the method to duplicate items and blocks|Tutorials/Block and item duplication}}
{{stub}}
{{Joke feature}}
{{exclusive|java}}{{item
| image = Missing Texture.png
| rarity=Common
| stackable=No
|title=minecraft:dupe_hack|renewable=Yes}}
'''minecraft:dupe_hack''' is a joke item from [[Java Edition 23w13a_or_b]].

==Obtaining==

Once the <code>dupe_hack_occurrence_chance</code> vote is approved the '''dupe hack''' item has a random chance of dropping whenever an entity with chests is killed by a player, e.g. when destroying a [[Minecart with Chest|minecart with chest]] with a [[sword]].

It doesn't appear in the [[creative]] menu, not even when the [[Options#Controls|option]] "Operator Items Tab" is enabled, but can be given to the player with [[Commands/give|<code>/give</code>]] and other commands.

==Usage==
The dupe hack item can be used to create a limited amount of duplicate items by placing it on a [[crafting table]] with any other item. It has a random chance of breaking, controlled by the <code>dupe_hack_break_chance</code> vote. This limitation can be mostly bypassed by putting the items in an [[Ender Chest|ender chest]] first and duplicating the chest.

When using the Dupe Hack, it has a random chance of breaking, which is often decided by votes.

===Crafting ingredient===

{{Crafting
  |Any Item
  |Dupe Hack
  |Output=Any Item, 2
  |showdescription=1
  |description=The dupe hack item remains in the crafting grid after duplicating an item.
  |foot=1
}}

==Data values==
===ID===
{{edition|java}}:{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=minecraft:dupe_hack
|spritetype=item
|nameid=dupe_hack
|form=item|foot=1|spritename=missingno}}

==History==
{{History|java}}
{{History||23w13a_or_b|[[File:Missing Texture JE4.png|32px]] Added minecraft:dupe_hack.}}
{{History|foot}}

{{items}}
{{Jokes}}

<references />

[[Category:Joke items]]

[[ja:Dupe Hack]]
[[pt:Dupe Hack]]</li><li>[[Lead|Lead]]<br/>{{About|the item used for leashing and leading mobs|the element|Element#Lead}}
{{Item
| image = Lead.png
| stackable = Yes (64)
| renewable = Yes
}}
'''Leads''' are [[tool]]s used to leash and lead passive and neutral [[animal]]s, [[golem]]s and some [[monster]]s.

== Obtaining ==
=== Chest loot ===
{{LootChestItem|lead}}

=== Crafting ===
{{Crafting
  |A1= String
  |B1= String    
  |A2= String
  |B2= Slimeball
  |C3= String
  |Output= Lead,2
  |type= Tool
}}

=== Mob loot ===
[[Wandering Trader|Wandering trader]]s always spawn with 2 [[llama|trader llama]]s, each held with a lead. When a trader llama is detached, either by killing it or the wandering trader, dragging them far apart, or putting the llama in a [[boat]] or a [[minecart]], the lead drops at the llama's position.

== Usage ==
=== Crafting ingredient ===

{{crafting usage}}

=== Leashing mobs ===
[[File:SuspendedPigs.png|190px|thumb|One block tall mobs, such as pigs, suspend at 7 blocks above the ground.]]
[[File:SuspendedCows.png|190px|thumb|Two block tall mobs, such as cows, also suspend at 7 blocks above the ground.]]

{{control|Using}} a lead on a [[mob]] ties the lead to the mob, allowing it to be moved by the player. Multiple mobs can be held by leads at once, but each mob held requires its own lead.

It is possible to leash the following mobs and other entities:

{{columns-list|colwidth=20em|
* {{EntityLink|Allay}}
* {{EntityLink|Axolotl}}
* {{EntityLink|Bee}}
* {{EntityLink|Boat}}{{only|bedrock}}
* {{EntityLink|Camel}}
* {{EntityLink|Cat}}
* {{EntityLink|Chicken}}
* {{EntityLink|Chicken Jockey}} (only the mount)
* {{EntityLink|Cow}}
* {{EntityLink|Dolphin}}
* {{EntityLink|Donkey}}
* {{EntityLink|Fox}}
* {{EntityLink|Frog}}
* {{EntityLink|Glow Squid}}
* {{EntityLink|Goat}}
* {{EntityLink|Hoglin}}
* {{EntityLink|Horse}}
* {{EntityLink|Iron Golem}}
* {{EntityLink|Llama}}
* {{EntityLink|Mooshroom}}
* {{EntityLink|Mule}}
* {{EntityLink|Ocelot}}
* {{EntityLink|Parrot}}
* {{EntityLink|Pig}}
* {{EntityLink|Polar Bear}}
* {{EntityLink|Rabbit}}
* {{EntityLink|Sheep}}
* {{EntityLink|Skeleton Horse}}
* {{EntityLink|Skeleton Horseman}} (only the mount)
* {{EntityLink|Sniffer}}
* {{EntityLink|Snow Golem}}
* {{EntityLink|Squid}}
* {{EntityLink|Strider}}
* {{EntityLink|Trader Llama}}
* {{EntityLink|Wolf}}
* {{EntityLink|Zoglin}}
* {{EntityLink|Zombie Horse}}}}

Additionally, [[villager]]s, [[wandering trader]]s, and [[monster]]s other than the ones listed above, can be leashed using a map editor or [[NBT]] editor. 

With a mob on a lead held by the player, {{control|using}} the lead on any type of [[fence]] (or [[wall]]{{only|bedrock|short=1}}) attaches the lead to it with a visible knot, tying the mob to it. To attach it to a wall on Bedrock Edition, the player must hold a lead in the main hand.<ref>{{bug|MCPE-108078}}</ref> Multiple leads may be attached to one fence post. A mob tied to a fence tends to stay within 5 blocks of the fence post.

A lead is broken by pressing the {{control|use item}} control on the mob again, hitting the knot, or removing the attached fence post. Leads also break when hit by projectiles. Whenever a lead is removed or broken, it drops as an [[item (entity)|item]] at the location of the mob. However, it does not drop when unleashed in Creative mode.{{only|java}}<ref>{{bug|MCPE-79639}}</ref> A lead does not break if the attached animal dies.

A lead can stretch a maximum of 10 blocks. If the mob is able to move towards the player or fence post, it does so. If not, or if the mob is moving very quickly away from the player, the lead breaks.

When the player or the knot is more than 7 blocks above the ground, the mob being leashed becomes suspended.

Most mobs that can be leashed can still be leashed even if attacking the player leashing them, and any attached leads do not break.

[[Wolf|Wolves]] cannot be leashed after becoming angry. Despite this, if they become angry while already leashed, the lead does not break, but it cannot be reattached when broken through other methods while the wolf is still angry.

A lead attached to a hoglin breaks if it becomes a [[zoglin]].

A lead does not prevent mobs from despawning if they normally would despawn.

When moving downwards and accelerating towards the ground, leashed mobs accumulate fall damage and take it if they hit the ground while still accelerating. When moving up or decelerating (such as when the lead is stretched to its limit), the fall distance is set to one block and the mob therefore does not take any fall damage if it touches the ground.

If the player walks into and back out of a [[nether portal]] while holding a lead connected to a mob, the lead remains attached to the mob. However, if a mob attached to a lead walks into a nether portal, the lead breaks and drops as an item in the other dimension.

A lead can be used to remove a mob from a boat without needing to break the boat, if the mob can normally be leashed.

If a chunk unloads while containing a leashed mob (either by the player walking too far away, or traveling to another dimension via a portal), the lead breaks and drops as an item, leaving the mob free to wander around.

== Sounds ==
{{Edition|Java}}:
{{Sound table
|sound=Lead Knot break1.ogg
|sound2=Lead Knot break2.ogg
|sound3=Lead Knot break3.ogg
|subtitle=Leash Knot breaks
|source=neutral
|description=When a leash knot is destroyed
|id=entity.leash_knot.break
|translationkey=subtitles.entity.leashknot.break
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|sound=Lead Knot place1.ogg
|sound2=Lead Knot place2.ogg
|sound3=Lead Knot place3.ogg
|subtitle=Leash Knot tied
|source=neutral
|description=When a leash knot is placed on a fence
|id=entity.leash_knot.place
|translationkey=subtitles.entity.leashknot.place
|volume=1.0
|pitch=1.0
|distance=16
|foot=1}}

{{Edition|Bedrock}}:
{{Sound table
|type=bedrock
|sound=Lead Knot break1.ogg
|sound2=Lead Knot break2.ogg
|sound3=Lead Knot break3.ogg
|source=neutral
|description=When a leash knot is broken by {{ctrl|interacting}} with it
|id=leashknot.break
|volume=1.0
|pitch=1.0}}
{{Sound table
|sound=Lead Knot place1.ogg
|sound2=Lead Knot place2.ogg
|sound3=Lead Knot place3.ogg
|source=neutral
|description=When a leash knot is placed on a fence or wall
|id=leashknot.place
|volume=1.0
|pitch=1.0
|foot=1}}

== Leash Knot ==
'''Leash knot''' is an entity created when the [[player]] right-clicks the fence while having a mob leashed.
{{Entity| title = Leash Knot| image = Knot.png|imagesize= 100px|networkid='''[[JE]]''': 77}}
=== Data values ===
==== ID ====
{{edition|java}}:
{{ID table
|edition=java
|generatetranslationkeys=y
|displayname=Leash Knot
|spritetype=entity
|nameid=leash_knot
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Leash Knot
|spritetype=entity
|nameid=leash_knot
|id=88
|foot=1}}

==== Entity data ====

Leash knots have entity data that define various properties of the entity.

{{el|java}}:
{{main|Entity format}}
{{/ED}}

{{el|bedrock}}:
: See [[Bedrock Edition level format/Entity format]].

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Lead
|spritetype=item
|nameid=lead
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Lead
|spritetype=item
|nameid=lead
|id=547
|form=item
|foot=1}}

== Achievements ==

{{load achievements|So I Got That Going for Me}}

== Advancements ==

{{load advancements|When the Squad Hops into Town}}

== History ==
{{missing information|The history of a lot of mobs be leashed}}
{{History|java}}
{{History||1.6.1|snap=13w16a|[[File:Lead JE1 BE1.png|32px]] Added leads. 
|Leads do not currently have a tooltip and are called “leashes” in [http://www.mojang.com/2013/04/minecraft-snapshot-13w16a-and-new-launcher/ the change notes].}}
{{History|||snap=13w16b|Leads have been given a tooltip.}}
{{History|||snap=13w18a|Leads have been given a [[crafting]] recipe.}}
{{History||1.9|snap=15w50a|Added a [[sound]] for leads: <code>entity.leashknot.place</code>.}}
{{History||1.11|snap=16w32a|The [[entity]] ID of the knot has been changed from <code>LeashKnot</code> to <code>leash_knot</code>.}}
{{History|||snap=16w39a|Leads can now be found in [[woodland mansion]] chests.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 420.}}
{{History||1.14|snap=18w43a|[[File:Lead JE2 BE2.png|32px]] The texture of leads has been changed.}}
{{History|||snap=19w05a|Added [[wandering trader]]s, which are naturally equipped with leads.}}
{{History||1.15|snap=?|[[Bee]]s can now be leashed.}}
{{History||1.16|snap=20w09a|[[Skeleton horse]]s and [[zombie horse]]s can now be leashed.<ref>{{bug|MC-166246}}</ref>}}
{{History|||snap=?|[[Hoglin]]s can now be leashed.}}
{{History||1.16.2|snap=20w27a|[[Zoglin]]s can now be leashed.}}
{{History||1.17|snap=21w19a|[[Squid]]s and [[glow squid]]s can now be leashed.<ref>{{bug|MC-136647}}</ref>}}
{{History|||snap=?|[[Axolotl]]s can now be leashed.}}
{{History||1.19|snap=22w13a|Lead may now be found in [[ancient city]] [[chest]]s.}}
{{History|||snap=?|[[Frog]]s can now be leashed.}}
{{History||1.19.3|snap=22w42a|[[Camel]]s can now be leashed.|Mobs no longer accumulate fall damage when dangling on leads.<ref>{{bug|MC-14167||Mobs build up fall damage when dangling on a lead|Fixed}}</ref>}}
{{History||1.20 (Experimental)|link=1.19.4|snap=?|[[Sniffer]]s can now be leashed.}}
{{History||1.20|snap=23w12a|Lead can now be found in [[suspicious gravel]] and [[suspicious sand]] in [[trail ruins]].}}
{{History|||snap=23w16a|Lead no longer generates in [[suspicious sand]] in [[trail ruins]].|Due to the split of the archaeological loot tables for the suspicious gravel within the [[trail ruins]]; lead now is in the common loot.}}

{{History|pocket alpha}}
{{History||v0.15.0|snap=build 1|[[File:Lead JE1 BE1.png|32px]] Added leads.}}
{{History|pocket}}
{{History||1.1.0|snap=alpha 1.1.0.0|Leads now have better "physics".
|The [[entity]] ID of the knot has been changed from <code>leashknot</code> to <code>leash_knot</code>.
|Leads can now be found inside [[woodland mansion]] [[chest]]s.}}
{{History|bedrock}}
{{History||1.4.0|snap=beta 1.2.14.2|Leads can now be found inside [[buried treasure]] [[chest]]s.
|Leads can now be used on [[boat]]s.}}
{{History||1.4.0|snap=beta 1.2.20.1|Leads can now be used to craft [[balloon]]s.}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Lead JE2 BE2.png|32px]] The texture of leads has been changed.
|[[Wandering trader]]s now [[drops|drop]] leads after they are detached from trader [[llama]]s.}}
{{History||1.14.0|snap=beta 1.14.0.1|Leads can now be used on [[polar bear]]s, [[ocelot]]s, [[parrot]]s, [[dolphin]]s and old [[villager]]s.}}
{{History||1.19.0|snap=beta 1.19.0.20|Allays can now be leashed.}}

{{History|console}}
{{History||xbox=TU19|xbone=CU7|ps=1.12|wiiu=Patch 1|switch=1.0.1|[[File:Lead JE1 BE1.png|32px]] Added leads.}}
{{History||xbox=TU43|xbone=CU33|ps=1.36|wiiu=Patch 13|[[Sound]]s have been added for leads.}}
{{History|Ps4}}
{{History||1.90|[[File:Lead JE2 BE2.png|32px]] The texture of leads has been changed.}}

{{History|3ds}}
{{History||0.1.0|[[File:Lead JE1 BE1.png|32px]] Added leads.}}
{{History|foot}}

== Issues ==
{{issue list|Lead|Leash}}

== Trivia ==
[[File:Steve wearing Lead.png|100px]] [[File:Alex wearing Lead.png|100px]]
* The lead is named as "leash" in the texture file.
* If a [[player]] goes to sleep while holding a mob on a lead, the lead remains attached.
* {{IN|Java}}, when using the {{cmd|item}} command to put a lead in a player's head slot, the item gets rotated and positioned in such a way that it looks like the player is wearing a monocle.

== Gallery ==
<gallery>
Multiple_Leash.png|Many animals can be tied to one fence post.
HorseLeashedOnAFence.png|A [[horse]] wearing [[golden horse armor]] that is leashed to a fence post.
ThreeTiedSheep.png|Three sheep tied to the same fence.
More accurate lead mobs.png|A shot of all the mobs that could be tied with leads as of 1.6.1, except donkeys and mules.
Yo Yo.png|With the use of the leash, it is possible to suspend animals in the air by tying the leash on high-up fence posts.
YoYo.png|A [[donkey]] with the Grumm/Dinnerbone [[name tag]] [[easter egg]] tied to a fence with a lead to make a yo-yo.
Flying_Sheep.png|Several [[sheep]] hanging in the air in [[Creative]] mode.
Pocket Edition Lead.jpg|First image of a lead in ''Bedrock Edition''.
</gallery>

== References ==
{{Reflist}}

== External Links ==
*[https://www.minecraft.net/en-us/article/taking-inventory-lead Taking Inventory: Lead] – Minecraft.net on April 8, 2022

{{items}}

{{entities}}

[[Category:Tools]]

[[de:Leine]]
[[es:Rienda]]
[[fr:Laisse]]
[[hu:Lasszó]]
[[it:Guinzaglio]]
[[ja:リード]]
[[ko:끈]]
[[nl:Leidtouw]]
[[pl:Smycz]]
[[pt:Laço]]
[[ru:Поводок]]
[[th:เชือกจูง]]
[[zh:拴绳]]
[[Category:Renewable resources]]</li></ul>
beta 1.8.0.8Added function files.
Function files are available only in behavior packs.
1.13.0
{{Extension DPL}}<ul><li>[[Minecart with Furnace|Minecart with Furnace]]<br/>{{ItemEntity
|image=Minecart with Furnace.png
|renewable=Yes
|stackable=No
|size=Height: 0.7 Blocks<br>Width: 0.98 Blocks
|networkid=10
|drops= 1 {{ItemLink|Minecart with Furnace}}
|health={{Hp|6}}
}}

A '''minecart with furnace''' is a [[furnace]] inside a [[minecart]]. It can be powered with [[coal]] or [[charcoal]] to propel it across a [[rail]] line for a limited time, which can be used to move other minecarts.

==Obtaining==
Minecarts with furnace can be retrieved by attacking them, and by doing so it drops as an [[item]].

===Crafting===
{{Crafting
|Output= Minecart with Furnace
|type= Transportation
|Furnace|Minecart}}

==Usage==
Minecarts with furnaces are placed in the same way as other minecarts. It does not have a graphical user interface, unlike a [[furnace]].

Minecarts with furnaces can be powered, done by feeding fuel ([[coal]] or [[charcoal]]) into the furnace minecart with the {{Control|use}} button. The fuel is consumed immediately and it starts to move in the same direction the player clicked toward. Pressing {{Control|use}} always turns it to that direction, even when not holding coal.

Any piece of fuel, added at any time, increases the total range by an additional 3600 ticks (equal to 180 seconds or 3 minutes).  The upper limit is 32767 ticks, approximately 27 minutes.

When powered, minecarts with furnaces cover 240m per minute (about 4 m/s, slightly slower than walking speed) or 720m per piece of coal. They do not accelerate beyond this speed when going downhill or on active [[powered rail]]s, and as long as they remain powered, they do not slow down when going uphill, on inactive powered rails, or when pushing or pulling other minecarts.

If a powered furnace minecart is derailed and then pushed back onto a rail, it starts moving again in the direction it came from, so they are not easily turned around in this state unless a player is nearby to redirect it with {{Control|use}}.

Minecarts with furnaces can climb up steep inclines while pushing other minecarts as long as they have fuel. If a minecart with furnace reaches a slope while pulling another minecart, the pulled minecart is switched to the forward position so that it can be pushed along the slope instead of pulled.

When a minecart with furnace bumps into another minecart or multiple minecarts, the other minecarts are pushed forward with great speed. The furnace minecart continues on with its own speed. Because of this speed difference, some of the minecarts may end up inside unloaded chunks on straight tracks.

===Train mechanics===
{{Schematic
|caption=weakly-shunted 1-cart train, one cart was used only to push the train together and is left behind
|AB|mc-$ew|mc-$ew|mc/Fu-$ew|-
|AB|ra-$wu|ra-$ew|ra-$ew|ra-$ew|ellipsis-ew
}}
{{Schematic
|caption=Creating a strongly-shunted 1-cart train.  The sloped rail must be replaced with a horizontal rail before powering.
|AB|mc-$ew||mc/Fu-$ew|-
|AB|ra-$ew|ra-$ew|ra-$eu|ra-$ew|ra-$ew|ellipsis-ew
}}

[[File:FurnaceMinecartTrain.png|thumb|right|A Minecart train powered by furnace [[Minecart|minecarts.]]|alt=]]
A furnace minecart can be made to pull up to four other minecarts. All minecarts in this train move at the constant speed of the furnace minecart.  Trains are formed when a minecart is pushed into the back of a powered furnace minecart or a short-enough train.  These shunts are fragile at best and easily come undone, but some methods are stronger than others.  For example, pushing a minecart into a furnace minecart and then powering the furnace gives a weaker shunt than pushing the furnace minecart into the other minecart against a wall, and then powering the furnace in the other direction.

A high-speed minecart running into the back of a furnace minecart going in the same direction automatically creates a weak shunt with it, pulling it along.

Pulling a minecart with TNT causes it to explode.

{| class="wikitable"
|+Pulled minecart/Shunt behavior
!Condition
!Result
|-
|Furnace loses power/speed||Shunt comes undone
|-
|Entity bumping besides those part of the train||Jettisoned forward
|-
|Upward sloped track||Jettisoned forward
|-
|Downward sloped track||Jettisoned forward (strong shunt) or shunt comes undone (weak shunt)
|-
|90° turn in track||Jettisoned backward
|-
|Turn toward north/south or east/west that is not the direction the train was shunted in||Train derails
|}

When a train comes to a turn, the shunt comes undone with the pulled minecart jettisoned backward. The correct way to make such a turn is having the shunt undone before a turn, and then make the two rejoin on a straight rail later by having the pulled cart catch up with the minecart with furnace.<ref name=mango/>

Since the train runs slower on a fully powered track than a normal minecart (~5 m/s compared to 8m/s), a train pulled by an unpowered furnace minecart is ideal for AFK farms involving breaking or placing blocks like [[nether wart]].<ref name=mango>{{YouTubeLink|1=pRLiAQfhTG8|2=Why The Furnace Minecart Isn't As Useless As You Think|3=ilmango}}</ref>

==Properties==
The coal is not stored as an item in the entity, but in the object data in the fuel property as a time in ticks. ''Fuel'' is a short value, i.e. a maximum of 32767 ticks, which is about 27 minutes. However, {{cmd|/summon furnace_minecart ~ ~ ~ {Fuel:32000} }} alone doesn't make it go since it doesn't have a direction. It can be right-clicked on a track to give it a direction, or it can be summoned with the properties ''PushX'' and ''PushZ'' set, which are responsible for the direction. The <code>Motion</code> property of every entity allows for movement of the minecart, but it does not direct the minecart to move on its own.

==Sounds==
{{Edition|Java}}:<br>
Minecarts with furnaces use the Friendly Creatures sound category for entity-dependent sound events.<ref group=sound name=rollsource>{{bug|MC-42132}}</ref>
{{Sound table
|sound=Minecart rolling.ogg
|subtitle=Minecart rolls
|source=Friendly Creatures <ref group=sound name=rollsource/>
|overridesource=1
|description=While a minecart with furnace is moving
|id=entity.minecart.riding
|translationkey=subtitles.entity.minecart.riding
|volume=0.0-0.35 <ref group=sound>Relates linearly with horizontal velocity (max 0.5)</ref>
|pitch=0.0-1.0 <ref group=sound>Will increase by 0.0025 per tick if the minecart's horizontal velocity is more than 0.01</ref>
|distance=16
|foot=1}}

{{Edition|Bedrock}}:
{{Sound table
|type=bedrock
|sound=Minecart rolling.ogg
|source=neutral
|description=While a minecart with furnace is moving
|id=minecart.base
|foot=1}}

==Data values==
===ID===
{{ID table
|edition=java
|firstcolumnname=Item
|showforms=y
|generatetranslationkeys=y
|displayname=Minecart with Furnace
|spritetype=item
|nameid=furnace_minecart
|form=item
|foot=1}}
{{ID table
|edition=java
|firstcolumnname=Entity
|generatetranslationkeys=y
|displayname=Minecart with Furnace
|spritetype=entity
|nameid=furnace_minecart
|foot=1}}

===Entity data===
Minecarts with furnace have entity data associated with them that contain various properties of the entity.

{{el|java}}:
{{main|Entity format}}
{{/ED}}

{{el|bedrock}}:
: See [[Bedrock Edition level format/Entity format]].

==History==
{{History|java alpha}}
{{History||v1.0.14|[[File:Minecart with Furnace JE1.png|32px]] [[File:Minecart with Furnace (item) JE1.png|32px]] Minecarts with furnace were added.
|Since no in-game name was indicated, they were referred to by names such as "powered minecart" or "furnace minecart".
|No matter how much fuel was added to the minecart, it would never move for more than 3 minutes after the last fuel.}}
{{History|java beta}}
{{History||1.0|When tooltips were added to items in inventory, this was named "Minecart with Furnace".}}
{{History||1.2|[[File:Minecart with Furnace JE2.png|32px]] The texture of the minecart with furnace has been changed.}}
{{History|java}}
{{History||1.0.0|snap=?|Each piece of [[coal]] now powers a [[minecart]] with furnace for {{convert|3|minutes|ticks}}, so that adding another piece of coal at any time increases the total range by another 3 minutes.  A full stack of 64 coal now powers it for {{convert|192|minutes|ticks}}.
|Minecarts with furnace on a level track cover 204 meters per minute.}}
{{History||1.8|snap=14w11a|Minecarts with furnace now give a much greater boost to other minecarts.
|When powered, minecarts with furnace now move on non-powered rails without decelerating.}}
{{History|||snap=14w17a|Minecarts with furnace's behavior has been reverted, so that no change was released in [[Java Edition 1.8]].}}
{{History||1.11|snap=16w32a|The entity ID of the minecart with furnace has been changed from <code>MinecartFurnace</code> to <code>furnace_minecart</code>.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 343.}}
{{History||1.14|snap=18w43a|[[File:Minecart with Furnace JE3.png|32px]] [[File:Minecart with Furnace (item) JE2.png|32px]] The texture of the minecart with furnace has been changed.}}
{{History||1.15|snap=19w38a|[[File:Minecart with Furnace 19w38a.png|32px]] The furnace now appears dark, like suffocating mobs.}}
{{History|||snap=19w39a|The furnace texture is now colored correctly.}}
{{History||1.15.2|snap=Pre-Release 1|Furnace minecarts can now navigate around any corner.}}
{{History||1.19|snap=22w13a|The crafting recipe for a minecart with furnace is now shapeless.
|Breaking a minecart with furnace will now drop the item instead of the minecart and furnace separately.<ref>{{bug|MC-249493|||Fixed}}</ref>}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Minecart with Furnace JE2.png|32px]] [[File:Minecart with Furnace (item) JE1.png|32px]] Added minecart with furnace.}}
{{History|Ps4}}
{{History||1.90|[[File:Minecart with Furnace JE3.png|32px]] [[File:Minecart with Furnace (item) JE2.png|32px]] The texture of the minecart with furnace has been changed.}}
{{History|foot}}

==Issues==
{{issue list}}

==Trivia==
*The minecart with furnace is excluded from {{els|be|3ds}} on purpose. In a tweet, [[Jeb]] considered removing it from {{el|je}}.<ref>{{tweet|jeb|699241247391772672|I think we will phase out the furnace minecraft ''(sic)''|15 Feb 2016}}</ref>
**When converting a [[Legacy Console Edition]] world to a [[Bedrock Edition]] world, any present minecarts with furnaces are converted into a normal minecart.
**Despite the above-described poor standing of the minecart, it was most recently briefly featured in an animation in the [[Minecraft Live 2022]], where one was depicted as moving a train of about 20 minecarts at a higher than normal speed.

==Gallery==
<gallery>
Running Powered Minecart.png|A powered minecart in action.
</gallery>

==References==
{{reflist}}

{{Items}}
{{Entities}}

[[Category:Mechanics]]

[[cs:Parní vozík]]
[[de:Antriebslore]]
[[es:Vagoneta con horno]]
[[fr:Wagonnet motorisé]]
[[hu:Gőzmeghajtású csille]]
[[ja:かまど付きのトロッコ]]
[[ko:화로가 실린 광산 수레]]
[[nl:Mijnkar met oven]]
[[pl:Wagonik z piecem]]
[[ru:Вагонетка с печью]]
[[uk:Вагонетка з піччю]]
[[zh:动力矿车]]</li><li>[[Minecart with Hopper|Minecart with Hopper]]<br/>{{ItemEntity
|image=Minecart with Hopper.png
|renewable=Yes
|stackable=No
|size=Height: 0.7 Blocks<br>Width: 0.98 Blocks
|networkid='''[[JE]]''': 10
|drops=1 {{ItemLink|Minecart with Hopper}}<br>plus contents
|health={{hp|6}}
}}
A '''minecart with hopper''' is a [[minecart]] with a [[hopper]] inside. Unlike a normal hopper, it pulls items from containers much more quickly, cannot push items into containers, can collect [[Item (entity)|item entities]] through a single layer of [[solid block]]s and is locked and unlocked via [[Activator Rail|activator rails]].

== Obtaining ==

=== Crafting ===

{{Crafting
|Output= Minecart with Hopper
|type= Transportation
|Hopper|Minecart}}

Minecarts with hoppers can be retrieved by attacking them. By doing so it drop as an [[item (entity)|item]] and any other contents of the hopper are dropped as well.

== Usage ==
[[File:Minecart with Hopper GUI.png|thumb|176px|The GUI of a minecart with hopper.]]
Minecarts with hoppers are placed similarly to other [[minecart]]s.

A minecart with hopper pulls in items lying nearby (within a range slightly larger than the cart itself), or inside a container directly above the minecart, at a rate of 1 item every [[game tick]] (20 items per second), eight times as fast as a normal hopper. It also picks up items that are lying on a block directly above the track. It does not push items into containers, but a hopper underneath the track can remove items from a minecart with hopper on the track. Ordinary hoppers can also drop items into a minecart with hopper like other containers, at the normal speed of 2.5 items per second. In Bedrock Edition, a minecart with hopper on curved rail pulls in items in a hopper lying in front of its moving direction and 1 block above if hopper's output funnel is pointed downward and no block is below that hopper.<ref>{{bug|MCPE-94293}}</ref>

The hopper can be disabled by passing over a powered [[activator rail]], and can be reenabled by an inactive activator rail.

An empty minecart with hopper can travel more than 85 blocks without stopping (as opposed to a normal cart going less than 12 blocks) from a dead stop using a 2 powered track starter even with another cart in front of them. However, the distance traveled by a minecart with hopper depends on the hopper's load. Using a 1 powered rail starter track, a minecart with an empty hopper travels 64 blocks until it stops (as opposed to an empty normal minecart going 8 blocks). The distance traveled diminishes non-linearly with increased hopper load; a minecart with a full hopper can travel only 16 blocks in this setup.

{{See also|Tutorials/Storage minecarts}}

== Sounds ==
{{Edition|Java}}:<br>
Minecarts with hoppers use the Friendly Creatures sound category for entity-dependent sound events.<ref group=sound name=rollsource>{{bug|MC-42132}}</ref>
{{Sound table
|sound=Minecart rolling.ogg
|subtitle=Minecart rolls
|source=Friendly Creatures <ref group=sound name=rollsource/>
|overridesource=1
|description=While a minecart with hopper is moving
|id=entity.minecart.riding
|translationkey=subtitles.entity.minecart.riding
|volume=0.0-0.35 <ref group=sound>Relates linearly with horizontal velocity (max 0.5)</ref>
|pitch=0.0-1.0 <ref group=sound>Will increase by 0.0025 per tick if the minecart's horizontal velocity is more than 0.01</ref>
|distance=16
|foot=1}}

{{Edition|Bedrock}}:
{{Sound table
|type=bedrock
|sound=Minecart rolling.ogg
|source=neutral
|description=While a minecart with hopper is moving
|id=minecart.base
|foot=1}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|firstcolumnname=Item
|showforms=y
|generatetranslationkeys=y
|displayname=Minecart with Hopper
|spritetype=item
|nameid=hopper_minecart
|form=item
|foot=1}}
{{ID table
|edition=java
|firstcolumnname=Entity
|generatetranslationkeys=y
|displayname=Minecart with Hopper
|spritetype=entity
|nameid=hopper_minecart
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|firstcolumnname=Item
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Minecart with Hopper
|spritetype=item
|nameid=hopper_minecart
|id=526
|form=item
|foot=1}}
{{ID table
|edition=bedrock
|firstcolumnname=Entity
|shownumericids=y
|generatetranslationkeys=y
|displayname=Minecart with Hopper
|spritetype=entity
|nameid=hopper_minecart
|id=96
|foot=1}}

=== Entity data ===
Minecarts with hoppers have entity data associated with them that contain various properties of the entity.

{{el|java}}:
{{main|Entity format}}
{{/ED}}

{{el|bedrock}}:
: See [[Bedrock Edition level format/Entity format]].

== Video ==

<div style="text-align:center">{{yt|I5etC7LeCac}}</div>

== History ==

{{History|java}}
{{History||1.5|snap=13w03a|[[File:Minecart with Hopper JE1 BE1.png|32px]] [[File:Minecart with Hopper (item) JE1 BE1.png|32px]] Added minecart with hopper.}}
{{History||1.9|snap=15w43a|Loot tables are added; minecarts with hopper now can use loot tables.}}
{{History||1.9.1|snap=pre2|The title of the [[inventory]] is changed from 'Hopper minecart' to 'Minecart with Hopper'.}}
{{History||1.11|snap=16w32a|The entity ID of the minecart with hopper has now been changed from <code>MinecartHopper</code> to <code>hopper_minecart</code>.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 408.}}
{{History||1.14|snap=18w43a|[[File:Minecart with Hopper JE2 BE2.png|32px]] [[File:Minecart with Hopper (item) JE2 BE2.png|32px]] The textures of the minecart with hopper have now been changed.}}
{{History||1.15|snap=19w38a|[[File:Minecart with Hopper 19w38a.png|32px]] The hopper now appears dark, same as suffocating mobs.}}
{{History|||snap=19w39a|The hopper now renders correctly.}}
{{History||1.16.2|snap=Pre-release 1|Opening or destroying a minecart with hopper now angers nearby [[piglin]]s.}}
{{History||1.19|snap=22w13a|The crafting recipe for a minecart with hopper is now shapeless.|Breaking a minecart with hopper will now drop the item instead of the minecart and hopper separately, though the contents of the hopper are still dropped.<ref>{{bug|MC-249493|||Fixed}}</ref>}}
{{History||1.19.4|snap=23w06a|Minecart with hopper now no longer aggravates [[piglin]]s when opened.}}

{{History|pocket alpha}}
{{History||v0.14.0|snap=build 1|[[File:Minecart with Hopper JE1 BE1.png|32px]] [[File:Minecart with Hopper (item) JE1 BE1.png|32px]] Added minecart with hopper.}}
{{History|pocket}}
{{History||1.1.0|snap=alpha 1.1.0.0|The entity ID of the minecart with hopper has now been changed from <code>minecarthopper</code> to <code>hopper_minecart</code>.}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Minecart with Hopper JE2 BE2.png|32px]] [[File:Minecart with Hopper (item) JE2 BE2.png|32px]] The textures of the minecart with hopper have now been changed.}}
{{History||1.19.0|snap=beta 1.19.0.30|Breaking a minecart with hopper will now drop the item instead of the minecart and hopper separately, though the contents of the hopper are still dropped.}}

{{History|console}}
{{History||xbox=TU19|xbone=CU7|ps=1.12|wiiu=Patch 1|switch=1.0.1|[[File:Minecart with Hopper JE1 BE1.png|32px]] [[File:Minecart with Hopper (item) JE1 BE1.png|32px]] Added minecart with hopper.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Minecart with Hopper JE2 BE2.png|32px]] [[File:Minecart with Hopper (item) JE2 BE2.png|32px]] The textures of the minecart with hopper have now been changed.}}

{{History|new 3ds}}
{{History||0.1.0|[[File:Minecart with Hopper JE1 BE1.png|32px]]  [[File:Minecart with Hopper (item) JE1 BE1.png|32px]] Added minecart with hopper.
|Minecarts with hopper emit smoke [[particles]] when destroyed.}}
{{History|foot}}

== Issues ==

{{issue list}}

== Gallery ==

<gallery>
File:First hopper Minecart Image.png|The first image of hopper carts released by Dinnerbone.<ref>{{Tweet|Dinnerbone|291215700213772289|Well you guys got that quick. The letters in the hotbar were for <nowiki>[imgur link]|January 15, 2013}}</ref>
File:13w03a Banner.png|The 13w03a banner showing a minecart with hopper and a [[dropper]].
</gallery>

== References ==

{{reflist}}


{{items}}
{{entities}}

[[Category:Mechanics]]
[[Category:Storage]]

[[cs:Vozík s násypkou]]
[[de:Trichterlore]]
[[es:Vagoneta con tolva]]
[[fr:Wagonnet à entonnoir]]
[[hu:Tölcsér csille]]
[[it:Carrello da miniera]]
[[ja:ホッパー付きのトロッコ]]
[[ko:호퍼가 실린 광산 수레]]
[[nl:Mijnkar met trechter]]
[[pl:Wagonik z lejem]]
[[pt:Carrinho de mina com funil]]
[[ru:Вагонетка с воронкой]]
[[uk:Вагонетка з лійкою]]
[[zh:漏斗矿车]]</li></ul></nowiki>
beta 1.13.0.1Function files are now visible in command list.
Advertisement