Minecraft Wiki
Tommarnt (talk | contribs)
No edit summary
Tags: Manual revert Visual edit
 
(318 intermediate revisions by 85 users not shown)
Line 1: Line 1:
  +
{{about|the command in the current version (since [[Java Edition 1.13]] ([[Java Edition 1.13|17w45a]]) and [[Bedrock Edition 1.19.50]] ([[Bedrock Edition beta 1.19.50.23|beta 1.19.50.23]]))|the command in former game versions|Commands/execute/Before}}
{{:commands/infobox
 
  +
{{Infobox command
|execute
 
  +
| name = execute @e[oak_boat] at
|op
 
  +
| oplevel = * 2 {{only|java|short=1}}
|Java Edition 1.8|Java Edition 14w07a
 
  +
* 1 {{only|bedrock|short=1}}
|PE Alpha 0.16.0|PE Alpha 0.16.0 build 1
 
  +
| others = [[Options|Cheats]] only{{only|bedrock|short=1}}
}}{{cmd|execute}} is a versatile command that modifies variables or procedures in the execution of another command, such as giving the server a false impression of the entity that's executing the command, its current position, how it's rotated, etc.
 
  +
}}
  +
{{TOC|right}}
  +
{{cmd|execute}} executes another [[command]] but allows changing the executor, changing the position and angle it is executed at, adding preconditions, and storing its result.
   
  +
== Usage ==
All commands end up having a ''success status'' and some quantifiable ''value'' they can return to a target, as might be specified by <code>/execute [[#store|'''store''']] <''arguments''></code>. All commands issued from [[command block]]s return the success status to that issuing command block, which can trigger chained command blocks.
 
  +
There are fourteen{{only|java|short=1}} / eleven{{only|bedrock|short=1}} instructions (aka. subcommands) for the <code>/execute</code> command. Multiple subcommands can be chained after <code>/execute</code>. Subcommands are divided into 4{{only|java|short=1}} / 3{{only|bedrock|short=1}} categories: modify subcommands, condition subcommands, store subcommands{{only|java|short=1}}, and <code>run</code> subcommand.
  +
* Modify subcommands modify command context variables to change the context the command is executed. Subcommands following it will execute with specific executor(s), execution position(s), execution dimension(s), execution rotation(s) and execution anchor.
  +
* Condition subcommands are used to test whether certain conditions are met and then output results or limit conditions of execution.
  +
* Store subcommands{{only|java|short=1}} can store the return values of the command in a [[scoreboard]] or the data of an [[entity]], [[block entity]], or storage, and can also change the maximum or current value of a [[bossbar]].
  +
* <code>run</code> subcommand is used for carrying out another command.
   
  +
All needed subcommands can be concatenated together. Subcommands other than the <code>run</code> subcommand can be arranged arbitrarily and used multiple times. But the <code>run</code> subcommand can be used only once and must be put at the end of the subcommands chain. A <code>run</code> subcommand or a condition subcommand finalizes the chain, otherwise the command is unparseable {{in|bedrock}} or parseable but does nothing (except <code>summon</code> subcommand, see also {{bug|MC-165773}} and {{bug|MC-260576}}) {{in|java}}.
== Java Edition ==
 
   
  +
=== Subcommands and forking ===
;Syntax
 
   
  +
The game processes subcommand chain in order from front to end, for example, the following commands are different:
There are twelve instructions (or sub-commands) for the <code>/execute</code> command, and each has its own special syntax, so describing syntax takes a large branching tree.
 
  +
*All entities move one block forward: <code>execute as @e at @s run tp ^ ^ ^1</code>
  +
*All entities are teleported to one block in front of the executor: <code>execute at @s as @e run tp ^ ^ ^1</code>
   
  +
Some subcommands can fork the command execution, that is, they cause subcommands following it to be executed multiple times. It is possible to fork with zero branches, that is, terminate. For example, when {{cd|as}} subcommand selects multiple entities, the subcommand following it will execute once per entity.
:{| class="collapsible collapsed collapse-button-none" data-description="Command Syntax Tree-Diagram"
 
  +
  +
If the /execute command hasn't ever forked, we describe it as having only one branch — the main branch.
  +
  +
A branch may terminate halfway and does nothing (including {{cd|run}} and store subcommands). For example, the condition in a condition subcommand doesn't met, or {{cd|as}} subcommand selects zero entities. When terminating, an red message is shown {{in|bedrock}}. If all branches terminated, we describe the /execute command itself as terminating.
  +
  +
Note that <code>.... run execute ...</code> has no effect at all in both {{el|java}} and {{el|bedrock}}. For example, the following commands work the same:
  +
*<code>execute as @e[type=armor_stand] as @e[type=armor_stand] run summon armor_stand</code>
  +
*<code>execute as @e[type=armor_stand] run execute as @e[type=armor_stand] run execute run execute run summon armor_stand</code>
  +
  +
However, the way to fork is different in {{el|java}} and {{el|bedrock}}. (See also {{bug|MC-125067|resolution=Won't Fix}} and {{bug|MCPE-165278|resolution=Unresolved}})
  +
* {{IN|java}}, the game processes subcommands in breadth-first, that is, executes subcommands one by one. So the game processes other subcommands before processing <code>run</code> subcommands, so the <code>run</code> subcommand cannot affect other subcommands.
  +
* {{IN|bedrock}}, the game processes subcommands in depth-first. That is, after forking, all the following subcommands are considered as a whole and will be executed once for each branch.
  +
* For example, when there're two armor stands (A and B) in the world, and a player executes <code>execute as @e[type=armor_stand] as @e[type=armor_stand] run summon armor_stand</code>, the behaviors of {{el|java}} and {{el|bedrock}} are shown in the following pictures:
  +
<gallery>
  +
Execute forking in Java Edition.png|Java Edition
  +
Execute forking in Bedrock Edition.png|Bedrock Edition
  +
</gallery>
  +
  +
{{IN|java}}, depth-first can be achieved via {{cmd|function}}, for example:
  +
* When there're two armor stands (A and B) in the world, and a player executes <code>execute as @e[type=armor_stand] run function test</code>, and in the function file is:
  +
** <code>execute as @e[type=armor_stand] run summon armor_stand</code>
  +
*It behaves like <code>/execute as @e[type=armor_stand] as @e[type=armor_stand] run summon armor_stand</code> in {{el|bedrock}}.
  +
{{IN|bedrock}}, there is no way to achieve breadth-first.
  +
  +
=== Output values ===
  +
  +
==== Stored values ====
  +
{{exclusive|java|section=1}}
  +
{{IN|java}}, a branch returns a <code>success</code> value and a <code>result</code> value (see [[#Store subcommand]] for details) after it fully executed (if it does not terminate halfway). These two return values come from the last subcommand (may be a condition subcommand or a <code>run</code> subcommand). The <code>success</code> value is always 0 or 1. The <code>result</code> value must be an integer, if not, it is rounded down. If the last subcommand fails, both the two values are 0. The two values can be stored through storage subcommands.
  +
  +
Note that all commands except the execute command have these two return values. The execute command itself does not have them.
  +
  +
If the command execution is forked after a storage subcommand, the storage operation will be applied on each branch. Each branch's return value will be stored. Since the stored values will not be accumulated, after the whole execute command is executed, the stored value is the return value of the last executed branch.
  +
  +
If executing a {{cmd|function}} command after a storage subcommand, the storage operation will be applied on each command in the function file. For each command (except /execute command) in the function file, its return value will be stored after being executed. For {{cd|/execute}} commands in the function file, return value of each branch will be stored after being executed. The return value of {{cmd|function}} command itself will be also stored after the whole function file is executed. Since the stored values will not be accumulated, after the whole execute command is executed, the stored value is the return value of the {{cmd|function}} command itself.
  +
  +
==== Success count ====
  +
Like amost commands, <code>/execute</code> command itself also has a '''success count''' (whether or not terminates halfway), which is different from <code>success</code> and <code>result</code> value. It is similar to the <code>success</code> value, but is accumulated. This is usually <code>0</code> or <code>1</code>. If the command is forked or a function is executed, success count can be a number higher than <code>1</code>. When executing it with a command block, the success count is returned to the command block, which can be checked by a conditional command block or be read with a redstone comparator.
  +
  +
== Syntax ==
  +
There are fourteen{{only|java|short=1}} / eleven{{only|bedrock|short=1}} instructions (aka. subcommands) for the <code>/execute</code> command, and each has its own special syntax, so describing syntax takes a large branching tree.
  +
<!--
  +
{| class="collapsible collapsed collapse-button-none" data-description="Command Syntax Tree-Diagram"
 
|-
 
|-
 
! style="text-align:left" | Command Syntax Tree-Diagram
 
! style="text-align:left" | Command Syntax Tree-Diagram
 
|-
 
|-
 
|
 
|
  +
{{needs update|section=1}}
 
[[File:Execute graph.svg]]
 
[[File:Execute graph.svg]]
 
|}
 
|}
  +
-->
  +
; Full syntax tree:
  +
* '''Java Edition'''
  +
: <code>'''/execute''' . . .</code>
  +
:* <code>… [[#align|'''align''']] <axes> -> ''execute''</code>
  +
:* <code>… [[#anchored|'''anchored''']] <anchor> -> ''execute''</code>
  +
:* <code>… [[#as|'''as''']] <targets> -> ''execute''</code>
  +
:* <code>… [[#at|'''at''']] <targets> -> ''execute''</code>
  +
:* <code>… [[#facing|'''facing''']] (<pos>|entity <targets> <anchor>) -> ''execute''</code>
  +
:* <code>… [[#in|'''in''']] <dimension> -> ''execute''</code>
  +
:* <code>… [[#on|'''on''']] <''relation''> -> ''execute''</code>
  +
:* <code>… [[#positioned|'''positioned''']] (<pos>|as <targets>|over <heightmap>) -> ''execute''</code>
  +
:* <code>… [[#rotated|'''rotated''']] (<rot>|as <targets>) -> ''execute''</code>
  +
:* <code>… [[#store|'''store''']] (result|success) . . .</code>
  +
:**<code>… block <targetPos> <path> <''type''> <scale> -> ''execute''</code>
  +
:** <code>… bossbar <id> (max|value) -> ''execute''</code>
  +
:** <code>… entity <target> <path> <''type''> <scale> -> ''execute''</code>
  +
:** <code>… score <targets> <objective> -> ''execute''</code>
  +
:** <code>… storage <target> <path> <''type''> <scale> -> ''execute''</code>
  +
:* <code>… [[#summon|'''summon''']] <entity> -> ''execute''</code>
  +
:* <code>… ([[#if|'''if''']]|[[#unless|'''unless''']]) . . .</code>
  +
:** <code>… biome <pos> <biome> -> [''execute'']</code>
  +
:** <code>… block <pos> <block> -> [''execute'']</code>
  +
:** <code>… blocks <start> <end> <destination> (all|masked) -> [''execute'']</code>
  +
:** <code>… data . . .</code>
  +
:*** <code>… block <sourcePos> <path> -> [''execute'']</code>
  +
:*** <code>… entity <source> <path> -> [''execute'']</code>
  +
:*** <code>… storage <source> <path> -> [''execute'']</code>
  +
:** <code>… dimension <dimension> -> [''execute'']</code>
  +
:** <code>… function <function> -> [''execute'']</code>{{upcoming|java 1.20.2}}
  +
:** <code>… entity <entities> -> [''execute'']</code>
  +
:** <code>… loaded <pos> -> [''execute'']</code>
  +
:** <code>… predicate <predicate> -> [''execute'']</code>
  +
:** <code>… score <target> <targetObjective> . . .</code>
  +
:*** <code>… (<|<=|=|>|>=) <source> <sourceObjective> -> [''execute'']</code>
  +
:*** <code>… matches <range> -> [''execute'']</code>
  +
:* <code>… [[#run|'''run''']] <''command''></code>
  +
: where <code>-> ''execute''</code> represents the start of another subcommand.
   
  +
* '''Bedrock Edition'''
:; Full syntax tree:
 
:: <code>'''/execute''' . . .</code>
+
: <code>'''/execute''' . . .</code>
::*<code>… [[#align|'''align''']] <''axes''> -> ''execute''</code>
+
:* <code>… [[#align|'''align''']] <axes: string> <''chainedCommand: ExecuteChainedOption_0''></code>
::* <code>… [[#anchored|'''anchored''']] (''eyes|feet'') -> ''execute''</code>
+
:* <code>… [[#anchored|'''anchored''']] <eyes|feet> <''chainedCommand: ExecuteChainedOption_0''></code>
::* <code>… [[#as|'''as''']] <''targets''> -> ''execute''</code>
+
:* <code>… [[#as|'''as''']] <origin: target> <''chainedCommand: ExecuteChainedOption_0''></code>
::* <code>… [[#at|'''at''']] <''targets''> -> ''execute''</code>
+
:* <code>… [[#at|'''at''']] <origin: target> <''chainedCommand: ExecuteChainedOption_0''></code>
::* <code>… [[#facing|'''facing''']] (<''pos''>|entity <''targets''> (''eyes|feet'')) -> ''execute''</code>
+
:* <code>… [[#facing|'''facing''']] . . .</code>
::* <code>… [[#in|'''in''']] <''dimension''> -> ''execute''</code>
+
:** <code>… <position: x y z> <''chainedCommand: ExecuteChainedOption_0''></code>
::* <code>… [[#positioned|'''positioned''']] (<''pos''>|as <''targets''>) -> ''execute''</code>
+
:** <code>… entity <origin: target> <eyes|feet> <''chainedCommand: ExecuteChainedOption_0''></code>
::* <code>… [[#rotated|'''rotated''']] (<''rot''>|as <''targets''>) -> ''execute''</code>
+
:* <code>… [[#in|'''in''']] <dimension: Dimension> <''chainedCommand: ExecuteChainedOption_0''></code>
::* <code>… [[#store|'''store''']] (''result|success'') . . .</code>
+
:* <code>… [[#positioned|'''positioned''']] . . .</code>
::**<code>… block <''targetPos''> <''path''> (''byte|short|int|long|float|double'') <''scale''> -> ''execute''</code>
+
:** <code>… <position: x y z> <''chainedCommand: ExecuteChainedOption_0''></code>
::** <code>… bossbar <''id''> (''max|value'') -> ''execute''</code>
+
:** <code>… as <origin: target> <''chainedCommand: ExecuteChainedOption_0''></code>
::** <code>… entity <''target''> <''path''> (''byte|short|int|long|float|double'') <''scale''> -> ''execute''</code>
+
:* <code>… [[#rotated|'''rotated''']] . . .</code>
::** <code>… score <''targets''> <''objective''> -> ''execute''</code>
+
:** <code>… <yaw: value> <pitch: value> <''chainedCommand: ExecuteChainedOption_0''></code>
::**<code>… storage <''target''> <''path''> (''byte|short|int|long|float|double'') <''scale''> -> ''execute''</code>
+
:** <code>… as <origin: target> <''chainedCommand: ExecuteChainedOption_0''></code>
::* <code>… ([[#if|'''if''']]|[[#unless|'''unless''']]) . . .</code>
+
:* <code>… '''<subcommand: Option_'''[[#if|'''If''']]'''_'''[[#unless|'''Unless''']]'''>''' . . .</code>
::** <code>… block <''pos''> <''block''> -> [''execute'']</code>
+
:** <code>… block <position: x y z> <block: Block> . . .</code>
::** <code>… blocks <''start''> <''end''> <''destination''> (''all|masked'') -> [''execute'']</code>
+
:*** <code>… <blockStates: block states> [''chainedCommand: ExecuteChainedOption_0'']</code>
::** <code>… data . . .</code>
+
:*** <code>… [''chainedCommand: ExecuteChainedOption_0'']</code>
::*** <code>… block <''sourcePos''> <''path''> -> [''execute'']</code>
+
:** <code>… blocks <begin: x y z> <end: x y z> <destination: x y z> <scan mode: BlocksScanMode> [''chainedCommand: ExecuteChainedOption_0'']</code>
::*** <code>… entity <''source''> <''path''> -> [''execute'']</code>
+
:** <code>… entity <target: target> [''chainedCommand: ExecuteChainedOption_0'']</code>
::*** <code>… storage <''source''> <''path''> -> [''execute'']</code>
+
:** <code>… score <target: target> <objective: string> . . .</code>
::** <code>… entity <''entities''> -> [''execute'']</code>
+
:***<code>… <operation: compare operator> <source: target> <objective: string> [''chainedCommand: ExecuteChainedOption_0'']</code>
::** <code>… predicate <''predicate''> -> [''execute'']</code>
+
:*** <code>… matches <range: integer range> [''chainedCommand: ExecuteChainedOption_0'']</code>
::** <code>… score <''target''> <''targetObjective''> . . .</code>
+
:* <code>… [[#run|'''run''']] <''command: command''></code>
  +
: where <code>chainedCommand: ExecuteChainedOption_0</code> represents the start of another subcommand.
::*** <code>… (''<|<=|=|>|>='') <''source''> <''sourceObjective''> -> [''execute'']</code>
 
::*** <code>… matches <''range''> -> [''execute'']</code>
 
::* <code>… [[#run|'''run''']] <''command''></code>
 
: … where <code>-> ''execute''</code> represents the start of another execution instruction. A number of instructions can be strung end-to-end, where <code>run</code> is the only instruction that can terminate the command—an exception is that including the <code>if</code> or <code>unless</code> instructions allow this terminator to be left out.
 
   
  +
=== Modify subcommands ===
; Details
 
   
  +
==== align ====
: There are 11 chainable instructions—9 instructions that modify command variables and 2 conditional instructions—and a final <code>run</code> instruction for carrying out some following command. A number of instructions can be chained together, but <code>run</code> finalizes the command. The simplest usage for this command is: <code>/execute run <command></code>.
 
  +
: Updates the ''execution position'', aligning to its current [[Coordinates#Block position|block position]] (an integer). Applies only along specified axes.
  +
: This is akin to {{Wikipedia|floor function|flooring}} the coordinates – i.e. rounding them downward.
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>align <axes> -> ''execute''</code>
  +
: {{el|bedrock}}:
  +
:: <code>align <axes: string> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:;Arguments
  +
:: {{Argument|axes|swizzle|axes: string|basic_string}}
  +
::: {{arg desc|je=swizzle}}
  +
:;Result
  +
:: ''Execution position'' in the given axes are floored, changing by less than 1 block.
  +
:: Unparseable if the argument is not specified correctly.
  +
:;Example
  +
:: Given (-1.8, 2.3, 5.9), <code>execute '''align xz'''</code> changes the position to (-2, 2.3, 5).
  +
:: Given (2.4, -1.1, 3.8), <code>execute '''align yxz''' run spawnpoint @p ~ ~ ~</code> sets the player's spawnpoint to (2, -2, 3).
   
  +
==== anchored ====
: Alternatively, using the conditional instructions <code>if</code> or <code>unless</code> without <code>run</code> is still valid syntax, in which case the result of the test is returned: <code>/execute if entity @e[name="Fred"]</code>
 
  +
: Sets the ''execution anchor'' to the eyes or feet. Defaults to feet.
  +
: Running <code>positioned <pos> -> execute</code> resets to feet
  +
: Effectively recenters [[Commands|local coordinates]] on either the eyes or feet, also changing the angle the <code>facing</code> subcommand (of {{cmd|execute|link=none}} and {{cmd|teleport}}) works off of.
  +
: See also {{bug|MCPE-162681}} and {{bug|MCPE-165051}} for issues about {{el|bedrock}}.
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>anchored <anchor> -> ''execute''</code>
  +
: {{el|bedrock}}:
  +
:: <code>anchored <eyes|feet> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:;Arguments
  +
:: {{Argument|anchor|entity_anchor|eyes{{!}}feet}}
  +
::: Whether to anchor the executed command to ''eyes'' or ''feet''
  +
::: Must be either <code>eyes</code> or <code>feet</code>.
  +
:;Result
  +
:: ''Execution anchor'' is set to either the eyes or the feet.
  +
:: Unparseable if the argument is not specified correctly.
  +
:;Example
  +
:: The effect of {{Command|tp}} is to move a target by placing its feet at the given position.
  +
:: <code>execute anchored eyes run tp ^ ^ ^</code> effectively teleports the executor's feet to where its eyes are.
  +
:: <code>execute anchored eyes run tp ^5 ^ ^</code> means "place the executor's feet 5 blocks left of where its eyes are"
   
  +
==== as ====
: The conditional instructions <code>if</code> and <code>unless</code> can prevent a command from running at all. All specified conditions must be met for the test to pass and the command to run.
 
  +
: Sets the ''executor'' to target entity, without changing ''execution position'', ''rotation'', ''dimension'', and ''anchor''.
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>as <targets> -> ''execute''</code>
  +
: {{el|bedrock}}:
  +
:: <code>as <origin: target> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:;Arguments
  +
:: {{Argument|targets|entity|origin: target|CommandSelector<Actor>}}
  +
::: Target entity/entities to become the new executor.
  +
::: {{arg desc|je=entity|amount=multiple|type=entities|be=CommandSelector<Actor>}}
  +
:;Result
  +
:: ''Executor'' is updated to target entity (which changes the meaning of <code>@s</code>).
  +
:: Unparseable if the argument is not specified correctly.
  +
:: Forks if <code><targets></code> or <code>origin: target</code> selects multiple entities.
  +
:: Terminates if <code><targets></code> or <code>origin: target</code> fails to resolve to one or more valid entities (named players must be online).
  +
:;Example
  +
:: Kill all sheep: <code>execute '''as @e[type=sheep]''' run kill @s</code>
  +
:: Make all villagers in loaded chunks invincible: <code>execute '''as @e[type=villager]''' run data merge entity @s {Invulnerable:1}</code>{{only|java}}
   
  +
==== at ====
: The 11 chainable instructions are:
 
  +
: Sets the ''execution position'', ''rotation'', and ''dimension'' to match those of an entity; does not change ''executor''.
# <code>… {{Text anchor|align}} <''axes''> -> ''execute''</code>
 
  +
:;Syntax
#: Align the current position to the block grid, rounding down (towards negative infinity).
 
  +
: {{el|java}}:
#: <code><''axes''></code>—Any non-repeating combination of the characters 'x', 'y', and 'z'. (For example, <code>x</code>, <code>xz</code>, <code>zyx</code>, or <code>yz</code>.)
 
  +
:: <code>at <targets> -> ''execute''</code>
#: ''Example:'' Given the position (-1.8, +2.3, +5.9), the command "/execute align xz run summon zombie ~ ~ ~" summons a zombie at (-2.0, +2.3, +5.0).
 
  +
: {{el|bedrock}}:
#: ''Example:'' Given (+2.4, -1.1, +3.8), using "/execute align yxz run spawnpoint @p ~ ~ ~" sets the player's spawnpoint to (2, -2, 3).
 
# <code> {{Text anchor|anchored}} (''feet|eyes'') -> ''execute''</code>
+
:: <code>at <origin: target> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:;Arguments
#: Stores the distance from the feet to the eyes of the entity that is executing the command in the anchor, which is part of the command context.
 
  +
:: {{Argument|targets|entity|origin: target|CommandSelector<Actor>}}
#:The only places where the anchor is used is in the caret notation (<code>^ΔT ^ΔN ^ΔB</code>) and in the <code>facing</code> subcommand of the <code>execute</code> command, which behave as if the executing position was shifted upwards by the stored value.
 
  +
::: Target entity/entities to match position, rotation, and dimension with.
#:
 
  +
::: {{arg desc|je=entity|amount=multiple|type=entities|be=CommandSelector<Actor>}}
# <code>… {{Text anchor|as}} <''targets''> -> ''execute''</code>
 
  +
:;Result
#: Execute the command as the targeted entity/entities, but does not change position. If an entity doesn't have an eye anchor point, the command anchors to the feet of the previous executor (not the specified entity).
 
  +
:: ''Execution position, rotation,'' and ''dimension'' are updated to match target entity.
#: [''These details need fact checking! These statements seem conflicting.''{{cn}}]
 
  +
:: Unparseable if the argument is not specified correctly.
#: Changes the function of the <code>@s</code> target selector variable
 
  +
:: Forks if <code><targets></code> or <code>origin: target</code> selects multiple entities.
# <code>… {{Text anchor|at}} <''target''> -> ''execute''</code>
 
  +
:: Terminates if <code><targets></code> or <code>origin: target</code> fails to resolve to one or more valid entities (named players must be online).
#: Use the position, rotation, and dimension of the target, but does not change the current executing entity (<code>@s</code>).
 
  +
:;Example
#: Changes the function of <code>~Δx ~Δy ~Δz</code> and <code>^ΔT ^ΔN ^ΔB</code> positioning
 
  +
:: Move all sheep upward 1 block: <code>execute as @e[type=sheep] '''at @s''' run tp ~ ~1 ~</code>
# <code>… {{Text anchor|facing}} (<''pos''>|entity <''target''> (''eyes|feet'')) -> ''execute''</code>
 
  +
:: Kill the player running the command, because "<code>at</code>" does not change the executor: <code>execute '''at @e[type=sheep]''' run kill @s</code>
#: Use an execution position that faces either the given position or the targeted entity's eyes or feet.
 
#: Changes the function of <code>^ΔT ^ΔN ^ΔB</code> positioning
 
# <code>… {{Text anchor|in}} <''dimension''> -> ''execute''</code>
 
#: Execute as though the executor is in the given dimension.
 
#: Changes command dimension, but does not affect X- Y- Z-positions
 
#: <code><''dimension''></code>—The standard dimensions in the Minecraft namespace are "overworld", "the_nether", and "the_end".
 
# <code>… {{Text anchor|positioned}} (<''pos''>|as <''targets''>) -> ''execute''</code>
 
#: Use either the given coordinates or the targeted entity's coordinates for the "current position."
 
#: Changes the function of <code>^ΔT ^ΔN ^ΔB</code> and <code>~Δx ~Δy ~Δz</code> positioning. Does not change rotation, dimension, or target of <code>@s</code>.
 
# <code>… {{Text anchor|rotated}} (<''rot''>|as <''targets''>) -> ''execute''</code>
 
#: Execute as though the executor is rotated either in the given direction or the same the targeted entity is facing.
 
#: Changes command rotation
 
# <code>… {{Text anchor|store}} (''result|success'') (''block|bossbar|entity|score|storage'') <''arguments''> -> ''execute''</code>
 
#: Store the result or success of a command somewhere. This instruction replaced the "/[[Commands/stats|stats]]" command.
 
#: <code>result</code>—Return the result of the command. (This replaces the old stats AffectedBlocks, AffectedEntities, AffectedItems, QueryResult.)
 
#: <code>success</code>—Return how many times the command was successful. This is usually <code>0</code> or <code>1</code>, but if the command split up (as perhaps with "/execute as @a -> ''execute''") then success can be a number higher than <code>1</code>. (This replaces the old stat SuccessCount.)
 
#: If a command fails, "success" and "result" both return <code>0</code>. The return value is stored when the full command has finished executing.
 
#* <code>… block <''pos''> <''path''> (''byte|short|int|long|float|double'') <''scale''> -> ''execute''</code>
 
#*: Saves the return value in NBT data at the given block position.
 
#*: <code><''path''></code>—Name of the data tag to save return value in. ''See [[#ifunlessdata|10. <code>(if|unless) data</code>]] below for more details.''
 
#* <code>… bossbar <''id''> (''value|max'') -> ''execute''</code>
 
#*: Saves the return value in either the current value or the maximum value of the given bossbar
 
#*: <code><''id''></code>—ID of the bossbar to store return value in.
 
#*: <code>value</code>—Specifies that the bossbar's "value" is to be overwritten with the execution's return value
 
#*: <code>max</code>—Specifies that the bossbar's "max" is to be overwritten with the execution's return value
 
#* <code>… entity <''target''> <''path''> (byte|short|int|long|float|double) <''scale''> -> ''execute''</code>
 
#*: Use the data tag <code>path</code> from one targeted entity to save the return value. Store as a byte, short, int, long, float, or double.
 
#*: Like the "/[[Commands/data|data]]" command, "/execute store <''arguments''>" cannot modify [[Player.dat format|player NBT]].
 
#* <code>… score <''name''> <''objective''> -> ''execute''</code>
 
#*: Use the scoreboard under <''name''> and <''objective''> to save the return value.
 
#*: <''objective''> must exist, but unlike with "/[[Commands/stats|stats]]" you don't need to set an initial value for <''name''>.
 
#* <code>… storage <''target''> <''path''> (''byte|short|int|long|float|double'') <''scale''> -> ''execute''</code>
 
#*: Uses the <''path''> within [[Command storage|storage]] <''target''> to store the return value in.
 
#*: If the storage does not yet exist, it will be created.
 
#*: <code><''target''></code>—Target storage container, as a [[Namespaced ID|namespaced ID]].
 
#*: <code><''path''></code>—Name of the data tag to save return value in. ''See [[#ifunlessdata|10. <code>(if|unless) data</code>]] below for more details.''
 
# <code>… '''(if|unless)''' (''block|blocks|data|entity|predicate|score'') <''arguments''> -> [''execute'']</code>{{Anchor|if}}{{Anchor|unless}}
 
#: Test for some condition before choosing whether to carry out the command.
 
#*<code>… block <''pos''> <''block''> -> [''execute'']</code>
 
#*: Compares the block at the given position to the given block ID
 
#* <code>… blocks <''start''> <''end''> <''destination''> (''all|masked'') -> [''execute'']</code>
 
#*: Compare region between the <''start''> and <''end''> positions to the area starting at the <destination> position. The calculation of the areas as well as the <code>all|masked</code> argument work in the same way as they do in the {{Command|clone}} command.
 
#* <code>… data (block <''pos''>|entity <''target''>|storage <''source''>) <''path''> -> [''execute'']</code>{{Anchor|ifunlessdata}}
 
#*: Execute if or unless the targeted block, entity or [[Command storage|storage]] has any data for the tag named by <''path''>.
 
#*: <code><''path''></code>—Names an NBT to check for. This is a string of parent tag names of the Java-like form <code>highestTag.child.childsChild…parent.targetDataTag</code>.
 
#*:: '''''See [[Commands/data#NBT path]] for more on paths'''''
 
#*: ''Example:'' <code>/execute as @e if data entity @s ArmorItems[0].id</code> would test for if any entity has an "id" for the item in their boot armor slot. Note that this returns true for all mobs, armored or not.
 
#* <code>… entity <''targets''> -> [''execute'']</code>
 
#*: Execute if or unless one or more <''targets''> exist.
 
#* <code>… predicate <''predicate''> -> [''execute'']</code>
 
#*: Execute if or unless the <''predicate''> evaluates to a positive result.
 
#*: '''''See [[Predicate]] for more on predicates'''''
 
#* <code>… score <''target''> <''targetObjective''> (''<|<=|=|>=|>'') <''source''> <''sourceObjective''> -> [''execute'']</code>
 
#*: Execute if or unless the target entity's score accurately relates to source entity's score, given some conditional operator.
 
#* <code>… score <''target''> <''targetObjective''> matches <''range''> -> [''execute'']</code>
 
#*: Execute if or unless target entity's score is within given range (e.g. <code>1</code>, <code>1..5</code>).
 
# <code>unless <''arguments''> -> [''execute'']</code>
 
#:''See [[#if|10. <code>(if|unless)</code>]] above.''
 
   
  +
==== facing ====
:Beyond those 11 instructions, there's the <code>run</code> instruction.
 
  +
: Sets the ''execution rotation'' to face a given point, as viewed from its anchor (either the eyes or the feet).
:* <code>… {{Text anchor|run}} <''command''></code>
 
  +
:;Syntax
:*: Specifies the command to be executed, the variables of which may be modified by the subcommands used.
 
  +
: {{el|java}}:
:*: Can be any [[Commands#List and summary of commands|Minecraft command]]
 
  +
:: <code>facing <pos> -> ''execute''</code>
:*: ''Technical:'' Resets the command node to the root of the [[Brigadier|command dispatcher]]
 
  +
:: <code>facing entity <targets> <anchor> -> ''execute''</code>
:*::;Modelling commands as chat text...
 
  +
: {{el|bedrock}}:
:*::: The '''command dispatcher''' is what starts when the player begins a message with a forward-slash (<code>/</code>).
 
  +
:: <code>facing <position: x y z> <''chainedCommand: ExecuteChainedOption_0''></code>
:*::: A '''command node''' is the specific word/entry your cursor is editing, either a command or an argument.
 
  +
:: <code>facing entity <origin: target> <eyes|feet> <''chainedCommand: ExecuteChainedOption_0''></code>
:*::: The '''root node''' comes before the first word in your command.
 
  +
:;Arguments
  +
:: '''Option:''' ''<code>facing <pos></code>'' and ''<code>facing <position: x y z></code>''
  +
::: {{Argument|pos|vec3|position: x y z|CommandPositionFloat}}
  +
:::: Coordinates to rotate toward
  +
:::: {{arg desc|je=vec3|be=CommandPositionFloat}}
  +
:: '''Option:''' ''<code>facing entity <targets> <anchor></code>'' and ''<code>facing entity <origin: target> <eyes|feet></code>''
  +
::: {{Argument|targets|entity|origin: target|CommandSelector<Actor>}}
  +
:::: The target(s) to rotate toward
  +
:::: {{arg desc|je=entity|amount=multiple|type=entities|be=CommandSelector<Actor>}}
  +
::: {{Argument|anchor|entity_anchor|eyes{{!}}feet}}
  +
:::: Whether to point at the target's ''eyes'' or ''feet''
  +
:::: Must be either <code>eyes</code> or <code>feet</code>.
  +
:;Result
  +
:: ''Execution rotation'' is updated to face given position or targets.
  +
:: Unparseable if the argument is not specified correctly.
  +
:: Forks if <code><targets></code> or <code>origin: target</code> selects multiple entities.
  +
:: Terminates if <code><targets></code> or <code>origin: target</code> fails to resolve to one or more valid entities (named players must be online).
  +
:;Example
  +
:: Executor rotates once to the left: <code>execute facing ^1 ^ ^ run tp @s ~ ~ ~ ~ ~</code>
  +
:: All entities move one block in the direction of (0, 64, 0) (without changing their rotation): <code>execute as @e at @s '''facing 0 64 0''' run tp @s ^ ^ ^1</code>
  +
:: All entities move one block in the direction of (0, 64, 0) (with changing their rotation): <code>execute as @e at @s '''facing 0 64 0''' run tp ^ ^ ^1 ~ ~</code>
  +
:: All non player entities move one space in the direction of their nearest player (without changing their rotation): <code>execute as @e[type=!player] at @s '''facing entity @p feet''' run tp @s ^ ^ ^1</code>
   
  +
==== in ====
; Examples
 
  +
: Sets the ''execution dimension'' and ''position''.
  +
: It respects dimension scaling for relative and local coordinates: the ''execution position'' (only the X/Z part) is divided by 8 when changing from the Overworld to the Nether, and is multiplied by 8 when vice versa. Applies to [[custom dimension]]s as well.
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>in <dimension> -> ''execute''</code>
  +
: {{el|bedrock}}:
  +
:: <code>in <dimension: Dimension> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:;Arguments
  +
:: {{Argument|dimension|dimension|dimension: Dimension|enum}}
  +
::: Name of the new execution dimension
  +
::: {{arg desc|je=dimension|be=enum}}
  +
:;Result
  +
:: ''Execution dimension'' and ''position'' is updated.
  +
:: Unparseable if the argument is not specified correctly.
  +
:;Example
  +
:: Looking for an end city (from the overworld):
  +
:::* <code>execute '''in minecraft:the_end''' run locate structure minecraft:end_city</code>{{only|java}}
  +
:::* <code>execute '''in the_end''' run locate structure end_city</code>{{only|bedrock}}
  +
:: If a player at position {{cd|(16,64,16)}} in Overworld runs the following command, the player is teleported to {{cd|(16,64,16)}} in the Nether:
  +
:::* <code>execute '''in minecraft:the_nether''' positioned as @s run tp ~ ~ ~</code>{{only|java}}
  +
:::* <code>execute '''in nether''' positioned as @s run tp ~ ~ ~</code>{{only|bedrock}}
  +
:: If a player at position {{cd|(16,64,16)}} in Overworld runs the following command, the player is teleported to {{cd|(2,64,2)}} in the Nether.
  +
:::* <code>execute '''in minecraft:the_nether''' run tp ~ ~ ~</code>{{only|java}}
  +
:::* <code>execute '''in nether''' run tp ~ ~ ~</code>{{only|bedrock}}
  +
:: If a player at position {{cd|(80,64,80)}} in Overworld runs the following command, the player is teleported to {{cd|(10,64,15)}} in the Nether.
  +
::* <code>execute '''in minecraft:the_nether''' run tp ~ ~ ~5</code>{{only|java}}
  +
::* <code>execute '''in nether''' run tp ~ ~ ~5</code>{{only|bedrock}}
   
  +
==== on ====
* <code>/execute at @a anchored eyes run particle smoke ^ ^ ^3</code>
 
  +
{{exclusive|section=1|java}}
* <code>/execute as @e[type=pig] at @s store success entity @s Saddle byte 1 if entity @p[distance=..5]</code>
 
  +
: Updates the ''executor'', selecting entities based on relation to the current executor entity (changing the original ''executor''), without changing ''execution position'', ''rotation'', ''dimension'', and ''anchor''.
* <code>/execute as @a at @s if block ~ ~ ~ water run say "My feet are soaked!"</code>
 
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>on <''relation''> -> ''execute''</code>
  +
:;Arguments
  +
:: {{el|je|short=1}}: {{Argument|''relation''|}}
  +
::: A relation of the current executor entity
  +
:::* <code>attacker</code>: the last entity that damaged the current executor entity in the previous 5 seconds. Note that damage types in <code>minecraft:no_anger</code> tag bypass the record of attacker. [[Interaction]] entities do not forget attacker after 5 seconds. Some mobs forget the attacker when stoping angry.
  +
:::* <code>controller</code>: the entity that is riding and controlling the current executor entity. See [[Riding#Controlling]] for details.
  +
:::* <code>leasher</code>: the entity leading the current executor entity with a leash.
  +
:::* <code>origin</code>: the entity that cause the summon of the current executor entity. For example, the shooter of an arrow, the primer of a primed TNT entity.
  +
:::* <code>owner</code>: the owner of the current executor entity if it is a tameable animal.
  +
:::* <code>passengers</code>: all entities that are directly riding the current executor entity, no sub-passengers.
  +
:::* <code>target</code>: the attack target of the current executor entity. [[Interaction]] entities can select the last entity that interacted with them.
  +
:::* <code>vehicle</code>: the entity ridden by the current executor entity.
  +
:;Result
  +
:: ''Executor'' is updated based on the relation with the executor entity (which changes the meaning of <code>@s</code>).
  +
:: Forks if <code>passengers</code> selects multiple entities. (Other relations can select only at most one entities.)
  +
:: Terminates if current executor is not an entity.
  +
:: Terminates if the relation is not applicable to the current executor entity or there are no entities matching it.
  +
:;Example
  +
:: Damage 1 heart the entity that is leashing a cat: <code>execute as @e[type=cat] '''on leasher''' run damage @s 2 generic</code>
  +
:: Give all players riding a boat a fishing rod: <code>execute as @e[type=boat] '''on passengers''' run give @s fishing_rod</code>
   
== Bedrock Edition ==
+
==== positioned ====
  +
: Sets the ''execution position'', without changing ''execution rotation'' or ''dimension''; can match an entity's position, or at one block above the Y-level stored in the specified [[heightmap]]{{only|java|short=1}}.
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>positioned <pos> -> ''execute''</code>
  +
:: <code>positioned as <targets> -> ''execute''</code>
  +
:: <code>positioned over <heightmap> -> ''execute''</code>
  +
: {{el|bedrock}}:
  +
:: <code>positioned <position: x y z> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:: <code>positioned as <origin: target> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:;Arguments
  +
:: '''Option:''' ''<code>positioned <pos></code>'' or ''<code>positioned <position: x y z></code>''
  +
::: {{Argument|pos|vec3|position: x y z|CommandPositionFloat}}
  +
:::: New position
  +
:::: {{arg desc|je=vec3|be=CommandPositionFloat}}
  +
:: '''Option:''' ''<code>positioned as <targets></code>'' or ''<code>positioned as <origin: target></code>''
  +
::: {{Argument|targets|entity|origin: target|CommandSelector<Actor>}}
  +
:::: Target entity/entities to match position with
  +
:::: {{arg desc|je=entity|amount=multiple|type=entities|be=CommandSelector<Actor>}}
  +
:: '''Option:'' <code>positioned over <heightmap></code>'''
  +
::: {{el|je|short=1}}: {{Argument|heightmap|heightmap}}
  +
:::: Specifies the [[heightmap]]
  +
:::: Must be one of <code>world_surface</code>, <code>motion_blocking</code>, <code>motion_blocking_no_leaves</code>, and <code>ocean_floor</code>.
  +
:;Result
  +
:: ''Execution position'' is updated. And <code>positioned <pos></code> also resets ''execution anchor'' to feet.
  +
:: Unparseable if the argument is not specified correctly.
  +
:: Forks if <code><targets></code> or <code>origin: target</code> selects multiple entities.
  +
:: Terminates if <code><targets></code> or <code>origin: target</code> fails to resolve to one or more valid entities (named players must be online).
  +
:: When multiple entities are selected, next sub-command is executed once in each execution position.
  +
:;Example
  +
:: Look for a village near (0, 64, 0):
  +
:::* <code>execute '''positioned 0 64 0''' run locate structure #village</code>{{only|java}}
  +
:::* <code>execute '''positioned 0 64 0''' run locate structure village</code>{{only|bedrock}}
   
  +
==== rotated ====
; Syntax
 
  +
: Sets the ''execution rotation''; can match an entity's rotation.
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>rotated <rot> -> ''execute''</code>
  +
:: <code>rotated as <targets> -> ''execute''</code>
  +
: {{el|bedrock}}:
  +
:: <code>rotated <yaw: value> <pitch: value> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:: <code>rotated as <origin: target> <''chainedCommand: ExecuteChainedOption_0''></code>
  +
:;Arguments
  +
:: '''Option:''' ''<code>rotated <rot></code>'' or ''<code>rotated <yaw: value> <pitch: value></code>''
  +
::: {{el|je|short=1}}: {{Argument|rot|rotation}} (<code><yaw> <pitch></code>)
  +
::: {{el|be|short=1}}: {{Argument|be=1|yaw: value|RelativeFloat}} and {{Argument|be=1|pitch: value|RelativeFloat}}
  +
:::: Angles of rotation
  +
:::: {{arg desc|je=rotation|be=RelativeFloat}}
  +
:: '''Option:''' ''<code>rotated as <targets></code>'' or ''<code>rotated as <origin: target></code>''
  +
::: {{Argument|targets|entity|origin: target|CommandSelector<Actor>}}
  +
:::: Target entity/entities to match rotation with
  +
:::: {{arg desc|je=entity|amount=multiple|type=entities|be=CommandSelector<Actor>}}
  +
:;Result
  +
:: ''Execution rotation'' is updated.
  +
:: Unparseable if the argument is not specified correctly.
  +
:: Forks if <code><targets></code> or <code>origin: target</code> selects multiple entities.
  +
:: Terminates if <code><targets></code> or <code>origin: target</code> fails to resolve to one or more valid entities (named players must be online).
  +
:;Example
  +
:: Move every sheep 1 block in the direction that the player closest to it is facing: <code>execute as @e[type=sheep] <u>at @s</u>OR<u>positioned as @s</u> '''rotated as @p''' run tp @s ^ ^ ^1</code>
   
  +
==== summon ====
: <code>execute <''origin: target''> <span style="background-color:#FDD"><''position: x y z''></span> <''command: command''></code>
 
  +
{{exclusive|section=1|java}}
: An alternate syntax allows the command to be executed only if a specific block is detected:
 
  +
: ''Summons'' a new entity at execution position and changes the ''executor'' to this summoned entity.
: <code>execute <''origin: target''> <span style="background-color:#FDD"><''position: x y z''></span> detect <span style="background-color:#DDF"> <''detectPos: x y z''></span> <''block: Block''> <''data: int''> <''command: command''></code>
 
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>summon <entity> -> ''execute''</code>
  +
:;Arguments
  +
:: {{el|je|short=1}}: {{Argument|entity|resource}}
  +
::: Entity to be summon and the new executor
  +
::: {{arg desc|je=resource|registry=minecraft:entity_type}}
  +
:;Result
  +
:: ''Summons'' the entity and changes the ''executor''.
  +
:: Unparseable if the argument is not specified correctly.
  +
:;Example
  +
:: Summon a sheep with the tag "Test": <code>execute '''summon sheep''' run tag ''@s'' add Test</code>
  +
:: Summon a block display entiy and scale it: <code>execute '''summon block_display''' run data merge entity ''@s'' {transformation:{scale:[4.0,4.0,4.0]},block_state:{Name:"minecraft:dirt"}}</code>
   
  +
{{Anchor|if}}{{Anchor|unless}}
''Color added to make reading easier.''
 
   
  +
=== Condition subcommands ===
;Arguments
 
  +
The particular use of the <code>if</code> and <code>unless</code> subcommands are to restrict command execution to happen only under specified conditions. In most cases, <code>unless</code> is a negation of <code>if</code>, equivalent to "if not...". The two commands have identical argument structures.
   
  +
;Result of condition subcommands:
: ''origin: target''
 
  +
: Unparseable if the argument is not specified correctly.
:: Specifies the target to be the command's executor. Must be a player name or [[#Target selectors|target selector]]. If more than one entity is selected, the command will be run once as each of them.
 
  +
: In some cases, for example, testing a block outside the world, both <code>if</code> and <code>unless</code> terminates or fails.
: <span style="background-color:#FDD">''position: x y z''</span>
 
  +
: When not at the end of the subcommands chain, only if the condition tests pass does the branch continue; otherwise it terminates.
:: Specifies the position from which to run the command. ''x'' and ''z'' must be within the range [[World boundary|-30,000,000 to 30,000,000]] (inclusive). Coordinates specified with [[#Tilde notation|tilde notation]] are relative to the target, not to the position of the command's execution.
 
  +
:: {{IN|java}}, if it is executed in multiple branches, it acts as a context filter - Only branchs with a context that matches the condition continues.
: ''command: command''
 
  +
: When at the end of the subcommands chain, it checks whether the condition is met and then outputs. {{IN|java}}, it has output values that can be stored by store subcommands.
:: Specifies the command to be run. Must be a valid command.
 
: <span style="background-color:#DDF">''detectPos: x y z''</span> (<code>detect</code> mode only)
 
:: Specifies the position of the block to check. ''x2'' and ''z2'' must be within the range [[World boundary|-30,000,000 to 30,000,000]] (inclusive). May use [[#Tilde notation|tilde notation]] to specify distances relative to (''x'',''y'',''z'').
 
: ''block: Block'' (<code>detect</code> mode only)
 
:: Specifies the [[Data values#Block IDs|block ID]] which the block at (''x2'',''y2'',''z2'') must match for the command to run. ''block'' must be a valid block id (for example, <code>stone</code>)
 
: ''data: int'' (<code>detect</code> mode only)
 
:: Must be a valid block data for that type of block or <code>-1</code> to match any block data.
 
   
  +
There are nine{{only|java|short=1}} / four{{only|bedrock|short=1}} different types of conditions:
;Result
 
  +
# [[#ifunlessbiome|(if|unless) biome]] – Tests a biome area{{only|java}}
  +
# [[#ifunlessblock|(if|unless) block]] – Tests a single real block
  +
# [[#ifunlessblocks|(if|unless) blocks]] – Tests a real 3D rectangular volume against another
  +
# [[#ifunlessdata|(if|unless) data]] – Tests the data held by a real block, entity, or a storage{{only|java}}
  +
# [[#ifunlessdimension|(if|unless) dimension]] - Tests the dimension of the execution{{only|java}}
  +
# [[#ifunlessfunction|(if|unless) function]] – Tests a function{{info needed}}{{upcoming|java 1.20.2}}
  +
# [[#ifunlessentity|(if|unless) entity]] – Tests whether an entity like the one given is real
  +
# [[#ifunlessloaded|(if|unless) loaded]] - Tests if a given position is loaded in the world{{only|java}}
  +
# [[#ifunlesspredicate|(if|unless) predicate]] – Tests a predicate{{only|java}}
  +
# [[#ifunlessscore|(if|unless) score]] - Tests a target's score
   
  +
{{anchor|ifunlessbiome}}
: Fails if arguments are not specified correctly, if <entity> fails to resolve to one or more valid entities (named players must be online), if the checked block is not of the correct block id, data or state, or if the specified command fails.
 
: On success, executes the specified command as if executed by the specified target(s), done with [[operator]]-level permission at the specified coordinate.
 
   
  +
==== (if|unless) biome ====
;Examples
 
  +
{{exclusive|section=1|java}}
  +
: Checks for a specific biome in a given position.
  +
:;Syntax
  +
:: <code>(if|unless) '''biome''' <pos> <biome> -> [''execute'']</code>
   
  +
:;Arguments
: To summon lightning bolts at the positions of every zombie:
 
  +
:: {{Argument|pos|block_pos}}
::<code>execute @e[type=zombie] ~ ~ ~ summon lightning_bolt</code>
 
  +
::: Position to test
: To summon lightning bolts at the positions of every zombie standing on any type of sand:
 
  +
::: {{arg desc|je=block_pos}}
::<code>execute @e[type=zombie] ~ ~ ~ detect ~ ~-1 ~ minecraft:sand -1 summon lightning_bolt</code>
 
  +
:: {{Argument|biome|resource_or_tag}}
: To summon 10 creepers at the nearest player's position (only works as long as there are at least 10 entities in the loaded world):
 
  +
::: Biome(s) to test for
::<code>execute @e[c=10] ~ ~ ~ execute @p ~ ~ ~ summon creeper ~ ~ ~</code>
 
  +
::: {{arg desc|je=resource_or_tag|registry=minecraft:worldgen/biome}}
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* If <code><pos></code> is unloaded or out of the world.
  +
::* If test doesn't pass.
  +
:: When at the end of the subcommands chain, if the command is successful, both <code>success</code> value and <code>result</code> value are 1.
  +
  +
{{anchor|ifunlessblock}}
  +
  +
==== (if|unless) block ====
  +
: Compares the block at a given position to a given block ID.
  +
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>(if|unless) '''block''' <pos> <block> -> [''execute'']</code>
  +
: {{el|bedrock}}:
  +
:: <code><subcommand: Option_If_Unless> '''block''' <position: x y z> <block: Block> [''chainedCommand: ExecuteChainedOption_0'']</code>
  +
:: <code><subcommand: Option_If_Unless> '''block''' <position: x y z> <block: Block> <blockStates: block states> [''chainedCommand: ExecuteChainedOption_0'']</code>
  +
  +
:;Arguments
  +
:: {{Argument|pos|block_pos|position: x y z|CommandPosition}}
  +
::: Position of a target block to test
  +
::: {{arg desc|je=block_pos|be=CommandPosition}}
  +
:: {{Argument|block|block_predicate|block: Block|enum}}
  +
::: Specifies the block to test for
  +
::: {{arg desc|je=block_predicate|be=Block}}
  +
:: {{el|bedrock|short=1}}: {{Argument|be=1|blockStates: block states|BlockStateCommandParam}}
  +
::: Specifies the block state for the specified block to test for
  +
::: {{arg desc|be=BlockStateCommandParam}}
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* If <code><pos></code> or <code>position: x y z</code> is unloaded or out of the world.
  +
::* If test doesn't pass.
  +
:: {{IN|java}}, when at the end of the subcommands chain, if the command is successful, both <code>success</code> value and <code>result</code> value are 1.
  +
  +
{{anchor|ifunlessblocks}}
  +
  +
==== (if|unless) blocks ====
  +
: Compares the blocks in two equally sized volumes.
  +
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>(if|unless) '''blocks''' <start> <end> <destination> (all|masked) -> [''execute'']</code>
  +
: {{el|bedrock}}:
  +
:: <code><subcommand: Option_If_Unless> '''blocks''' <begin: x y z> <end: x y z> <destination: x y z> <scan mode: BlocksScanMode> [''chainedCommand: ExecuteChainedOption_0'']</code>
  +
  +
:;Arguments
  +
:: {{Argument|start|block_pos|begin: x y z|CommandPosition}}
  +
:: {{Argument|end|block_pos|end: x y z|CommandPosition}}
  +
::: Positions of any two diagonal corners of the source volume (the volume to compare)
  +
::: {{arg desc|je=block_pos|be=CommandPosition}}
  +
:: {{Argument|destination|block_pos|destination: x y z|CommandPosition}}
  +
::: Position of the lower northwest corner of the destination volume (the volume to compare to)
  +
::: Assumed to be of the same size as the source volume
  +
::: {{arg desc|je=block_pos|be=CommandPosition}}
  +
:: {{el|je|short=1}}: {{code|(all{{!}}masked)}}
  +
:: {{el|be|short=1}}: {{Argument|be=1|scan mode: BlocksScanMode|enum}}
  +
::: Specifies whether ''all'' blocks in the source volume should be compared, or if air blocks should be ''masked/ignored''
  +
::: Must be either <code>all</code> or <code>masked</code>.
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at end of the subcommands chain; fails when at the end:
  +
::* If <code><start></code> / <code>begin: x y z</code>, <code><end></code> / <code>end: x y z</code>, or <code><destination></code> / <code>destination: x y z</code> is unloaded or out of the world.
  +
::* If the volume of the source region is greater than 32768 (the equivalent of 8 chunk sections)‌.
  +
::* If test doesn't pass.
  +
:: {{IN|java}}, when at the end of the subcommands chain, if the command is successful:
  +
::: The <code>success</code> value is 1.
  +
::: For <code>if</code> mode, <code>result</code> value is the number of matching blocks (the total number of blocks in <code>all</code> mode, or the number of source region non-air blocks in <code>masked</code> mode).
  +
::: For <code>unless</code> mode, <code>result</code> value is 1.
  +
  +
{{Anchor|ifunlessdata}}
  +
  +
==== (if|unless) data ====
  +
{{exclusive|section=1|java}}
  +
: Checks whether the targeted block, entity or [[Command storage|storage]] has any data tag for a given path.
  +
  +
:;Syntax
  +
:: <code>(if|unless) '''data''' block <pos> <path> -> [''execute'']</code> – for data checking a block
  +
:: <code>(if|unless) '''data''' entity <target> <path> -> [''execute'']</code> – for data checking an entity
  +
:: <code>(if|unless) '''data''' storage <source> <path> -> [''execute'']</code> – for data checking a storage
  +
  +
:; Arguments
  +
:: '''Option:''''' <code>(if|unless) data '''block <pos> <path></code>'''
  +
::: {{Argument|pos|block_pos}}
  +
:::: Position of the block for data testing
  +
:::: {{arg desc|je=block_pos}}
  +
::: {{Argument|path|nbt_path}}
  +
:::: Data path to check whether the block has
  +
:::: {{arg desc|je=nbt_path}}
  +
:: '''Option:''''' <code>(if|unless) data '''entity <target> <path></code>'''
  +
::: {{Argument|target|entity}}
  +
:::: A single entity for data testing
  +
:::: {{Arg desc|je=entity|amount=single|type=entities}}
  +
::: {{Argument|path|nbt_path}}
  +
:::: Data path to check whether the entity has
  +
:::: {{arg desc|je=nbt_path}}
  +
:: '''Option:''''' <code>(if|unless) data '''storage <source> <path></code>'''
  +
::: {{Argument|source|resource_location}}
  +
:::: The [[resource location]] of the storage for data testing
  +
:::: {{arg desc|je=resource_location}}
  +
::: {{Argument|path|nbt_path}}
  +
:::: Data path to check whether the storage has
  +
:::: {{arg desc|je=nbt_path}}
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* If <code><pos></code> is unloaded or out of the world.
  +
::* If block at <code><pos></code> isn't a block entity.
  +
::* If <code><target></code> fails to resolve to one or more valid entities (named players must be online).
  +
::* If test doesn't pass.
  +
:: When at the end of the subcommands chain, if the command is successful:
  +
::: The <code>success</code> value is 1.
  +
::: For <code>if</code> mode, <code>result</code> value is the number of matching data tags.
  +
::: For <code>unless</code> mode, <code>result</code> value is 1.
  +
  +
{{anchor|ifunlessdimension}}
  +
  +
==== (if|unless) dimension ====
  +
{{exclusive|section=1|java}}
  +
: Checks if the execution is in a matching dimension.
  +
  +
:;Syntax
  +
:: <code>(if|unless) '''dimension''' <dimension> -> [''execute'']</code>
  +
  +
:;Arguments
  +
:: {{Argument|dimension|dimension}}
  +
::: Dimension to test for
  +
::: {{arg desc|je=dimension}}
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* If test doesn't pass.
  +
:: When at the end of the subcommands chain, if the command is successful, both <code>success</code> value and <code>result</code> value are 1.
  +
  +
{{anchor|ifunlessfunction}}
  +
  +
==== (if|unless) function ====
  +
{{development|section=1|java}}
  +
: Checks a function or function tag and matches the return value(s). If a tag is given, all functions run regardless of the results of prior functions.{{info needed}}
  +
:;Syntax
  +
:: <code>(if|unless) '''function''' <function> -> [''execute'']</code>
  +
  +
:;Arguments
  +
:: {{Argument|function|function}}
  +
::: Function to test for
  +
::: {{arg desc|je=function}}
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* If the function or function tag doesn't exist.
  +
::* If test doesn't pass.
  +
:: {{info needed}}
  +
  +
{{anchor|ifunlessentity}}
  +
  +
==== (if|unless) entity ====
  +
: Checks whether one or more entities exist.
  +
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>(if|unless) '''entity''' <entities> -> [''execute'']</code>
  +
: {{el|bedrock}}:
  +
:: <code><subcommand: Option_If_Unless> '''entity''' <target: target> [''chainedCommand: ExecuteChainedOption_0'']</code>
  +
:;Arguments
  +
:: {{Argument|entities|entity|target: target|CommandSelector<Actor>}}
  +
::: The target entity/ies to test for
  +
::: {{arg desc|je=entity|amount=multiple|type=entities|be=CommandSelector<Actor>}}
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* If test doesn't pass.
  +
:: {{IN|java}}, when at the end of the subcommands chain, if the command is successful:
  +
::: The <code>success</code> value is 1.
  +
::: For <code>if</code> mode, <code>result</code> value is the number of matching entities.
  +
::: For <code>unless</code> mode, <code>result</code> value is 1.
  +
  +
{{anchor|ifunlessloaded}}
  +
  +
==== (if|unless) loaded ====
  +
{{exclusive|section=1|java}}
  +
: Checks if [[chunk]]s at a given position is fully loaded (Entity Ticking).
  +
  +
:;Syntax
  +
:: <code>(if|unless) '''loaded''' <pos> -> [''execute'']</code>
  +
:;Arguments
  +
:: {{Argument|pos|block_pos}}
  +
::: Position to test
  +
::: {{arg desc|je=block_pos}}
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* If <code><pos></code> is out of the world.
  +
::* If test doesn't pass.
  +
:: When at the end of the subcommands chain, if the command is successful, both <code>success</code> value and <code>result</code> value are 1.
  +
  +
{{anchor|ifunlesspredicate}}
  +
  +
==== (if|unless) predicate ====
  +
{{exclusive|section=1|java}}
  +
: Checks whether the predicate successes. See [[Predicate]] for more information.
  +
  +
:;Syntax
  +
:: <code>(if|unless) '''predicate''' <predicate> -> [''execute'']</code>
  +
:;Arguments
  +
:: {{Argument|predicate|resource_location}}
  +
::: The predicate to be checked whether it evaluates to a positive result
  +
::: {{Arg desc|je=resource_location}}
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* If the predicate doesn't exist.
  +
::* If test doesn't pass.
  +
:: When at the end of the subcommands chain, if the command is successful, both <code>success</code> value and <code>result</code> value are 1.
  +
  +
{{anchor|ifunlessscore}}
  +
  +
==== (if|unless) score ====
  +
: Check whether a score has the specific relation to another score, or whether it is in a given range.
  +
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>(if|unless) '''score''' <target> <targetObjective> (<|<=|=|>=|>) <source> <sourceObjective> -> [''execute'']</code> – for comparing two scores
  +
:: <code>(if|unless) '''score''' <target> <targetObjective> matches <range> -> [''execute'']</code> – for comparing one score against a range
  +
: {{el|bedrock}}:
  +
:: <code><subcommand: Option_If_Unless> '''score''' <target: target> <objective: string> <operation: compare operator> <source: target> <objective: string> [''chainedCommand: ExecuteChainedOption_0'']</code> - for comparing two scores
  +
:: <code><subcommand: Option_If_Unless> '''score''' <target: target> <objective: string> matches <range: integer range> [''chainedCommand: ExecuteChainedOption_0'']</code> - for comparing one score against a range
  +
  +
:;Arguments
  +
:: {{Argument|target|score_holder|target: target|CommandSelector<Actor>}}
  +
::: A single score holder
  +
::: {{IN|java}}, {{lcfirst:{{arg desc|je=score_holder}}}}
  +
::: {{IN|bedrock}}, {{lcfirst:{{arg desc|be=CommandSelector<Actor>}}}} It can also be quoted unique id to specified non-player entities in the objective.
  +
:: {{Argument|targetObjective|objective|objective: string|basic_string}}
  +
::: The scoreboard objective to check under. The score of <target> or <target: target> in this objective is checked
  +
::: {{arg desc|je=objective|be=basic_string}}
  +
:: '''Option:''' ''<code>(if|unless) score ... '''(<|<=|=|>=|>)''' ...</code>'' and ''<code><subcommand: Option_If_Unless> score ... '''<operation: compare operator>''' ...</code>''
  +
::: {{el|java|short=1}}: <code>(<|<=|=|>=|>)</code>
  +
::: {{el|bedrock|short=1}}: {{Argument|be=1|operation: compare operator|enum}}
  +
:::: Specifies a compare operator
  +
:::: Must be one of <code><</code>, <code><=</code>, <code>=</code>, <code>>=</code>, and <code>></code>.
  +
::: {{Argument|source|score_holder|source: target|CommandSelector<Actor>}}
  +
:::: A single score holder to compare against
  +
:::: {{IN|java}}, {{lcfirst:{{arg desc|je=score_holder}}}}
  +
:::: {{IN|bedrock}}, {{lcfirst:{{arg desc|be=CommandSelector<Actor>}}}} It can also be quoted unique id to specified non-player entities in the objective.
  +
::: {{Argument|sourceObjective|objective|objective: string|basic_string}}
  +
:::: A scoreboard objective. The score of <source> or <source: target> in this objective is checked
  +
:::: {{arg desc|je=objective|be=basic_string}}
  +
:: '''Option:''' ''<code>(if|unless) score ... '''matches''' ...</code>'' and ''<code><subcommand: Option_If_Unless> score ... '''matches''' ...</code>''
  +
::: {{Argument|range|int_range|range: integer range|CommandIntegerRange}}
  +
:::: Range to compare score against
  +
:::: {{arg desc|je=int_range|be=CommandIntegerRange}}
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  +
::* {{IN|java}}, if <code><target></code> / <code>target: target</code> or <code><source></code> / <code>source: target</code> is <code>*</code>.
  +
::* If test doesn't pass.
  +
:: {{IN|java}}, when at the end of the subcommands chain, if the command is successful, both <code>success</code> value and <code>result</code> value are 1.
  +
  +
==== Example ====
  +
: Kill all players standing on a wool:
  +
:* <code>execute as @a at @s '''if block ~ ~-1 ~ #wool''' run kill @s</code>{{only|java}}
  +
:* <code>execute as @a at @s '''if block ~ ~-1 ~ wool''' run kill @s</code>{{only|bedrock}}
  +
: Check whether scores A and B are equal: <code>execute '''if score @s A = @s B'''</code>
  +
  +
{{anchor|store}}
  +
  +
=== Store subcommand ===
  +
{{Exclusive|Java|section=1}}
  +
Store the final subcommand's <code>result</code> or <code>success</code> value somewhere. It is first processed along with other subcommands, recording the location to store in. After the last subcommand (may be a condition subcommand or a <code>run</code> subcommand) is executed, return values are stored in the recorded location. Note that the return values of commands must be an integer. If a decimal, it is rounded down.
  +
  +
There are five different modes of storage:
  +
# [[#storeblock|store (result|success) block]] – Store return value under one of a block's NBTs
  +
# [[#storebossbar|store (result|success) bossbar]] – Store return value as a bossbar data
  +
# [[#storeentity|store (result|success) entity]] – Store return value under one of an entity's NBTs
  +
# [[#storescore|store (result|success) score]] – Store return value under a target's score on an objective
  +
# [[#storestorage|store (result|success) storage]] – Store return value under one of a storage's NBTs
  +
  +
{{Anchor|storeblock}}
  +
  +
==== store (result|success) block ====
  +
: Saves the final command's return value as tag data within a block entity. Store as a byte, short, int, long, float, or double. If the return value is a decimal, it is rounded first and then multiplied by <code><scale></code>.
  +
  +
:;Syntax
  +
:: <code>store (result|success) '''block''' <targetPos> <path> <''type''> <scale> -> ''execute''</code>
  +
  +
:;Arguments
  +
:: {{Argument|targetPos|block_pos}}
  +
::: Position of target block
  +
:: {{Argument|path|nbt_path}}
  +
::: Location of the desired tag to hold the value in
  +
:: {{code|<''type''>}}
  +
::: Desired data size/type
  +
::: Must be one of <code>byte</code>, <code>short</code>, <code>int</code>, <code>long</code>, <code>float</code>, and <code>double</code>.
  +
:: {{Argument|scale|double}}
  +
::: Multiplier to apply before storing value, may be negative
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: Does not store anything when the path does not exist.
  +
  +
{{Anchor|storebossbar}}
  +
  +
==== store (result|success) bossbar ====
  +
: Saves the final command's return value in either a bossbar's current value or its maximum value
  +
  +
:;Syntax
  +
:: <code>store (result|success) '''bossbar''' <id> (value|max) -> ''execute''</code>
  +
:;Arguments
  +
:: {{Argument|id|resource_location}}
  +
::: ID of the bossbar to target for saving
  +
:: {{code|(value{{!}}max)}}
  +
::: Whether to overwrite the bossbar's ''current value'' or its ''max value''<!--TODO-->
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
  +
{{Anchor|storeentity}}
  +
  +
==== store (result|success) entity ====
  +
: Save the final command's return value in one of an entity's data tags. Store as a byte, short, int, long, float, or double. If the return value is a decimal, it is rounded first and then multiplied by <code><scale></code>. Like the {{cmd|data}} command, "/execute store <arguments>" cannot modify [[Player.dat format|player NBT]].
  +
  +
:;Syntax
  +
:: <code>store (result|success) '''entity''' <target> <path> <''type''> <scale> -> ''execute''</code>
  +
  +
:;Arguments
  +
:: {{Argument|target|entity}}
  +
::: A single entity to store under
  +
:: {{Argument|path|nbt_path}}
  +
::: Location of the desired tag to hold the value in
  +
:: {{code|<''type''>}}
  +
::: Desired data size/type
  +
::: Must be one of <code>byte</code>, <code>short</code>, <code>int</code>, <code>long</code>, <code>float</code>, and <code>double</code>.
  +
:: {{Argument|scale|double}}
  +
::: Multiplier to apply before storing value, may be negative
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
:: Does not store anything when the path does not exist.
  +
  +
{{Anchor|storescore}}
  +
  +
==== store (result|success) score ====
  +
: Overrides the score held by <code><targets></code> on the given <code><objective></code> with the final command's return value.
  +
  +
:;Syntax
  +
:: <code>store (result|success) '''score''' <targets> <objective> -> ''execute''</code>
  +
  +
:;Arguments
  +
:: {{Argument|targets|score_holder}}
  +
::: Specifies score holder(s) whose score is to be overridden
  +
:: {{Argument|objective|objective}}
  +
::: A scoreboard objective
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
  +
{{Anchor|storestorage}}
  +
  +
==== store (result|success) storage ====
  +
: Uses the {{cd|<path>}} within [[Command storage|storage]] {{cd|<target>}} to store the return value in. Store as a byte, short, int, long, float, or double. If the return value is a decimal, it is rounded first and then multiplied by {{cd|<scale>}}. If the storage does not yet exist, it gets created.
  +
  +
:;Syntax
  +
:: <code>store (result|success) '''storage''' <target> <path> <''type''> <scale> -> ''execute''</code>
  +
  +
:;Arguments
  +
:: {{Argument|target|resource_location}} (Single word)
  +
::: Target storage container, as a [[resource location]]
  +
:: {{Argument|path|nbt_path}}
  +
::: Location of the desired tag to hold the value in
  +
:: {{code|<''type''>}}
  +
::: Desired data size/type
  +
::: Must be one of <code>byte</code>, <code>short</code>, <code>int</code>, <code>long</code>, <code>float</code>, and <code>double</code>.
  +
:: {{Argument|scale|double}}
  +
::: Multiplier to apply before storing value, may be negative
  +
  +
:;Result
  +
:: Unparseable if the argument is not specified correctly.
  +
  +
{{Anchor|run}}
  +
  +
=== Run subcommand ===
  +
The {{Cd|run}} command's single argument is the command to be executed, the context variables of which may be modified by the subcommands used.
  +
  +
:;Syntax
  +
: {{el|java}}:
  +
:: <code>run --><''command''></code>
  +
: {{el|bedrock}}:
  +
:: <code>run <command: command></code>
  +
  +
:;Arguments
  +
:: {{el|je|short=1}}: <code><command></code>
  +
:: {{el|be|short=1}}: <code>command: command</code>
  +
::: Can be any [[Commands#List and summary of commands|command]]
  +
  +
:;Technical{{only|java}}
  +
:: Resets the command node to the root of the [[Brigadier|command dispatcher]]
  +
:: Information on modelling commands as chat text:
  +
::* The ''command dispatcher'' is what starts when the player begins a message with a forward-slash (<code>/</code>).
  +
::* A ''command node'' is the specific word/entry the cursor is editing, either a command or an argument.
  +
::* The ''root node'' comes before the first word in the current command.
  +
  +
:;Result
  +
:: Execute this command. Fails if <code><''command''></code> or <code>command: command</code> is failure.
  +
  +
=== More examples ===
  +
* Teleport all players who have an item enchanted with [[Efficiency]] in their first hotbar slot to coordinates (0, 64, 0):
  +
*: <code>/execute as @a if data entity @s Inventory[{Slot:0b}].tag.Enchantments[{id:"minecraft:efficiency"}] run tp @s 0 64 0</code>{{only|java}}
  +
* Create a smoke [[particle]] three blocks in front of all players:
  +
*: <code>/execute as @a at @s anchored eyes run particle smoke ^ ^ ^3</code>{{only|java}}
  +
* Place a saddle on pigs located within 5 blocks of the executing player, and remove saddles from pigs located over 5 blocks away from the executing player:
  +
*: <code>/execute as @e[type=pig] at @s store success entity @s Saddle byte 1 if entity @p[distance=..5]</code>{{only|java}}
  +
* Make a player say "My feet are soaked!" in chat if they are located in a block of [[water]]:
  +
*: <code>/execute as @a at @s if block ~ ~ ~ water run say "My feet are soaked!"</code>
  +
* Make a player say "Score is reset" in chat if the score 'test' is not set, eg by doing "scoreboard players reset @s test":
  +
*:<code>/execute as @a unless score @s test = @s test run say "Score is reset"</code>
  +
* Hurl all pigs skyward who are within 3 blocks of the nearest player:
  +
*:<code>/execute at @p as @e[type=pig,distance=..3] run data merge entity @s {Motion:[0.0,2.0,0.0]}</code>{{only|java}}
  +
* Kill all zombies who have no headgear:
  +
*:<code>/execute as @e[type=zombie] unless data entity @s ArmorItems[3].id run kill @s</code>{{only|java}}
   
 
== History ==
 
== History ==
   
 
{{History|java}}
 
{{History|java}}
{{History||1.8|snap=14w07a|Added {{cmd|execute|link=none}}.}}
+
{{History||1.13|snap=17w45a|Reworked {{cmd|execute|link=none}}. The syntax of {{cmd|execute|link=none}} has been split off. See [[Commands/execute/Before]] for old syntax.}}
{{History||1.8|snap=14w08a|Commands run using {{cmd|execute|link=none}} will now pass their success value back to the command block running them.}}
+
{{History|||snap=17w45b|Reworked {{cmd|execute store|link=none}}.}}
{{History||1.11|snap=16w32a|Added [[block state]] support to {{cmd|execute|link=none}}.}}
 
{{History||1.13|snap=17w45a|The syntax of {{cmd|execute|link=none}} has been split off.}}
 
{{History||1.13|snap=17w45b|Reworked {{cmd|execute|store|link=none}}.}}
 
 
{{History|||snap=18w02a|Added new subcommands to {{cmd|execute|link=none}} to allow for more control over commands.}}
 
{{History|||snap=18w02a|Added new subcommands to {{cmd|execute|link=none}} to allow for more control over commands.}}
{{History|||snap=18w05a|Added {{cmd|execute|store|link=none}}.}}
+
{{History|||snap=18w05a|Added {{cmd|execute store (result{{!}}success) bossbar|link=none}}.}}
 
{{History||1.14|snap=18w43a|Added {{cmd|execute (if&#124;unless) data|link=none}}.}}
 
{{History||1.14|snap=18w43a|Added {{cmd|execute (if&#124;unless) data|link=none}}.}}
{{History||1.15|snap=19w38a|Added {{cmd|execute|if|predicate|link=none}}.
+
{{History||1.15|snap=19w38a|Added {{cmd|execute (if{{!}}unless) predicate|link=none}}.
|Added {{cmd|execute|store|storage|link=none}}.}}
+
|Added {{cmd|execute store (result{{!}}success) storage|link=none}}.}}
  +
{{History||1.19.3|snap=22w46a|Added {{cmd|execute (if&#124;unless) biome|link=none}}.}}
  +
{{History||1.19.4|snap=23w03a|Added {{cmd|execute on|link=none}}.|Added {{cmd|execute (if{{!}}unless) dimension|link=none}} and {{cmd|execute (if{{!}}unless) loaded|link=none}}.}}
  +
{{History|||snap=23w04a|Added a new relation <code>origin</code> for {{cmd|execute on|link=none}}.}}
  +
{{History|||snap=23w06a|Added {{cmd|execute summon|link=none}}.|Now {{cmd|execute if loaded|link=none}} is a condition subcommand instead of a modify-like subcommand.<ref>{{bug|MC-259227|resolution=Fixed}}</ref>}}
  +
{{History|||snap=Pre-release 1|Added {{cmd|execute positioned over|link=none}}.}}
  +
{{History|java upcoming}}
  +
{{History||1.20.2|snap=23w31a|Added {{cmd|execute (if{{!}}unless) function|link=none}}.}}
  +
{{History|||snap=1.20.2 Pre-release 1|Temporarily removed syntax {{cmd|link=none|execute (if{{!}}unless) function}}.}}
   
{{History|Pocket alpha}}
+
{{History|bedrock}}
{{History||0.16.0|snap=build 1|Added {{cmd|execute|link=none}}.|Functionality almost is equivalent to [[Java Edition 1.10]] usage, except the entity target is optional in {{cmd|execute|link=none}}.}}
+
{{History||Upcoming Creator Features<br>(Experimental)|link=Experimental Gameplay|snap=beta 1.19.10.20|Added new {{cmd|execute|link=None}} syntax to closer resemble that of {{el|java}}.}}
  +
{{History|||snap=beta 1.19.40.20|Implemented the {{cmd|execute rotated|link=none}} command.}}
  +
{{History|||snap=beta 1.19.40.21|Implemented the {{cmd|execute facing|link=none}} and {{cmd|execute align|link=none}} commands.}}
  +
{{History|||snap=beta 1.19.40.23|Implemented the {{cmd|execute anchored|link=none}} and {{cmd|execute in|link=none}} commands.}}
  +
{{History||1.19.50|snap=beta 1.19.50.23|The new {{cmd|execute|link=none}} syntax is no longer behind the "Upcoming Creator Features" experimental toggle.}}
  +
{{History||1.19.70|snap=beta 1.19.70.21|Removed <code>data: int</code> argument from {{cmd|execute <if{{!}}unless> block|link=none}}.}}
 
{{History|foot}}
 
{{History|foot}}
  +
  +
== References ==
  +
<references/>
 
{{Commands}}
 
{{Commands}}
   
 
[[de:Befehl/execute]]
 
[[de:Befehl/execute]]
  +
[[es:Comandos/execute]]
  +
[[ja:コマンド/execute]]
  +
[[pt:Comandos/execute]]
  +
[[ru:Команды консоли/execute]]
  +
[[uk:Команди консолі/execute]]
 
[[zh:命令/execute]]
 
[[zh:命令/execute]]

Latest revision as of 02:00, 30 December 2023

This article is about the command in the current version (since Java Edition 1.13 (17w45a) and Bedrock Edition 1.19.50 (beta 1.19.50.23)). For the command in former game versions, see Commands/execute/Before.

/execute executes another command but allows changing the executor, changing the position and angle it is executed at, adding preconditions, and storing its result.

Usage

There are fourteen‌[JE only] / eleven‌[BE only] instructions (aka. subcommands) for the /execute command. Multiple subcommands can be chained after /execute. Subcommands are divided into 4‌[JE only] / 3‌[BE only] categories: modify subcommands, condition subcommands, store subcommands‌[JE only], and run subcommand.

  • Modify subcommands modify command context variables to change the context the command is executed. Subcommands following it will execute with specific executor(s), execution position(s), execution dimension(s), execution rotation(s) and execution anchor.
  • Condition subcommands are used to test whether certain conditions are met and then output results or limit conditions of execution.
  • Store subcommands‌[JE only] can store the return values of the command in a scoreboard or the data of an entity, block entity, or storage, and can also change the maximum or current value of a bossbar.
  • run subcommand is used for carrying out another command.

All needed subcommands can be concatenated together. Subcommands other than the run subcommand can be arranged arbitrarily and used multiple times. But the run subcommand can be used only once and must be put at the end of the subcommands chain. A run subcommand or a condition subcommand finalizes the chain, otherwise the command is unparseable in Bedrock Edition or parseable but does nothing (except summon subcommand, see also MC-165773 and MC-260576) in Java Edition.

Subcommands and forking

The game processes subcommand chain in order from front to end, for example, the following commands are different:

  • All entities move one block forward: execute as @e at @s run tp ^ ^ ^1
  • All entities are teleported to one block in front of the executor: execute at @s as @e run tp ^ ^ ^1

Some subcommands can fork the command execution, that is, they cause subcommands following it to be executed multiple times. It is possible to fork with zero branches, that is, terminate. For example, when as subcommand selects multiple entities, the subcommand following it will execute once per entity.

If the /execute command hasn't ever forked, we describe it as having only one branch — the main branch.

A branch may terminate halfway and does nothing (including run and store subcommands). For example, the condition in a condition subcommand doesn't met, or as subcommand selects zero entities. When terminating, an red message is shown in Bedrock Edition. If all branches terminated, we describe the /execute command itself as terminating.

Note that .... run execute ... has no effect at all in both Java Edition and Bedrock Edition. For example, the following commands work the same:

  • execute as @e[type=armor_stand] as @e[type=armor_stand] run summon armor_stand
  • execute as @e[type=armor_stand] run execute as @e[type=armor_stand] run execute run execute run summon armor_stand

However, the way to fork is different in Java Edition and Bedrock Edition. (See also MC-125067 — resolved as "Won't Fix". and MCPE-165278 — resolved as "Unresolved".)

  • In Java Edition, the game processes subcommands in breadth-first, that is, executes subcommands one by one. So the game processes other subcommands before processing run subcommands, so the run subcommand cannot affect other subcommands.
  • In Bedrock Edition, the game processes subcommands in depth-first. That is, after forking, all the following subcommands are considered as a whole and will be executed once for each branch.
  • For example, when there're two armor stands (A and B) in the world, and a player executes execute as @e[type=armor_stand] as @e[type=armor_stand] run summon armor_stand, the behaviors of Java Edition and Bedrock Edition are shown in the following pictures:

In Java Edition, depth-first can be achieved via /function, for example:

  • When there're two armor stands (A and B) in the world, and a player executes execute as @e[type=armor_stand] run function test, and in the function file is:
    • execute as @e[type=armor_stand] run summon armor_stand
  • It behaves like /execute as @e[type=armor_stand] as @e[type=armor_stand] run summon armor_stand in Bedrock Edition.

In Bedrock Edition, there is no way to achieve breadth-first.

Output values

Stored values

Information icon
This feature is exclusive to Java Edition. 

In Java Edition, a branch returns a success value and a result value (see #Store subcommand for details) after it fully executed (if it does not terminate halfway). These two return values come from the last subcommand (may be a condition subcommand or a run subcommand). The success value is always 0 or 1. The result value must be an integer, if not, it is rounded down. If the last subcommand fails, both the two values are 0. The two values can be stored through storage subcommands.

Note that all commands except the execute command have these two return values. The execute command itself does not have them.

If the command execution is forked after a storage subcommand, the storage operation will be applied on each branch. Each branch's return value will be stored. Since the stored values will not be accumulated, after the whole execute command is executed, the stored value is the return value of the last executed branch.

If executing a /function command after a storage subcommand, the storage operation will be applied on each command in the function file. For each command (except /execute command) in the function file, its return value will be stored after being executed. For /execute commands in the function file, return value of each branch will be stored after being executed. The return value of /function command itself will be also stored after the whole function file is executed. Since the stored values will not be accumulated, after the whole execute command is executed, the stored value is the return value of the /function command itself.

Success count

Like amost commands, /execute command itself also has a success count (whether or not terminates halfway), which is different from success and result value. It is similar to the success value, but is accumulated. This is usually 0 or 1. If the command is forked or a function is executed, success count can be a number higher than 1. When executing it with a command block, the success count is returned to the command block, which can be checked by a conditional command block or be read with a redstone comparator.

Syntax

There are fourteen‌[JE only] / eleven‌[BE only] instructions (aka. subcommands) for the /execute command, and each has its own special syntax, so describing syntax takes a large branching tree.

Full syntax tree
  • Java Edition
/execute . . .
  • align <axes> -> execute
  • anchored <anchor> -> execute
  • as <targets> -> execute
  • at <targets> -> execute
  • facing (<pos>|entity <targets> <anchor>) -> execute
  • in <dimension> -> execute
  • on <relation> -> execute
  • positioned (<pos>|as <targets>|over <heightmap>) -> execute
  • rotated (<rot>|as <targets>) -> execute
  • store (result|success) . . .
    • … block <targetPos> <path> <type> <scale> -> execute
    • … bossbar <id> (max|value) -> execute
    • … entity <target> <path> <type> <scale> -> execute
    • … score <targets> <objective> -> execute
    • … storage <target> <path> <type> <scale> -> execute
  • summon <entity> -> execute
  • … (if|unless) . . .
    • … biome <pos> <biome> -> [execute]
    • … block <pos> <block> -> [execute]
    • … blocks <start> <end> <destination> (all|masked) -> [execute]
    • … data . . .
      • … block <sourcePos> <path> -> [execute]
      • … entity <source> <path> -> [execute]
      • … storage <source> <path> -> [execute]
    • … dimension <dimension> -> [execute]
    • … function <function> -> [execute][upcoming: JE 1.20.2]
    • … entity <entities> -> [execute]
    • … loaded <pos> -> [execute]
    • … predicate <predicate> -> [execute]
    • … score <target> <targetObjective> . . .
      • … (<|<=|=|>|>=) <source> <sourceObjective> -> [execute]
      • … matches <range> -> [execute]
  • run <command>
where -> execute represents the start of another subcommand.
  • Bedrock Edition
/execute . . .
  • align <axes: string> <chainedCommand: ExecuteChainedOption_0>
  • anchored <eyes|feet> <chainedCommand: ExecuteChainedOption_0>
  • as <origin: target> <chainedCommand: ExecuteChainedOption_0>
  • at <origin: target> <chainedCommand: ExecuteChainedOption_0>
  • facing . . .
    • … <position: x y z> <chainedCommand: ExecuteChainedOption_0>
    • … entity <origin: target> <eyes|feet> <chainedCommand: ExecuteChainedOption_0>
  • in <dimension: Dimension> <chainedCommand: ExecuteChainedOption_0>
  • positioned . . .
    • … <position: x y z> <chainedCommand: ExecuteChainedOption_0>
    • … as <origin: target> <chainedCommand: ExecuteChainedOption_0>
  • rotated . . .
    • … <yaw: value> <pitch: value> <chainedCommand: ExecuteChainedOption_0>
    • … as <origin: target> <chainedCommand: ExecuteChainedOption_0>
  • <subcommand: Option_If_Unless> . . .
    • … block <position: x y z> <block: Block> . . .
      • … <blockStates: block states> [chainedCommand: ExecuteChainedOption_0]
      • … [chainedCommand: ExecuteChainedOption_0]
    • … blocks <begin: x y z> <end: x y z> <destination: x y z> <scan mode: BlocksScanMode> [chainedCommand: ExecuteChainedOption_0]
    • … entity <target: target> [chainedCommand: ExecuteChainedOption_0]
    • … score <target: target> <objective: string> . . .
      • … <operation: compare operator> <source: target> <objective: string> [chainedCommand: ExecuteChainedOption_0]
      • … matches <range: integer range> [chainedCommand: ExecuteChainedOption_0]
  • run <command: command>
where chainedCommand: ExecuteChainedOption_0 represents the start of another subcommand.

Modify subcommands

align

Updates the execution position, aligning to its current block position (an integer). Applies only along specified axes.
This is akin to flooring the coordinates – i.e. rounding them downward.
Syntax
Java Edition:
align <axes> -> execute
Bedrock Edition:
align <axes: string> <chainedCommand: ExecuteChainedOption_0>
Arguments
JE<axes>: swizzle
BE: axes: string: basic_string
Any non-repeating combination of the characters 'x', 'y', and 'z'. Axes can be declared in any order, but they cannot duplicate. (For example, x, xz, zyx, or yz.)
Result
Execution position in the given axes are floored, changing by less than 1 block.
Unparseable if the argument is not specified correctly.
Example
Given (-1.8, 2.3, 5.9), execute align xz changes the position to (-2, 2.3, 5).
Given (2.4, -1.1, 3.8), execute align yxz run spawnpoint @p ~ ~ ~ sets the player's spawnpoint to (2, -2, 3).

anchored

Sets the execution anchor to the eyes or feet. Defaults to feet.
Running positioned <pos> -> execute resets to feet
Effectively recenters local coordinates on either the eyes or feet, also changing the angle the facing subcommand (of /execute and /teleport) works off of.
See also MCPE-162681 and MCPE-165051 for issues about Bedrock Edition.
Syntax
Java Edition:
anchored <anchor> -> execute
Bedrock Edition:
anchored <eyes|feet> <chainedCommand: ExecuteChainedOption_0>
Arguments
JE<anchor>: entity_anchor
BE: eyes|feet
Whether to anchor the executed command to eyes or feet
Must be either eyes or feet.
Result
Execution anchor is set to either the eyes or the feet.
Unparseable if the argument is not specified correctly.
Example
The effect of /tp is to move a target by placing its feet at the given position.
execute anchored eyes run tp ^ ^ ^ effectively teleports the executor's feet to where its eyes are.
execute anchored eyes run tp ^5 ^ ^ means "place the executor's feet 5 blocks left of where its eyes are"

as

Sets the executor to target entity, without changing execution position, rotation, dimension, and anchor.
Syntax
Java Edition:
as <targets> -> execute
Bedrock Edition:
as <origin: target> <chainedCommand: ExecuteChainedOption_0>
Arguments
JE<targets>: entity
BE: origin: target: CommandSelector<Actor>
Target entity/entities to become the new executor.
Must be a player name, a target selector or a UUID[Java Edition only].
Result
Executor is updated to target entity (which changes the meaning of @s).
Unparseable if the argument is not specified correctly.
Forks if <targets> or origin: target selects multiple entities.
Terminates if <targets> or origin: target fails to resolve to one or more valid entities (named players must be online).
Example
Kill all sheep: execute as @e[type=sheep] run kill @s
Make all villagers in loaded chunks invincible: execute as @e[type=villager] run data merge entity @s {Invulnerable:1}[Java Edition only]

at

Sets the execution position, rotation, and dimension to match those of an entity; does not change executor.
Syntax
Java Edition:
at <targets> -> execute
Bedrock Edition:
at <origin: target> <chainedCommand: ExecuteChainedOption_0>
Arguments
JE<targets>: entity
BE: origin: target: CommandSelector<Actor>
Target entity/entities to match position, rotation, and dimension with.
Must be a player name, a target selector or a UUID[Java Edition only].
Result
Execution position, rotation, and dimension are updated to match target entity.
Unparseable if the argument is not specified correctly.
Forks if <targets> or origin: target selects multiple entities.
Terminates if <targets> or origin: target fails to resolve to one or more valid entities (named players must be online).
Example
Move all sheep upward 1 block: execute as @e[type=sheep] at @s run tp ~ ~1 ~
Kill the player running the command, because "at" does not change the executor: execute at @e[type=sheep] run kill @s

facing

Sets the execution rotation to face a given point, as viewed from its anchor (either the eyes or the feet).
Syntax
Java Edition:
facing <pos> -> execute
facing entity <targets> <anchor> -> execute
Bedrock Edition:
facing <position: x y z> <chainedCommand: ExecuteChainedOption_0>
facing entity <origin: target> <eyes|feet> <chainedCommand: ExecuteChainedOption_0>
Arguments
Option: facing <pos> and facing <position: x y z>
JE<pos>: vec3
BE: position: x y z: CommandPositionFloat
Coordinates to rotate toward
Must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
Option: facing entity <targets> <anchor> and facing entity <origin: target> <eyes|feet>
JE<targets>: entity
BE: origin: target: CommandSelector<Actor>
The target(s) to rotate toward
Must be a player name, a target selector or a UUID[Java Edition only].
JE<anchor>: entity_anchor
BE: eyes|feet
Whether to point at the target's eyes or feet
Must be either eyes or feet.
Result
Execution rotation is updated to face given position or targets.
Unparseable if the argument is not specified correctly.
Forks if <targets> or origin: target selects multiple entities.
Terminates if <targets> or origin: target fails to resolve to one or more valid entities (named players must be online).
Example
Executor rotates once to the left: execute facing ^1 ^ ^ run tp @s ~ ~ ~ ~ ~
All entities move one block in the direction of (0, 64, 0) (without changing their rotation): execute as @e at @s facing 0 64 0 run tp @s ^ ^ ^1
All entities move one block in the direction of (0, 64, 0) (with changing their rotation): execute as @e at @s facing 0 64 0 run tp ^ ^ ^1 ~ ~
All non player entities move one space in the direction of their nearest player (without changing their rotation): execute as @e[type=!player] at @s facing entity @p feet run tp @s ^ ^ ^1

in

Sets the execution dimension and position.
It respects dimension scaling for relative and local coordinates: the execution position (only the X/Z part) is divided by 8 when changing from the Overworld to the Nether, and is multiplied by 8 when vice versa. Applies to custom dimensions as well.
Syntax
Java Edition:
in <dimension> -> execute
Bedrock Edition:
in <dimension: Dimension> <chainedCommand: ExecuteChainedOption_0>
Arguments
JE<dimension>: dimension
BE: dimension: Dimension: enum
Name of the new execution dimension
In Java Edition, must be the resource location, which will be resolved during command execution into a dimension. In Bedrock Edition, must be either overworld, nether, or the_end.
Result
Execution dimension and position is updated.
Unparseable if the argument is not specified correctly.
Example
Looking for an end city (from the overworld):
  • execute in minecraft:the_end run locate structure minecraft:end_city[Java Edition only]
  • execute in the_end run locate structure end_city[Bedrock Edition only]
If a player at position (16,64,16) in Overworld runs the following command, the player is teleported to (16,64,16) in the Nether:
  • execute in minecraft:the_nether positioned as @s run tp ~ ~ ~[Java Edition only]
  • execute in nether positioned as @s run tp ~ ~ ~[Bedrock Edition only]
If a player at position (16,64,16) in Overworld runs the following command, the player is teleported to (2,64,2) in the Nether.
If a player at position (80,64,80) in Overworld runs the following command, the player is teleported to (10,64,15) in the Nether.

on

Information icon
This feature is exclusive to Java Edition. 
Updates the executor, selecting entities based on relation to the current executor entity (changing the original executor), without changing execution position, rotation, dimension, and anchor.
Syntax
Java Edition:
on <relation> -> execute
Arguments
JE: <relation>
A relation of the current executor entity
  • attacker: the last entity that damaged the current executor entity in the previous 5 seconds. Note that damage types in minecraft:no_anger tag bypass the record of attacker. Interaction entities do not forget attacker after 5 seconds. Some mobs forget the attacker when stoping angry.
  • controller: the entity that is riding and controlling the current executor entity. See Riding#Controlling for details.
  • leasher: the entity leading the current executor entity with a leash.
  • origin: the entity that cause the summon of the current executor entity. For example, the shooter of an arrow, the primer of a primed TNT entity.
  • owner: the owner of the current executor entity if it is a tameable animal.
  • passengers: all entities that are directly riding the current executor entity, no sub-passengers.
  • target: the attack target of the current executor entity. Interaction entities can select the last entity that interacted with them.
  • vehicle: the entity ridden by the current executor entity.
Result
Executor is updated based on the relation with the executor entity (which changes the meaning of @s).
Forks if passengers selects multiple entities. (Other relations can select only at most one entities.)
Terminates if current executor is not an entity.
Terminates if the relation is not applicable to the current executor entity or there are no entities matching it.
Example
Damage 1 heart the entity that is leashing a cat: execute as @e[type=cat] on leasher run damage @s 2 generic
Give all players riding a boat a fishing rod: execute as @e[type=boat] on passengers run give @s fishing_rod

positioned

Sets the execution position, without changing execution rotation or dimension; can match an entity's position, or at one block above the Y-level stored in the specified heightmap[JE only].
Syntax
Java Edition:
positioned <pos> -> execute
positioned as <targets> -> execute
positioned over <heightmap> -> execute
Bedrock Edition:
positioned <position: x y z> <chainedCommand: ExecuteChainedOption_0>
positioned as <origin: target> <chainedCommand: ExecuteChainedOption_0>
Arguments
Option: positioned <pos> or positioned <position: x y z>
JE<pos>: vec3
BE: position: x y z: CommandPositionFloat
New position
Must be a three-dimensional coordinates with floating-point number elements. Accepts tilde and caret notations.
Option: positioned as <targets> or positioned as <origin: target>
JE<targets>: entity
BE: origin: target: CommandSelector<Actor>
Target entity/entities to match position with
Must be a player name, a target selector or a UUID[Java Edition only].
Option: positioned over <heightmap>
JE: <heightmap>: heightmap
Specifies the heightmap
Must be one of world_surface, motion_blocking, motion_blocking_no_leaves, and ocean_floor.
Result
Execution position is updated. And positioned <pos> also resets execution anchor to feet.
Unparseable if the argument is not specified correctly.
Forks if <targets> or origin: target selects multiple entities.
Terminates if <targets> or origin: target fails to resolve to one or more valid entities (named players must be online).
When multiple entities are selected, next sub-command is executed once in each execution position.
Example
Look for a village near (0, 64, 0):
  • execute positioned 0 64 0 run locate structure #village[Java Edition only]
  • execute positioned 0 64 0 run locate structure village[Bedrock Edition only]

rotated

Sets the execution rotation; can match an entity's rotation.
Syntax
Java Edition:
rotated <rot> -> execute
rotated as <targets> -> execute
Bedrock Edition:
rotated <yaw: value> <pitch: value> <chainedCommand: ExecuteChainedOption_0>
rotated as <origin: target> <chainedCommand: ExecuteChainedOption_0>
Arguments
Option: rotated <rot> or rotated <yaw: value> <pitch: value>
JE: <rot>: rotation (<yaw> <pitch>)
BE: yaw: value: RelativeFloat and pitch: value: RelativeFloat
Angles of rotation
Must be a rotation with double‌[JE only] or float‌[BE only] number elements, including yaw and pitch, measured in degrees.
  • For the horizontal rotation (yaw), -180.0 for due north, -90.0 for due east, 0.0 for due south, 90.0 for due west, to 179.9 for just west of due north, before wrapping back around to -180.0.
  • For the vertical rotation (pitch), -90.0 for straight up to 90.0 for straight down.
Tilde notation can be used to specify a rotation relative to the execution rotation.
Option: rotated as <targets> or rotated as <origin: target>
JE<targets>: entity
BE: origin: target: CommandSelector<Actor>
Target entity/entities to match rotation with
Must be a player name, a target selector or a UUID[Java Edition only].
Result
Execution rotation is updated.
Unparseable if the argument is not specified correctly.
Forks if <targets> or origin: target selects multiple entities.
Terminates if <targets> or origin: target fails to resolve to one or more valid entities (named players must be online).
Example
Move every sheep 1 block in the direction that the player closest to it is facing: execute as @e[type=sheep] at @sORpositioned as @s rotated as @p run tp @s ^ ^ ^1

summon

Information icon
This feature is exclusive to Java Edition. 
Summons a new entity at execution position and changes the executor to this summoned entity.
Syntax
Java Edition:
summon <entity> -> execute
Arguments
JE: <entity>: resource
Entity to be summon and the new executor
Must be an existing registered resource location in minecraft:entity_type registry.
Result
Summons the entity and changes the executor.
Unparseable if the argument is not specified correctly.
Example
Summon a sheep with the tag "Test": execute summon sheep run tag @s add Test
Summon a block display entiy and scale it: execute summon block_display run data merge entity @s {transformation:{scale:[4.0,4.0,4.0]},block_state:{Name:"minecraft:dirt"}}

Condition subcommands

The particular use of the if and unless subcommands are to restrict command execution to happen only under specified conditions. In most cases, unless is a negation of if, equivalent to "if not...". The two commands have identical argument structures.

Result of condition subcommands
Unparseable if the argument is not specified correctly.
In some cases, for example, testing a block outside the world, both if and unless terminates or fails.
When not at the end of the subcommands chain, only if the condition tests pass does the branch continue; otherwise it terminates.
In Java Edition, if it is executed in multiple branches, it acts as a context filter - Only branchs with a context that matches the condition continues.
When at the end of the subcommands chain, it checks whether the condition is met and then outputs. In Java Edition, it has output values that can be stored by store subcommands.

There are nine‌[JE only] / four‌[BE only] different types of conditions:

  1. (if|unless) biome – Tests a biome area‌[Java Edition only]
  2. (if|unless) block – Tests a single real block
  3. (if|unless) blocks – Tests a real 3D rectangular volume against another
  4. (if|unless) data – Tests the data held by a real block, entity, or a storage‌[Java Edition only]
  5. (if|unless) dimension - Tests the dimension of the execution‌[Java Edition only]
  6. (if|unless) function – Tests a function[more information needed][upcoming: JE 1.20.2]
  7. (if|unless) entity – Tests whether an entity like the one given is real
  8. (if|unless) loaded - Tests if a given position is loaded in the world‌[Java Edition only]
  9. (if|unless) predicate – Tests a predicate‌[Java Edition only]
  10. (if|unless) score - Tests a target's score

(if|unless) biome

Information icon
This feature is exclusive to Java Edition. 
Checks for a specific biome in a given position.
Syntax
(if|unless) biome <pos> <biome> -> [execute]
Arguments
<pos>: block_pos
Position to test
Must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation.
<biome>: resource_or_tag
Biome(s) to test for
Must be an existing registered resource location or tag in minecraft:worldgen/biome registry.
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • If <pos> is unloaded or out of the world.
  • If test doesn't pass.
When at the end of the subcommands chain, if the command is successful, both success value and result value are 1.

(if|unless) block

Compares the block at a given position to a given block ID.
Syntax
Java Edition:
(if|unless) block <pos> <block> -> [execute]
Bedrock Edition:
<subcommand: Option_If_Unless> block <position: x y z> <block: Block> [chainedCommand: ExecuteChainedOption_0]
<subcommand: Option_If_Unless> block <position: x y z> <block: Block> <blockStates: block states> [chainedCommand: ExecuteChainedOption_0]
Arguments
JE<pos>: block_pos
BE: position: x y z: CommandPosition
Position of a target block to test
In Java Edition, must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation. In Bedrock Edition, must be a three-dimensional coordinates composed of <x>, <y> and <z>, each of which must be a floating-point number or tilde and caret notation.
JE<block>: block_predicate
BE: block: Block: enum
Specifies the block to test for
In Java Edition, must be in the format of block_id[block_states]{data_tags}(accepts block tags), in which block states and data tags can be omitted when they are not needed. In Bedrock Edition, must be a block id.
BE: blockStates: block states: BlockStateCommandParam
Specifies the block state for the specified block to test for
Must be a blockstate argument as ["<state1>":<value1>,"<state2>":<value2>,...]. For example: ["old_leaf_type":"birch","persistent_bit":true].
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • If <pos> or position: x y z is unloaded or out of the world.
  • If test doesn't pass.
In Java Edition, when at the end of the subcommands chain, if the command is successful, both success value and result value are 1.

(if|unless) blocks

Compares the blocks in two equally sized volumes.
Syntax
Java Edition:
(if|unless) blocks <start> <end> <destination> (all|masked) -> [execute]
Bedrock Edition:
<subcommand: Option_If_Unless> blocks <begin: x y z> <end: x y z> <destination: x y z> <scan mode: BlocksScanMode> [chainedCommand: ExecuteChainedOption_0]
Arguments
JE<start>: block_pos
BE: begin: x y z: CommandPosition
JE<end>: block_pos
BE: end: x y z: CommandPosition
Positions of any two diagonal corners of the source volume (the volume to compare)
In Java Edition, must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation. In Bedrock Edition, must be a three-dimensional coordinates composed of <x>, <y> and <z>, each of which must be a floating-point number or tilde and caret notation.
JE<destination>: block_pos
BE: destination: x y z: CommandPosition
Position of the lower northwest corner of the destination volume (the volume to compare to)
Assumed to be of the same size as the source volume
In Java Edition, must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation. In Bedrock Edition, must be a three-dimensional coordinates composed of <x>, <y> and <z>, each of which must be a floating-point number or tilde and caret notation.
JE: (all|masked)
BE: scan mode: BlocksScanMode: enum
Specifies whether all blocks in the source volume should be compared, or if air blocks should be masked/ignored
Must be either all or masked.
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at end of the subcommands chain; fails when at the end:
  • If <start> / begin: x y z, <end> / end: x y z, or <destination> / destination: x y z is unloaded or out of the world.
  • If the volume of the source region is greater than 32768 (the equivalent of 8 chunk sections)‌.
  • If test doesn't pass.
In Java Edition, when at the end of the subcommands chain, if the command is successful:
The success value is 1.
For if mode, result value is the number of matching blocks (the total number of blocks in all mode, or the number of source region non-air blocks in masked mode).
For unless mode, result value is 1.

(if|unless) data

Information icon
This feature is exclusive to Java Edition. 
Checks whether the targeted block, entity or storage has any data tag for a given path.
Syntax
(if|unless) data block <pos> <path> -> [execute] – for data checking a block
(if|unless) data entity <target> <path> -> [execute] – for data checking an entity
(if|unless) data storage <source> <path> -> [execute] – for data checking a storage
Arguments
Option: (if|unless) data block <pos> <path>
<pos>: block_pos
Position of the block for data testing
Must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation.
<path>: nbt_path
Data path to check whether the block has
Must be an NBT path.
Option: (if|unless) data entity <target> <path>
<target>: entity
A single entity for data testing
Must be a player name, a target selector or a UUID. And the target selector must be in single type.
<path>: nbt_path
Data path to check whether the entity has
Must be an NBT path.
Option: (if|unless) data storage <source> <path>
<source>: resource_location
The resource location of the storage for data testing
Must be a resource location which will be resolved during command execution into unregistered content or client-side content.
<path>: nbt_path
Data path to check whether the storage has
Must be an NBT path.
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • If <pos> is unloaded or out of the world.
  • If block at <pos> isn't a block entity.
  • If <target> fails to resolve to one or more valid entities (named players must be online).
  • If test doesn't pass.
When at the end of the subcommands chain, if the command is successful:
The success value is 1.
For if mode, result value is the number of matching data tags.
For unless mode, result value is 1.

(if|unless) dimension

Information icon
This feature is exclusive to Java Edition. 
Checks if the execution is in a matching dimension.
Syntax
(if|unless) dimension <dimension> -> [execute]
Arguments
<dimension>: dimension
Dimension to test for
It must be the resource location, which will be resolved during command execution into a dimension.
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • If test doesn't pass.
When at the end of the subcommands chain, if the command is successful, both success value and result value are 1.

(if|unless) function

Crafting Table
This section describes content that may be included in Java Edition. 
This content has appeared in Java Edition development versions, but the full update containing it has not been released yet.
Checks a function or function tag and matches the return value(s). If a tag is given, all functions run regardless of the results of prior functions.[more information needed]
Syntax
(if|unless) function <function> -> [execute]
Arguments
<function>: function
Function to test for
It must be a resource location, which refers to a single function, or one prefixed with a #, which refers to a function tag.
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • If the function or function tag doesn't exist.
  • If test doesn't pass.
[more information needed]

(if|unless) entity

Checks whether one or more entities exist.
Syntax
Java Edition:
(if|unless) entity <entities> -> [execute]
Bedrock Edition:
<subcommand: Option_If_Unless> entity <target: target> [chainedCommand: ExecuteChainedOption_0]
Arguments
JE<entities>: entity
BE: target: target: CommandSelector<Actor>
The target entity/ies to test for
Must be a player name, a target selector or a UUID[Java Edition only].
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • If test doesn't pass.
In Java Edition, when at the end of the subcommands chain, if the command is successful:
The success value is 1.
For if mode, result value is the number of matching entities.
For unless mode, result value is 1.

(if|unless) loaded

Information icon
This feature is exclusive to Java Edition. 
Checks if chunks at a given position is fully loaded (Entity Ticking).
Syntax
(if|unless) loaded <pos> -> [execute]
Arguments
<pos>: block_pos
Position to test
Must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation.
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • If <pos> is out of the world.
  • If test doesn't pass.
When at the end of the subcommands chain, if the command is successful, both success value and result value are 1.

(if|unless) predicate

Information icon
This feature is exclusive to Java Edition. 
Checks whether the predicate successes. See Predicate for more information.
Syntax
(if|unless) predicate <predicate> -> [execute]
Arguments
<predicate>: resource_location
The predicate to be checked whether it evaluates to a positive result
Must be a resource location which will be resolved during command execution into unregistered content or client-side content.
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • If the predicate doesn't exist.
  • If test doesn't pass.
When at the end of the subcommands chain, if the command is successful, both success value and result value are 1.

(if|unless) score

Check whether a score has the specific relation to another score, or whether it is in a given range.
Syntax
Java Edition:
(if|unless) score <target> <targetObjective> (<|<=|=|>=|>) <source> <sourceObjective> -> [execute] – for comparing two scores
(if|unless) score <target> <targetObjective> matches <range> -> [execute] – for comparing one score against a range
Bedrock Edition:
<subcommand: Option_If_Unless> score <target: target> <objective: string> <operation: compare operator> <source: target> <objective: string> [chainedCommand: ExecuteChainedOption_0] - for comparing two scores
<subcommand: Option_If_Unless> score <target: target> <objective: string> matches <range: integer range> [chainedCommand: ExecuteChainedOption_0] - for comparing one score against a range
Arguments
JE<target>: score_holder
BE: target: target: CommandSelector<Actor>
A single score holder
In Java Edition, must be a selection of score holders. It may be either a target selector, a player name, a UUID, or * for all score holders tracked by the scoreboard. Named player needn't be online, and it even needn't be a real player's name.
In Bedrock Edition, must be a player name or a target selector. It can also be quoted unique id to specified non-player entities in the objective.
JE<targetObjective>: objective
BE: objective: string: basic_string
The scoreboard objective to check under. The score of <target> or <target: target> in this objective is checked
In Java Edition, it must be a valid scoreboard objective name. In Bedrock Edition, it must be a single word that has no space or a quoted string.
Option: (if|unless) score ... (<|<=|=|>=|>) ... and <subcommand: Option_If_Unless> score ... <operation: compare operator> ...
JE: (<|<=|=|>=|>)
BE: operation: compare operator: enum
Specifies a compare operator
Must be one of <, <=, =, >=, and >.
JE<source>: score_holder
BE: source: target: CommandSelector<Actor>
A single score holder to compare against
In Java Edition, must be a selection of score holders. It may be either a target selector, a player name, a UUID, or * for all score holders tracked by the scoreboard. Named player needn't be online, and it even needn't be a real player's name.
In Bedrock Edition, must be a player name or a target selector. It can also be quoted unique id to specified non-player entities in the objective.
JE<sourceObjective>: objective
BE: objective: string: basic_string
A scoreboard objective. The score of <source> or <source: target> in this objective is checked
In Java Edition, it must be a valid scoreboard objective name. In Bedrock Edition, it must be a single word that has no space or a quoted string.
Option: (if|unless) score ... matches ... and <subcommand: Option_If_Unless> score ... matches ...
JE<range>: int_range
BE: range: integer range: CommandIntegerRange
Range to compare score against
Must be a range acceptable for integer values. (e.g. 0 - exact match of 0. ..0 - less than or equal to 0. 0.. - more than or equal to 0. 0..1 - between 0 and 1, inclusive.)
Result
Unparseable if the argument is not specified correctly.
In following conditions, terminates when this subcommand is not at the end of the subcommands chain; fails when at the end:
  • In Java Edition, if <target> / target: target or <source> / source: target is *.
  • If test doesn't pass.
In Java Edition, when at the end of the subcommands chain, if the command is successful, both success value and result value are 1.

Example

Kill all players standing on a wool:
  • execute as @a at @s if block ~ ~-1 ~ #wool run kill @s[Java Edition only]
  • execute as @a at @s if block ~ ~-1 ~ wool run kill @s[Bedrock Edition only]
Check whether scores A and B are equal: execute if score @s A = @s B

Store subcommand

Information icon
This feature is exclusive to Java Edition. 

Store the final subcommand's result or success value somewhere. It is first processed along with other subcommands, recording the location to store in. After the last subcommand (may be a condition subcommand or a run subcommand) is executed, return values are stored in the recorded location. Note that the return values of commands must be an integer. If a decimal, it is rounded down.

There are five different modes of storage:

  1. store (result|success) block – Store return value under one of a block's NBTs
  2. store (result|success) bossbar – Store return value as a bossbar data
  3. store (result|success) entity – Store return value under one of an entity's NBTs
  4. store (result|success) score – Store return value under a target's score on an objective
  5. store (result|success) storage – Store return value under one of a storage's NBTs

store (result|success) block

Saves the final command's return value as tag data within a block entity. Store as a byte, short, int, long, float, or double. If the return value is a decimal, it is rounded first and then multiplied by <scale>.
Syntax
store (result|success) block <targetPos> <path> <type> <scale> -> execute
Arguments
<targetPos>: block_pos
Position of target block
<path>: nbt_path
Location of the desired tag to hold the value in
<type>
Desired data size/type
Must be one of byte, short, int, long, float, and double.
<scale>: double
Multiplier to apply before storing value, may be negative
Result
Unparseable if the argument is not specified correctly.
Does not store anything when the path does not exist.

store (result|success) bossbar

Saves the final command's return value in either a bossbar's current value or its maximum value
Syntax
store (result|success) bossbar <id> (value|max) -> execute
Arguments
<id>: resource_location
ID of the bossbar to target for saving
(value|max)
Whether to overwrite the bossbar's current value or its max value
Result
Unparseable if the argument is not specified correctly.

store (result|success) entity

Save the final command's return value in one of an entity's data tags. Store as a byte, short, int, long, float, or double. If the return value is a decimal, it is rounded first and then multiplied by <scale>. Like the /data command, "/execute store <arguments>" cannot modify player NBT.
Syntax
store (result|success) entity <target> <path> <type> <scale> -> execute
Arguments
<target>: entity
A single entity to store under
<path>: nbt_path
Location of the desired tag to hold the value in
<type>
Desired data size/type
Must be one of byte, short, int, long, float, and double.
<scale>: double
Multiplier to apply before storing value, may be negative
Result
Unparseable if the argument is not specified correctly.
Does not store anything when the path does not exist.

store (result|success) score

Overrides the score held by <targets> on the given <objective> with the final command's return value.
Syntax
store (result|success) score <targets> <objective> -> execute
Arguments
<targets>: score_holder
Specifies score holder(s) whose score is to be overridden
<objective>: objective
A scoreboard objective
Result
Unparseable if the argument is not specified correctly.

store (result|success) storage

Uses the <path> within storage <target> to store the return value in. Store as a byte, short, int, long, float, or double. If the return value is a decimal, it is rounded first and then multiplied by <scale>. If the storage does not yet exist, it gets created.
Syntax
store (result|success) storage <target> <path> <type> <scale> -> execute
Arguments
<target>: resource_location (Single word)
Target storage container, as a resource location
<path>: nbt_path
Location of the desired tag to hold the value in
<type>
Desired data size/type
Must be one of byte, short, int, long, float, and double.
<scale>: double
Multiplier to apply before storing value, may be negative
Result
Unparseable if the argument is not specified correctly.

Run subcommand

The run command's single argument is the command to be executed, the context variables of which may be modified by the subcommands used.

Syntax
Java Edition:
run --><command>
Bedrock Edition:
run <command: command>
Arguments
JE: <command>
BE: command: command
Can be any command
Technical‌[Java Edition only]
Resets the command node to the root of the command dispatcher
Information on modelling commands as chat text:
  • The command dispatcher is what starts when the player begins a message with a forward-slash (/).
  • A command node is the specific word/entry the cursor is editing, either a command or an argument.
  • The root node comes before the first word in the current command.
Result
Execute this command. Fails if <command> or command: command is failure.

More examples

  • Teleport all players who have an item enchanted with Efficiency in their first hotbar slot to coordinates (0, 64, 0):
    /execute as @a if data entity @s Inventory[{Slot:0b}].tag.Enchantments[{id:"minecraft:efficiency"}] run tp @s 0 64 0[Java Edition only]
  • Create a smoke particle three blocks in front of all players:
    /execute as @a at @s anchored eyes run particle smoke ^ ^ ^3[Java Edition only]
  • Place a saddle on pigs located within 5 blocks of the executing player, and remove saddles from pigs located over 5 blocks away from the executing player:
    /execute as @e[type=pig] at @s store success entity @s Saddle byte 1 if entity @p[distance=..5][Java Edition only]
  • Make a player say "My feet are soaked!" in chat if they are located in a block of water:
    /execute as @a at @s if block ~ ~ ~ water run say "My feet are soaked!"
  • Make a player say "Score is reset" in chat if the score 'test' is not set, eg by doing "scoreboard players reset @s test":
    /execute as @a unless score @s test = @s test run say "Score is reset"
  • Hurl all pigs skyward who are within 3 blocks of the nearest player:
    /execute at @p as @e[type=pig,distance=..3] run data merge entity @s {Motion:[0.0,2.0,0.0]}[Java Edition only]
  • Kill all zombies who have no headgear:
    /execute as @e[type=zombie] unless data entity @s ArmorItems[3].id run kill @s[Java Edition only]

History

Java Edition
1.13
{{Extension DPL}}<ul><li>[[Fermented Spider Eye|Fermented Spider Eye]]<br/>{{Item
| image = Fermented Spider Eye.png‎
| renewable = Yes
| stackable = Yes (64)
}}

A '''fermented spider eye''' is a [[brewing]] ingredient.

== Obtaining ==

=== Crafting ===

{{Crafting
|Brown Mushroom
|Sugar
|Spider Eye
|Output= Fermented Spider Eye
|type= Brewing
}}

== Usage ==
They can be used to brew [[potion]]s with negative effects, as well as the [[Potion of Invisibility]]. 

=== Brewing ingredient ===
{{brewing
  |showname=1
  |head=1
  |Fermented Spider Eye
  |Potion of Weakness
  |base=Water Bottle
}}
{{brewing
  |Fermented Spider Eye
  |Potion of Harming
  |base=Potion of Poison;Potion of Healing
}}
{{brewing
  |Fermented Spider Eye
  |Potion of Slowness
  |base=Potion of Swiftness;Potion of Leaping
}}
{{brewing
  |foot=1
  |Fermented Spider Eye
  |Potion of Invisibility
  |base=Potion of Night Vision
}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Fermented Spider Eye
|spritetype=item
|nameid=fermented_spider_eye
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Fermented Spider Eye
|spritetype=item
|nameid=fermented_spider_eye
|id=428
|form=item
|foot=1}}

== Video ==

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

== History ==
{{History|java}}
{{History||1.0.0|snap=Beta 1.9 Prerelease 2|[[File:Fermented Spider Eye JE1 BE1.png|32px]] Added fermented spider eyes.}}
{{History|||snap=Beta 1.9 Prerelease 3|Fermented spider eyes can now be [[brewing|brewed]] in a [[water bottle]] to create a [[potion of Weakness]].
|Fermented spider eyes now corrupt potions of [[Swiftness]] and [[Fire Resistance]] into potions of [[Slowness]], for both normal and extended types.
|Fermented spider eyes now corrupts potions of [[Healing]] and [[Poison]] into potions of [[Harming]], as well as Healing II and extended Poison into extended Harming.}}
{{History||1.4.2|snap=12w34a|Fermented spider eyes now change potions of [[Night Vision]] into the new potions of [[Invisibility]], for both normal and extended types.}}
{{History||1.7.2|snap=13w36a|Fermented spider eyes now corrupt the new [[potion of Water Breathing]] into a potion of Harming.}}
{{History||1.8|snap=14w27a|Fermented spider eyes now corrupt the new [[potion of Leaping]] into a potion of Slowness.}}
{{History||1.9|snap=15w31a|[[Potions of Weakness]] can no longer be made using a [[thick potion]], [[mundane potion]], [[awkward potion]], [[potion of Regeneration]], or [[potion of Strength]].
|[[Potions of Slowness]] can no longer be made using a [[potion of Fire Resistance]].
|[[Potions of Harming]] can no longer be made using a [[potion of Water Breathing]].}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 376.}}
{{History||1.14|snap=18w50a|[[File:Fermented Spider Eye JE2 BE2.png|32px]] The texture of fermented spider eyes has been changed.}}
{{History|upcoming java}}
{{History||Villager Trade Rebalance<br>(Experimental)|link=Java Edition 1.20.2|snap=23w31a|[[Wandering trader]]s now have a chance to [[trading|buy]] a fermented spider eye from the player.}}

{{History|pocket alpha}}
{{History||v0.12.1|snap=build 1|[[File:Fermented Spider Eye JE1 BE1.png|32px]] Added fermented spider eyes.}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Fermented Spider Eye JE2 BE2.png|32px]] The texture of fermented spider eyes has been changed.}}

{{History|console}}
{{History||xbox=TU7|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Fermented Spider Eye JE1 BE1.png|32px]] Added fermented spider eyes.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Fermented Spider Eye JE2 BE2.png|32px]] The texture of fermented spider eyes has been changed.}}

{{History|New 3DS}}
{{History||0.1.0|[[File:Fermented Spider Eye JE1 BE1.png|32px]] Added fermented spider eyes.}}
{{History|foot}}

== Issues ==
{{issue list}}

{{items}}

[[Category:Renewable resources]]

[[cs:Zkvašené pavoučí oko]]
[[de:Fermentiertes Spinnenauge]]
[[es:Ojo de araña fermentado]]
[[fr:Œil d'araignée fermenté]]
[[it:Occhio di ragno fermentato]]
[[ja:発酵したクモの目]]
[[ko:발효된 거미 눈]]
[[nl:Gefermenteerd spinnenoog]]
[[pl:Sfermentowane oko pająka]]
[[pt:Olho de aranha fermentado]]
[[ru:Приготовленный паучий глаз]]
[[th:ตาแมงมุมดอง]]
[[uk:Оброблене павуче око]]
[[zh:发酵蛛眼]]</li><li>[[Prismarine Shard|Prismarine Shard]]<br/>{{Item
| renewable =  Yes
| stackable = Yes (64)
| type =
}}
A '''prismarine shard''' is an item obtained by defeating [[guardian]]s or [[elder guardian]]s. It can be used to craft various [[prismarine]] blocks as well as [[sea lantern]]s.

== Obtaining ==

Prismarine shards are dropped upon the death of [[guardian]]s and [[elder guardian]]s. From these mobs, 0–2 shards are dropped each time. This can be increased to a maximum of 5 with the [[Looting]] enchantment.

== Usage ==

=== Crafting ingredient ===

{{crafting usage}}

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

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|showaliasids=y
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Prismarine Shard
|spritetype=item
|nameid=prismarine_shard
|aliasid=prismarineshard
|id=565
|form=item
|foot=1}}

== History ==

{{History|java}}
{{history||1.8|snap=14w25a|[[File:Prismarine Shard JE1 BE1.png|32px]] Added prismarine shards.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 409.}}
{{History||1.14|snap=18w43a|[[File:Prismarine Shard JE2 BE2.png|32px]] The texture of prismarine shards has now been changed.}}

{{History|pocket alpha}}
{{History||v0.16.0|snap=build 1|[[File:Prismarine Shard JE1 BE1.png|32px]] Added prismarine shards.}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Prismarine Shard JE2 BE2.png|32px]] The texture of prismarine shards has now been changed.}}

{{History|console}}
{{History||xbox=TU31|xbone=CU19|ps=1.22|wiiu=Patch 3|[[File:Prismarine Shard JE1 BE1.png|32px]] Added prismarine shards.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Prismarine Shard JE2 BE2.png|32px]] The texture of prismarine shards has now been changed.}}

{{History|New 3DS}}
{{History||1.3.12|[[File:Prismarine Shard JE1 BE1.png|32px]] Added prismarine shards.}}
{{History|foot}}

== Issues ==

{{issue list}}

{{items}}

[[de:Prismarinscherbe]]
[[es:Fragmento de prismarina]]
[[fr:Éclat de prismarine]]
[[ja:プリズマリンの欠片]]
[[ko:프리즈머린 조각]]
[[nl:Prismarienscherf]]
[[pl:Odłamek pryzmarynu]]
[[pt:Pedaço de prismarinho]]
[[ru:Призмариновый осколок]]
[[uk:Призмариновий уламок]]
[[zh:海晶碎片]]
[[Category:Renewable resources]]</li></ul>
17w45aReworked /execute. The syntax of /execute has been split off. See Commands/execute/Before for old syntax.
17w45bReworked /execute store.
18w02aAdded new subcommands to /execute to allow for more control over commands.
18w05aAdded /execute store (result|success) bossbar.
1.14
{{Extension DPL}}<ul><li>[[Saddle|Saddle]]<br/>{{about|normal saddles|the removed horse saddle|Horse Saddle}}
{{item
| image = <gallery>
Saddle (Pig).png | Pig
Saddle (Horse).png | Horse
Saddle (Strider).png | Strider
</gallery>
| invimage = Saddle
| renewable = Yes
| stackable = No
}}

A '''saddle''' is an [[item]] required to ride [[Pig|pigs]] and [[Strider|striders]] or control ridden [[camel]]s, [[Horse|horses]], [[Donkey|donkeys]] and [[Mule|mules]].

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

=== Fishing ===
Saddles can be obtained as a "treasure" item from [[fishing]] with a base chance (without fishing rod enchantments) of 0.8%.

=== Trading ===
Master-level [[Trading#Leatherworker|leatherworker]] [[villager]]s have a 50% chance to sell a saddle for 6 [[Emerald|emeralds]] as their trade.{{only|bedrock}} This trade is always offered in ''Java Edition''.

=== Mob loot ===
Any mob that the player equips with a saddle drops the saddle upon death.

A [[strider]] may spawn being ridden by a [[zombified piglin]], which causes it to spawn wearing a saddle. This saddle always drops when the strider is killed.

A [[ravager]] always spawns with a saddle and always drops the saddle upon death. Looting does not affect the drop.

== Usage ==
[[File:SaddledHorse.png|thumb|right|A [[horse]] equipped with a saddle.]]
While [[camel]]s, [[horse]]s, [[donkey]]s, [[mule]]s and [[Skeleton Horse|skeleton horse]]s{{Only|Java}} can always be ridden, a saddle is required to control them. These mobs (only after being tamed, in the case of equine mobs) can be equipped with a saddle by placing it in their inventory, which can be opened by pressing {{control|use}} while holding a saddle or {{control|sneaking}}. The saddle can be unequipped by removing it from {{SlotSprite|Saddle}} the specific inventory slot. 

Saddles are required to ride [[Pig|pigs]] and [[Strider|striders]], but even with a saddle their movement cannot be controlled like other mobs. A [[Carrot on a Stick|carrot on a stick]] (for pigs) or a [[Warped Fungus on a Stick|warped fungus on a stick]] (for striders) is required to direct these mobs. {{control|Using}} a saddle on one of these mobs equips them with the saddle, and, since they have no inventory, there is no way to retrieve the saddle without killing the mob.

Animals can also be equipped with saddles by a [[dispenser]].

Although [[ravager]]s are equipped with saddles and sometimes ridden by other mobs, the [[player]] is unable to ride ravagers.

== Sounds ==
{{edition|java}}:
{{Sound table
|rowspan=4
|sound=Saddle equip.ogg
|source=neutral
|subtitle=Saddle equips
|description=When a saddle is equipped to a camel
|id=entity.camel.saddle
|translationkey=subtitles.entity.horse.saddle
|volume=0.5
|pitch=0.8
|distance=16}}
{{Sound table
|subtitle=MC-184399
|source=neutral
|description=When a saddle is equipped to a strider
|id=entity.strider.saddle
|translationkey=-
|volume=0.5
|pitch=1.0
|distance=16}}
{{Sound table
|subtitle=Saddle equips
|source=neutral
|description=When a saddle is equipped to a horse, donkey, mule, skeleton horse, or zombie horse
|id=entity.horse.saddle
|translationkey=subtitles.entity.horse.saddle
|volume=0.5
|pitch=1.0
|distance=16}}
{{Sound table
|subtitle=Saddle equips 
|source=neutral
|description=When a saddle is equipped to a pig
|id=entity.pig.saddle
|translationkey=subtitles.entity.pig.saddle
|volume=0.5
|pitch=1.0
|distance=16
|foot=1}}

{{edition|bedrock}}:
{{Sound table
|type=bedrock
|rowspan=3
|sound=Saddle equip.ogg
|source=neutral
|description=When a saddle is equipped to a camel
|id=mob.horse.leather
|volume=1.0
|pitch=1.0}}
{{Sound table
|source=neutral
|description=When a saddle is equipped to a horse, mule, skeleton horse, or zombie horse
|id=mob.horse.leather
|volume=0.6
|pitch=1.0}}
{{Sound table
|source=neutral
|description=When a saddle is equipped to a donkey
|id=mob.horse.leather
|volume=0.5
|pitch=1.0
|foot=1}}

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

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Saddle
|spritetype=item
|nameid=saddle
|id=371
|form=item
|foot=1}}

== Achievements ==
{{load achievements|When Pigs Fly}}

== Advancements ==
{{load advancements|This Boat Has Legs}}

== History ==
{{needs render|type=old|isolated saddles in 1.13 dev|section=11}}
{{History|java infdev}}
{{History||20100625-2|[[File:Saddle (Pig) JE1 BE1.png|32px]] [[File:Saddle JE1 BE1.png|32px]] Added saddles.
|Saddles do not [[drops|drop]] from saddled [[pig]]s.
|Saddles can be found in the new [[dungeon]] [[chest]]s.}}
{{History|java}}
{{History||1.2.4|snap=release|When baby animals were introduced, baby [[pig]]s could be ridden just like adult pigs. After this version, baby pigs can no longer be saddled.}}
{{History||1.3.1|snap=12w21a|Saddles can now be [[trading|bought]] from butcher [[villager]]s for 6–7 [[emerald]]s each, and thus have become [[renewable resource|renewable]].}}
{{History||1.4.2|snap=12w36a|Saddles now [[drops|drop]] from killing saddled [[pig]]s.
|Added [[Carrot on a Stick|carrot on a stick]] to direct saddled pigs, effectively controlling them.}}
{{History|||snap=12w37a|Pigs can now jump when being ridden.}}
{{History||1.6.1|snap=13w18a|Regular saddles can now be used to ride [[horse]]s, while previously they required [[Horse Saddle|horse saddle]]s.
|Added saddles to the loot tables of [[mineshaft]] minecarts, [[stronghold]] altar chests, [[village]] blacksmith chests, as well as [[Desert pyramid|desert]] and [[jungle pyramid]]s.
|Added chests to [[Nether Fortress|nether fortresses]], where saddles can be found.}}
{{History||1.7.2|snap=13w36a|Saddles can now be [[fishing|fished]] with [[Fishing Rod|fishing rod]]s and are described as treasure.}}
{{History||1.8|snap=14w02a|[[Trading]] has been changed: leatherworker [[villager]]s now [[trading|sell]] saddles for 8–10 [[emerald]]s each, and butchers no longer [[trading|trade]] saddles.}}
{{History||1.9|snap=15w31a|Saddles can now be found in [[End City|end city]] [[chest]]s.}}
{{History|||snap=15w43a|The average yield of saddles in [[Nether Fortress|nether fortress]] chests has been slightly decreased.}}
{{History|||snap=15w44a|Saddles have been removed from [[mineshaft]] chests.
|The average yield of saddles in [[dungeon]] chests has been decreased.
|The average yield of saddles in [[desert pyramid|desert temple]] chests has been increased.}}
{{History||1.13|snap=17w45a|[[File:White Horse (Saddle) 17w45a.png|50px]] The models of the horse's saddle has been changed.}}
{{History|||snap=17w46a|[[File:White Horse (Saddle) 17w46a.png|50px]] The models of the horse's saddle has been changed once again.}}
{{History|||snap=17w47a|Prior to [[Java Edition 1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 329.}}
{{History|||snap=18w03a|[[File:White Horse (Saddle) 18w03a.png|50px]] The models of the horse's saddle has been changed once again.}}
{{History|||snap=pre2|[[File:White Horse (Saddle) 1.13pre2.png|50px]] The models of the horse's saddle has been changed once again. The reins bit has now been rendered. Also, the lines of the reins are no longer rendered except when riding.}}
{{History||1.14|snap=18w43a|Added [[ravager|illager beast]]s, which [[drops|drop]] saddles.
|[[File:Saddle (Pig) JE2 BE2.png|32px]] [[File:Saddle (Horse) JE2 BE2.png|32px]] <br>[[File:Saddle JE2 BE2.png|32px]] The textures of saddles have been changed.}}
{{History|||snap=18w48a|Saddles can now be found in [[chest]]s in [[village]] tanneries.}}
{{History|||snap=18w49a|Saddles can now be found in chests in [[savanna]] village houses.}}
{{History||1.16|snap=20w13a|[[File:Saddle (Strider) JE1 BE1.png|32px]] Added [[strider]]s, which can be ridden with saddles.}}
{{History|||snap=20w15a|Saddles placed in a [[dispenser]] can now saddle pigs, striders, and tamed horses, donkeys and mules.}}
{{History|||snap=20w16a|Saddles now generate in [[Bastion Remnant|bastion remnant]] chests.}}
{{History|||snap=20w17a|[[File:Saddle (Strider) JE2.png|32px]] The texture of the strider saddles has been changed. The front and back orientation of the saddle has been corrected.<ref>{{bug|MC-176116}}</ref>}}
{{History||1.19|snap=22w13a|Saddles may now be found in [[ancient city]] [[chest]]s.}}
{{History||1.20<br>(Experimental)|link=1.19.3|snap=22w42a|Saddles can be used to ride [[camel]]s with the use of a built-in experimental data pack.}}

{{History|pocket alpha}}
{{History||v0.7.0|[[File:Saddle JE1 BE1.png|32px]] Added saddles. They are currently unobtainable and have no practical usage since they cannot be equipped on any mobs.}}
{{History||v0.9.0|snap=build 1|Saddles can now be obtained from [[village]] blacksmith [[chest]]s.}}
{{History||v0.11.0|snap=build 1|Saddles can now be [[fishing|fished]] with [[fishing rod]]s and are described as treasure.}}
{{History||v0.12.1|snap=build 1|Saddles can now be found in [[nether fortress]]es.}}
{{History||v0.13.0|snap=build 1|Saddles can now be found in [[desert temple]]s.}} 
{{History||v0.15.0|snap=build 1|[[File:Saddle (Pig) JE1 BE1.png|32px]] [[File:Saddle (Horse) JE1 BE1.png|32px]] Saddles can now be used for riding [[horse]]s and [[pig]]s.|Saddles can now be found inside [[jungle temple]]s.}}
{{History||snap=?||Added saddles to the [[Creative inventory]].{{info needed}}}}
{{History|pocket}}
{{History||1.0.0|snap=alpha 0.17.0.1|Saddles can now be found in [[end cities]].}}
{{History||1.0.4|snap=alpha 1.0.4.0|Saddles are now [[trading|sold]] by leatherworker [[villager]]s for 8-10 [[emerald]]s as their only third tiers [[trading|trades]].}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|Saddles can now be found in [[plains]] [[village]] tannery and weaponsmith [[chest]]s.
|Added [[ravager]]s, which [[drops|drop]] a saddle upon death.
|[[File:Saddle (Pig) JE2 BE2.png|32px]] [[File:Saddle (Horse) JE2 BE2.png|32px]] <br>[[File:Saddle JE2 BE2.png|32px]] The textures of saddles have been changed.}}
{{History||1.11.0|snap=beta 1.11.0.1|Saddles can now be found in [[savanna]], [[snowy taiga]], [[taiga]] and [[snowy tundra]] village tannery [[chest]]s.
|Saddles can now be found in savanna, taiga, snowy taiga, and [[desert]] village weaponsmith chests.
|Saddles can now be found in savanna [[village]] house chests.}}
{{History|||snap=beta 1.11.0.4|[[Trading]] has been changed. Leatherworker [[villager]]s now have 50% chance to [[trading|sell]] saddles for 10 [[emerald]]s as part of their last tier [[trading|trade]].}}
{{History||1.12.0|snap=beta 1.12.0.3|The trading price of saddles has been lowered to 6 emeralds.}}
{{History||1.16.0|snap=beta 1.16.0.57|[[File:Saddle (Strider) JE1 BE1.png|32px]] Added [[strider]]s, which can be ridden with saddles.|Saddles now generate in [[Bastion Remnant|bastion remnant]] chests.}}
{{History||1.20.0<br>(Experimental)|link=Bedrock Edition 1.19.50|snap=beta 1.19.50.21|Saddles can now be used to ride [[camel]]s with the use of the "[[Bedrock Edition 1.20|Next Major Update]]" [[experimental]] toggle.}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Saddle (Pig) JE1 BE1.png|32px]] <br>[[File:Saddle JE1 BE1.png|32px]] Added saddles.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Saddle (Pig) JE2 BE2.png|32px]] [[File:Saddle (Horse) JE2 BE2.png|32px]] <br>[[File:Saddle JE2 BE2.png|32px]] The textures of saddles have been changed.}}

{{History|3ds}}
{{History||0.1.0|[[File:Saddle (Pig) JE1 BE1.png|32px]] <br>[[File:Saddle JE1 BE1.png|32px]] Added saddles.}}
{{History|foot}}

== Issues ==
{{issue list}}

== Trivia ==
* A saddle is considered "armor" by the game, but the value of protection to the animal is zero.
* A saddle on a pig can still be seen if the pig is afflicted with [[Invisibility]].
* When riding a saddled mob, the hunger bar is replaced by hearts (representing the mounted mob's health) resembling the look of the saddle.

== Gallery ==
<gallery>
File:Pig saddle.png|A [[player]] riding a [[pig]] (before [[Java Edition Beta 1.8|Beta 1.8]]).
File:Horse saddle.png|A player riding a [[horse]].
File:13w21a-new-HorseUI-inventory.png|The horse interface implemented in [[Java Edition 13w21a|13w21a]] that allows for the removal of saddles, but only on horses, [[donkey]]s or [[mule]]s.
File:Saddled Mule (picture).png|Mule equipped with both a saddle and a [[chest]].
File:GodSpawner.png|A saddle found in a monster room chest, which coincidentally contains an [[enchanted golden apple]].
</gallery>

== See also ==
* [[Transportation]]

== References ==
{{reflist}}

{{items}}

[[cs:Sedlo]]
[[de:Sattel]]
[[es:Montura]]
[[fr:Selle]]
[[hu:Nyereg]]
[[it:Sella]]
[[ja:鞍]]
[[ko:안장]]
[[nl:Zadel]]
[[pl:Siodło]]
[[pt:Sela]]
[[ru:Седло]]
[[zh:鞍]]
[[Category:Renewable resources]]
[[uk:Сідло]]</li><li>[[Axe|Axe]]<br/>{{For}}
{{Item
| image = <gallery>
Wooden Axe.png | Wooden
Stone Axe.png | Stone
Iron Axe.png | Iron
Golden Axe.png | Golden
Diamond Axe.png | Diamond
Netherite Axe.png | Netherite
</gallery>
| rarity = Common
| renewable = 
* '''Netherite''': No 
* '''Others''': Yes
| durability = 
'''Bedrock Edition'''
* Golden: 33
* Wooden: 60 
* Stone: 132
* Iron: 251
* Diamond: 1562
* Netherite: 2032
'''Java Edition'''
* Golden: 32
* Wooden: 59
* Stone: 131
* Iron: 250
* Diamond: 1561
* Netherite: 2031
| stackable = No
}}

An '''axe''' is a [[tool]] used to hasten the [[breaking]] of [[wood]]-based or other tough organic [[block]]s, strip or scrape certain blocks, or as a melee [[weapon]] that can disable [[Shield|shields]] it hits.

==Obtaining==
===Crafting===
{{Crafting
  |head=1
  |showname=0
  |showdescription=1
  |name=[[Axe]]
  |A1={Any Planks}; Iron Ingot; Gold Ingot; Diamond
  |B1={Any Planks}; Iron Ingot; Gold Ingot; Diamond
  |A2={Any Planks}; Iron Ingot; Gold Ingot; Diamond
  |B2=Stick
  |B3=Stick
  |Output= Wooden Axe; Iron Axe; Golden Axe; Diamond Axe
  |type= Tool
}}
{{Crafting
  |name=[[Stone Axe]]
  |A1=Any stone-tier block |B1=Any stone-tier block
  |A2=Any stone-tier block |B2=Stick
  |B3=Stick
  |Output=Stone Axe
  |type=Tool
  |description=Can use cobblestone and its other variants interchangeably.
}}
{{Crafting
  |foot=1
  |ignoreusage=1
  |name=[[Axe]]
  |ingredients=Damaged Matching [[Axe]]
  |Damaged Wooden Axe; Damaged Stone Axe; Damaged Iron Axe; Damaged Golden Axe; Damaged Diamond Axe; Damaged Netherite Axe
  |Damaged Wooden Axe; Damaged Stone Axe; Damaged Iron Axe; Damaged Golden Axe; Damaged Diamond Axe; Damaged Netherite Axe
  |Output=Wooden Axe; Stone Axe; Iron Axe; Golden Axe; Diamond Axe; Netherite Axe
  |description= The durability of the two axes is added together, plus an extra 5% durability.
  |type= Tool
}}

=== Upgrading ===
{{Smithing
|head=1
|Netherite Upgrade
|Diamond Axe
|Netherite Ingot
|Netherite Axe
|tail=1
}}

===Repairing===

====Grinding====
{{Grinding
|showdescription=1
|ingredients= 2× Damaged [[Wooden Axe]] or 2× Damaged [[Stone Axe]] or 2× Damaged [[Iron Axe]] or 2× Damaged [[Golden Axe]] or 2× Damaged [[Diamond Axe]] or 2× Damaged [[Netherite Axe]]
|Damaged Wooden Axe; Damaged Stone Axe; Damaged Iron Axe; Damaged Golden Axe; Damaged Diamond Axe; Damaged Netherite Axe
|Damaged Wooden Axe; Damaged Stone Axe; Damaged Iron Axe; Damaged Golden Axe; Damaged Diamond Axe; Damaged Netherite Axe
|Wooden Axe; Stone Axe; Iron Axe; Golden Axe; Diamond Axe; Netherite Axe
|description=The durability of the two axes is added together, plus an extra 5% of max durability.
}}

====[[Anvil mechanics#Unit repair|Unit repair]]====
An axe can be repaired in an [[anvil]] by adding units of the [[tiers|tier]]'s repair material, with each repair material restoring 25% of the axe's maximum durability, rounded down.

===Mob loot===

==== Equipment ====
{{Main|Drops#Equipped items}}

A [[vindicator]] spawns with an iron axe and has an 8.5% chance (9.5% with Looting I, 10.5% with Looting II, and 11.5% with Looting III) of dropping it upon death by the player. It is usually heavily damaged and is sometimes enchanted.

A [[piglin brute]] spawns with a golden axe and has an 8.5% chance (9.5% with Looting I, 10.5% with Looting II, and 11.5% with Looting III) of dropping it upon death by the player. Also, {{in|java}}, [[Zombified Piglin|zombified piglins]] can drop their golden axe (with the same chance as piglin brute drop) if they have been zombified from a [[Piglin Brute|piglin brute.]]

====Raids====
{{IN|be}}, [[Vindicator]] and [[pillager]]s that spawn in raids have a 4.1% chance (5.12% on hard) to drop a badly-damaged iron axe, which is sometimes enchanted with a random enchantment. A vindicator can drop 2 iron axes, one from natural equipment and one from raid drops.

===Trading===
Novice-level [[Trading#Toolsmith|Toolsmith]] [[villager]]s have a 25% chance to sell a stone axe for one [[emerald]], journeyman-level Toolsmith villagers have a 25% chance to sell an enchanted iron axe for eight emeralds, and expert-level Toolsmith villagers have a 50% chance to sell an enchanted diamond axe for 13 emeralds.{{only|bedrock}}

Novice-level [[Trading#Toolsmith 2|Toolsmith]] villagers have a 40% chance to sell a stone axe for one emerald, journeyman-level Toolsmith villagers have a 40% chance to sell an enchanted iron axe for 7-22 emeralds, and expert-level Toolsmith villagers have a 66.67% chance to sell an enchanted diamond axe for 18-35 emeralds.{{only|java}}

Novice-level [[Trading#Weaponsmith|Weaponsmith]] [[villager]]s sell an iron axe for 3 emeralds as one of their trades, and master-level Weaponsmith villagers sell an enchanted diamond axe for 12 emeralds.{{only|bedrock}}

Novice-level [[Trading#Weaponsmith 2|Weaponsmith]] villagers have a 66.67% chance to sell an iron axe for 3 emeralds. Master-level Weaponsmith villagers always offer to sell an enchanted diamond axe for 18-35 emeralds.{{only|java}}

The enchantments are the same as the ones obtained from an [[enchantment table]] at levels 5–19.

=== Villager gifts ===
[[Trading#Toolsmith 2|Toolsmith]] [[villagers]] occasionally throw stone axes at players with the [[Hero of the Village]] status effect.{{only|java}}

[[Trading#Weaponsmith 2|Weaponsmith]] [[villagers]] occasionally throw either stone, gold, or iron axes at players with the [[Hero of the Village]] status effect.{{only|java}}

===Structure loot===
{{IN|JE}}, a sealed room in [[woodland mansion]]s can appear that has a chest always containing an [[Efficiency]] I iron axe.
{{LootChestItem|wooden-axe,stone-axe,random-enchanted-golden-axe,damaged-random-enchanted-netherite-axe,iron-axe}}

==Usage==

===Chopping===
An axe is used to break [[logs]], blocks derived from wood and some other blocks faster than by using other tools. An axe uses 1 durability to break 1 block. For blocks that break instantly, it uses 0 durability.

====Durability====
Each tier of axe has a different durability:
{| class="wikitable sortable"
! Material
! [[Durability]]
|-
| {{itemLink|Wooden Axe|Wood|link=Axe}}
| 59
|-
| {{itemLink|Stone Axe|Stone|link=Axe}}
| 131
|-
| {{itemLink|Iron Axe|Iron|link=Axe}}
| 250
|-
| {{itemLink|Diamond Axe|Diamond|link=Axe}}
| 1561
|-
| {{itemLink|Golden Axe|Golden|link=Axe}}
| 32
|-
| {{itemLink|Netherite Axe|Netherite|link=Axe}}
| 2031
|}

====Speed====
The following table summarizes the speed at which axes of different qualities perform.
{{breaking row|Wooden Trapdoors|link=Trapdoor|sort=1|simple=1}}
{{breaking row|Wooden Doors|item=1|link=Door|sprite=oak-door}}
{{breaking row|Barrel}}
{{breaking row|Cartography Table}}
{{breaking row|Chest}}
{{breaking row|Trapped Chest}}
{{breaking row|Crafting Table}}
{{breaking row|Fletching Table}}
{{breaking row|Lectern}}
{{breaking row|Loom}}
{{breaking row|Smithing Table}}
{{breaking row|Bamboo Mosaic}}
{{breaking row|Block of Bamboo}}
{{breaking row|Campfire}}
{{breaking row|Fences}}
{{breaking row|Fence Gates}}
{{breaking row|Jukebox}}
{{breaking row|Logs}}
{{breaking row|Planks}}
{{breaking row|Wooden Slabs|link=Slabs|sprite=all-wooden-slabs}}
{{breaking row|Wooden Stairs|link=Stairs|sprite=all-wooden-stairs}}
{{breaking row|Bookshelf}}
{{breaking row|Chiseled Bookshelf}}
{{breaking row|Banners}}
{{breaking row|Jack o'Lantern}}
{{breaking row|Melon}}
{{breaking row|Pumpkin}}
{{breaking row|Sign|sprite=oak-sign}}
{{breaking row|Hanging Sign|sprite=hanging-oak-sign}}
{{breaking row|Note Block}}
{{breaking row|Mangrove Roots}}
{{breaking row|Wooden Pressure Plate|sprite=oak-pressure-plate}}
{{breaking row|Beehive}}
{{breaking row|Ladder}}
{{breaking row|Bee Nest|drop=0}}
{{breaking row|Composter}}
{{breaking row|Bamboo}}
{{breaking row|sprite=red-bed|Bed}}
{{breaking row|Cocoa}}
{{breaking row|Daylight Detector}}
{{breaking row|Mushroom Block|sprite=mushroom-blocks}}
{{breaking row|Vines|drop=0|foot=1}}

=== Stripping ===
{{control|Using}} an axe on a [[log]], [[wood]] block, [[block of bamboo]]\, or [[block of copper]] causes it to become a [[stripped log]], [[stripped wood]] block, [[block of stripped bamboo]], or removes one layer of oxidization or wax, respectively. This consumes one point of durability from the axe.

===Weapon===
An axe loses 2 points of durability when used as a weapon. 

==== Bedrock Edition ====
{{IN|bedrock}}, axes always attack instantly and deal {{hp|1}} less damage than a [[sword]] of the same quality but it lowers the durability of armor and shields faster than any other tool in-game.
{| class="wikitable" style="text-align:center" data-description="Bedrock damage"
! Material !! Damage
|-
| {{ItemSprite|Wooden Axe}} Wooden || rowspan="2" |{{hp|4}}
|-
| {{ItemSprite|Golden Axe}} Golden
|-
| {{ItemSprite|Stone Axe}} Stone ||{{hp|5}}
|-
| {{ItemSprite|Iron Axe}} Iron ||{{hp|6}}
|-
| {{ItemSprite|Diamond Axe}} Diamond ||{{hp|7}}
|-
| {{ItemSprite|Netherite Axe}} Netherite ||{{hp|8}}
|}

====Java Edition====

Attacking a [[shield]] user with an axe should have a chance to disable the use of the shield for 5 seconds, but currently this always disables a shield.<ref>{{bug|MC-197537}}</ref> The base chance is 25%, plus 5 percentage points per level of [[Efficiency]] on the axe, plus 75 percentage points if attacking while sprinting. [[Vindicator]]s, [[piglin brute]]s, or other [[mob]]s with commands always disable the player's shield. Damage done when using an axe as a weapon is more than that of a [[sword]] of the same tier, though they take longer than a sword to [[Damage#Attack cooldown|recover]], resulting in lower <abbr title="Damage/Second">DPS</abbr> (with the exception of [[gold]]en axes). The damage dealt and cooldown time depends on the type:

{| class="wikitable" style="text-align:center" data-description="Attack damage"
! Material
! {{ItemSprite|Wooden Axe|text=Wooden}}
! {{ItemSprite|Golden Axe|text=Gold}}
! {{ItemSprite|Stone Axe|text=Stone}}
! {{ItemSprite|Iron Axe|text=Iron}}
! {{ItemSprite|Diamond Axe|text=Diamond}}
! {{ItemSprite|Netherite Axe|text=Netherite}}
|-
! Attack Damage
| {{hp|7}}
| {{hp|7}}
| {{hp|9}}
| {{hp|9}}
| {{hp|9}}
| {{hp|10}}
|-
! Attack Speed
| 0.8
| 1.0
| 0.8
| 0.9
| 1.0
| 1.0
|-
! Recovery time
| {{convert|1.25|sec|tick|sep=}}
| {{convert|1|sec|tick|sep=}}
| {{convert|1.25|sec|tick|sep=}}
| {{convert|1.11|sec|tick|sep=}}
| {{convert|1|sec|tick|sep=}}
| {{convert|1|sec|tick|sep=}}
|-
! <abbr title="Damage/Second">DPS</abbr>
| 5.6
| 7.0
| 7.2
| 8.1
| 9.0
| 10.0
|-
! Lifetime damage inflicted<ref group="note">The formula to find the total lifetime damage is <code>ceil(''durability'' ÷ 2) × ''damage per hit''</code>. The durability is halved then ceiled because axes take double durability when used as a weapon, and the last 1 durability can also deal damage. The formula also ignores enchantments and critical hits, and assumes each attack is performed at maximum charge.</ref>
| {{hp|210}}
| {{hp|112}}
| {{hp|594}}
| {{hp|1125}}
| {{hp|7029}}
| {{hp|10160}}
|}
{{notelist}}

=== Enchantments ===
An axe can receive the following enchantments:
{| class="wikitable col-2-center col-3-right"
|+
!Name
!Max Level
![[Enchanting|Method]]
|-
|[[Fortune]]<ref group=note name=exc>Silk Touch and Fortune are mutually exclusive.</ref>
|III
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|-
|[[Silk Touch]]<ref group=note name=exc/>
|I
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|-
|[[Efficiency]]
|V
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|-
|[[Unbreaking]]
|III
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|-
|[[Sharpness]]<ref group="note" name="exc2">Sharpness, Smite, Bane of Arthropods, and Cleaving{{upcoming|java Combat Tests}} are mutually exclusive.</ref>
|V
|{{Inventory slot|Anvil}}
|-
|[[Smite]]<ref group="note" name=exc2/>
|V
|{{Inventory slot|Anvil}}
|-
|[[Bane of Arthropods]]<ref group="note" name=exc2/>
|V
|{{Inventory slot|Anvil}}
|-
|[[Fire Aspect]]{{upcoming|java Combat Tests}}<ref group="note" name="sword">Fire Aspect, Looting, Knockback, and Sweeping Edge currently exist, but they can be used only for [[sword]]s.</ref>
|II
|{{Inventory slot|Anvil}}
|-
|[[Looting]]{{upcoming|java Combat Tests}}<ref group="note" name="sword" />
|III
|{{Inventory slot|Anvil}}
|-
|[[Knockback]]{{upcoming|java Combat Tests}}<ref group="note" name="sword" />
|II
|{{Inventory slot|Anvil}}
|-
|[[Cleaving]]{{upcoming|java Combat Tests}}<ref group="note" name="exc2" />
|III
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|-
|[[Sweeping Edge]]{{upcoming|java Combat Tests}}<ref group="note" name="sword" />
|III
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|-
|[[Mending]]
|I
|{{Inventory slot|Anvil}}
|-
|[[Curse of Vanishing]]
|I
|{{Inventory slot|Anvil}}
|}

{{notelist}}

=== Fuel===
Wooden axes can be used as a fuel in [[furnace]]s, smelting 1 item per axe.

===Smelting ingredient===
{{Smelting|showname=1|Iron Axe;Golden Axe|Iron Nugget;Gold Nugget|0,1}}

===Piglins===
{{EntityLink|Piglin|Piglins}} are attracted to golden axes and run toward any golden axes on the ground, and inspect it for 6 to 8 seconds before putting it in their inventory.

== Sounds ==
{{el|je}}:
{{Sound table
|sound=Axe strip1.ogg
|sound2=Axe strip2.ogg
|sound3=Axe strip3.ogg
|sound4=Axe strip4.ogg
|subtitle=Axe strips
|source=block
|description=When an axe strips a log or wood block
|id=item.axe.strip
|translationkey=subtitles.item.axe.strip
|volume=0.9
|pitch=1.0/0.85
|distance=16}}
{{Sound table
|sound=wax_off1.ogg
|sound2=wax_off2.ogg
|sound3=wax_off3.ogg
|subtitle=Wax off
|source=block
|description=When an axe unwaxes a [[block of copper]]
|id=item.axe.wax_off
|translationkey=subtitles.item.axe.wax_off
|volume=1.0
|pitch=0.9/1.1/1.0
|distance=16}}
{{Sound table
|sound=scrape1.ogg
|sound2=scrape2.ogg
|sound3=scrape3.ogg
|subtitle=Axe scrapes
|source=block
|description=When an axe deoxidizes a block of copper
|id=item.axe.scrape
|translationkey=subtitles.item.axe.scrape
|volume=1.0
|pitch=1.0/0.9/1.1
|distance=16}}
{{Sound table
|sound=Random break.ogg
|subtitle=Item breaks
|source=player
|description=When an axe's durability is exhausted
|id=entity.item.break
|translationkey=subtitles.entity.item.break
|volume=0.8
|pitch=0.8-1.2
|distance=16
|foot=1}}

{{el|be}}:
{{Sound table
|type=bedrock
|sound=Wood hit1.ogg
|sound2=Wood hit2.ogg
|sound3=Wood hit3.ogg
|sound4=Wood hit4.ogg
|sound5=Wood hit5.ogg
|sound6=Wood hit6.ogg
|source=block
|description=When an axe strips a log or wood block <ref group=sound name=stripsoundbug>{{Bug|MCPE-106552}}</ref>
|id=use.wood
|volume=1.0
|pitch=0.8}}
{{Sound table
|sound=Stem step1.ogg
|sound2=Stem step2.ogg
|sound3=Stem step3.ogg
|sound4=Stem step4.ogg
|sound5=Stem step5.ogg
|sound6=Stem step6.ogg
|source=block
|description=When an axe strips a stem or hyphae block <ref group=sound name=stripsoundbug/>
|id=use.stem
|volume=1.0
|pitch=0.8}}
{{Sound table
|sound=Bamboo wood step1.ogg
|sound2=Bamboo wood step2.ogg
|sound3=Bamboo wood step3.ogg
|sound4=Bamboo wood step4.ogg
|sound5=Bamboo wood step5.ogg
|sound6=Bamboo wood step6.ogg
|source=player
|description=When an axe strips a [[block of bamboo]] <ref group=sound name=stripsoundbug/>
|id=step.bamboo_wood
|volume=1.0
|pitch=0.8}}
{{Sound table
|sound=Cherry wood step1.ogg
|sound2=Cherry wood step2.ogg
|sound3=Cherry wood step3.ogg
|sound4=Cherry wood step4.ogg
|sound5=Cherry wood step5.ogg
|sound6=Cherry wood step6.ogg
|source=player
|description=When an axe strips a cherry log or cherry wood block <ref group=sound name=stripsoundbug/>
|id=step.cherry_wood
|volume=1.0
|pitch=0.8}}
{{Sound table
|sound=wax_off1.ogg
|sound2=wax_off2.ogg
|sound3=wax_off3.ogg
|source=neutral
|description=When an axe unwaxes or deoxidizes a block of copper {{More info|Is use.copper used as well?}}
|id=copper.wax.off
|volume=1.0
|pitch=0.8-1.2}}
{{Sound table
|sound=Random break.ogg
|source=player
|description=When an axe's durability is exhausted
|id=random.break
|volume=1.0
|pitch=0.9
|foot=1}}

==Data values==
===ID===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Wooden Axe
|spritetype=item
|nameid=wooden_axe
|form=item}}
{{ID table
|displayname=Stone Axe
|spritetype=item
|nameid=stone_axe
|form=item}}
{{ID table
|displayname=Iron Axe
|spritetype=item
|nameid=iron_axe
|form=item}}
{{ID table
|displayname=Diamond Axe
|spritetype=item
|nameid=diamond_axe
|form=item}}
{{ID table
|displayname=Golden Axe
|spritetype=item
|nameid=golden_axe
|form=item}}
{{ID table
|displayname=Netherite Axe
|spritetype=item
|nameid=netherite_axe
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Wooden Axe
|spritetype=item
|nameid=wooden_axe
|id=311
|form=item}}
{{ID table
|displayname=Stone Axe
|spritetype=item
|nameid=stone_axe
|id=315
|form=item}}
{{ID table
|displayname=Iron Axe
|spritetype=item
|nameid=iron_axe
|id=298
|form=item}}
{{ID table
|displayname=Diamond Axe
|spritetype=item
|nameid=diamond_axe
|id=319
|form=item}}
{{ID table
|displayname=Golden Axe
|spritetype=item
|nameid=golden_axe
|id=325
|form=item}}
{{ID table
|displayname=Netherite Axe
|spritetype=item
|nameid=netherite_axe
|id=607
|form=item
|foot=1}}

==Achievements==
{{load achievements|MOAR Tools ;Oooh, shiny!}}

==Advancements ==
{{load advancements|Oh Shiny;Wax off}}

==History==
{{History|java indev}}
{{History||0.31|snap=20100110|[[File:Iron Axe JE1.png|32px]] Added iron axes.
|An axe is used to gather [[log|wood]] 400% faster than by hand.
|When starting in a new world, the [[player]] is given one of each [[tools|tool]].}}
{{History|||snap=20100122|[[File:Iron Axe JE2.png|32px]] The texture of axes has been changed. Half of the axe head has been removed.}}
{{History|||snap=20100124|[[File:Iron Axe JE3.png|32px]] The texture of axes has been changed again. The other axe head is now used instead.
|A complete toolset is no longer given to the [[player]] on starting a new world. Instead, there are multiple [[chest]]s in the later called "[[Indev House]]" containing a stack of most accessible [[blocks]]/[[items]] including [[tools]].}}
{{History|||snap=20100128|[[File:Wooden Axe JE1 BE1.png|32px]] [[File:Stone Axe JE1 BE1.png|32px]] [[File:Diamond Axe JE1 BE1.png|32px]] [[Tools]] now have tiers. Wooden, stone, and diamond axes have been added.
|[[File:Iron Axe JE4 BE1.png|32px]] The texture of iron axes has been changed.
|An axe held by the player is now rendered to appear more 3D.
|They cannot be crafted yet, but have been added to the item chest in the Indev house.}}
{{History|||snap=20100129|Wooden, stone, iron, and diamond axes can now be [[craft]]ed.}}
{{History|||snap=20100130|[[File:Golden Axe JE1.png|32px]] Axes can now be made out of gold.}}
{{History|||snap=20100201-1|[[Tools]] now take [[damage]] when being used. Better tools now last longer.}}
{{History||20100206|[[File:Golden Axe JE2 BE1.png|32px]] The texture of golden axes has been changed.}}
{{History|java beta}}
{{History||1.2|Gold [[tools]], including axes, now remove [[block]]s faster than diamond tools.}}
{{History|java}}
{{History||1.2.4|snap=release|[[Spruce planks]], [[birch planks]], and [[jungle planks]] can now be used to craft wooden axes.}}
{{History||1.3.1|snap=12w16a|Wooden and stone axes are now found in the new [[bonus chest]]s.}}
{{History|||snap=12w18a|Wooden axes can now be used as [[fuel]] in a [[furnace]].}}
{{History|||snap=12w21a|Blacksmith [[villager]]s now [[trading|sell]] 1 diamond axe for 9–11 [[emerald]]s, and 1 iron axe for 6–7 emeralds.}}
{{History||1.6.1|snap=13w21a|Instead of replacing the barehanded [[damage]] ({{hp|1}}), axes now add their damage onto the barehanded damage, which results in all axes doing {{hp|1}} more damage than before.}}
{{History||1.7.2|snap=1.7.1|[[Acacia planks]] and [[dark oak planks]] can now be used to craft wooden axes.}}
{{History||1.8|snap=14w02a|Weapon smith villagers now sell 1 [[enchanting|enchanted]] diamond axe for 9–12 emeralds, and 1 iron axe for 6–8 emeralds. Unenchanted diamond axes are no longer sold.}}
{{History||1.9|snap=15w34a|Axes now use the attack speed combat mechanic meter. The time it takes for the meter to fill up for an axe is 1.2 seconds.}}
{{History|||snap=15w34b|Axes now have an attack speed of 0.8, taking about 1.25 seconds to fill the attack meter.}}
{{History|||snap=15w34c|Axes do {{hp|4}} more [[damage]] than previously.
|Axes now have an attack speed of 0.85.
|Axes can now temporarily disable [[shield]] use.}}
{{History|||snap=15w35a|The [[damage]] of axes has been reduced by {{hp|1}}.
|The speed of axes has been increased to 0.9.}}
{{History|||snap=15w37a|Stone and diamond axes now both do {{hp|9}} damage, instead of the previous {{hp|8}} and {{hp|10}} respectively.
|Axes now have attack speed based on the tier, with wooden and stone having a speed of 0.8, iron having a speed of 0.9, and diamond and gold having a speed of 1.}}
{{History|||snap=15w43a|Stone axes may now be found in [[igloo]] basement chests.}}
{{History|||snap=15w44a|The average yield of stone and wooden axes from [[bonus chest]]s has been decreased.}}
{{History||1.11.1|snap=16w50a|Golden and iron axes now [[smelting|smelt]] down into one of their respective [[nugget]]s.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], these [[item]]s' numeral IDs were 271, 275, 258, 279 and 286.}}
{{History||1.13|snap=18w07a|{{control|Using}} an axe on a block of [[wood]] or [[log]] now turns it into a stripped block of wood or log.}}
{{History|||snap=18w09a|Stone axes now can generate in the [[chest]]s of [[underwater ruins]].}}
{{History|||snap=pre2|{{control|Using}} an axe on a bark now turns it into a stripped bark.}}
{{History||1.14|snap=18w43a|[[File:Wooden Axe JE2 BE2.png|32px]] [[File:Stone Axe JE2 BE2.png|32px]] [[File:Iron Axe JE5 BE2.png|32px]] [[File:Golden Axe JE3 BE2.png|32px]] [[File:Diamond Axe JE2 BE2.png|32px]] The textures of all axes have been changed.}}
{{History|||snap=19w11a|Toolsmith villagers now sell stone axes, as well as enchanted iron and diamond axes.}}
{{History|||snap=19w13a|Toolsmith villagers now give stone axes to players under the [[Hero of the Village]] effect.
|Weaponsmith villagers now give stone, golden and iron axes to players under the [[Hero of the Village]] effect.}}
{{History||1.16|snap=20w06a|[[File:Netherite Axe JE1.png|32px]] Added netherite axes.
|Netherite axes are obtained by combining one diamond axe and one netherite ingot in a crafting table.
|[[Crimson planks]] and [[warped planks]] can now be used to craft wooden axes.}}
{{History|||snap=20w09a|[[File:Diamond Axe JE3 BE3.png|32px]] The texture of diamond axes has been changed.}}
{{History|||snap=20w10a|[[File:Netherite Axe JE2.png|32px]] The texture of netherite axes has been changed.
|Netherite axes can no longer be crafted.
|Netherite axes are now obtained by combining one diamond axe and one netherite ingot in a smithing table.}}
{{History|||snap=20w15a|Stone axes can now be crafted using [[blackstone]].}}
{{History|||snap=20w16a|Golden axes now generate randomly enchanted in [[ruined portal]] chests.}} 
{{History||1.16.2|snap=20w30a|Enchanted golden axes can now be found in [[bastion remnant]] chests.}}
{{History||1.17|snap=21w08a|Stone axes can now be crafted using [[cobbled deepslate]].}}
{{History|||snap=21w11a|Axes can now be used to scrape wax and oxidation off [[copper block]]s.}}
{{History||1.19|snap=22w11a|[[Mangrove planks]] can now be used to craft wooden axes.}}
{{History||1.20 (Experimental)|link=1.19.3|snap=22w42a|Added [[block of bamboo]], which when used with an axe gives a block of stripped bamboo.}}
{{History||1.20<br>(Experimental)|link=1.19.4|snap=23w04a|Upgrading diamond axes to netherite axes now requires the netherite upgrade [[smithing template]].}}
{{History||1.20|snap=23w12a|Iron axes can now be found in [[suspicious gravel]] and [[suspicious sand]] in cold and warm [[ocean ruins]].}}

{{History|upcoming java}}
{{History||Combat Tests|snap=1.14.3 - Combat Test|The attack speed for all axes has been increased to 2.
|All axes now deal {{hp|1}} more [[damage]] than their sword counterparts.}}
{{History|||snap=Combat Test 3|The [[Cleaving|Chopping]] enchantment has been added for axes, which adds 1 damage and 0.5 seconds (10 [[game tick]]s) of [[shield]] stunning per level and is mutually exclusive with [[Sharpness]].
|Axes now always disable shields for {{convert|1.6|seconds|ticks}}, instead of having a 25% to disable them for 5 seconds (100 game ticks).
|Axes now take 1 damage when attacking instead of 2.
|The [[Sweeping Edge]] enchantment can now be applied to axes.}}
{{History|||snap=Combat Test 4|[[Knockback]], [[Looting]], and [[Fire Aspect]] enchantments can now be applied to axes.}}

{{History|pocket alpha}}
{{History||v0.2.0|[[File:Stone Axe JE1 BE1.png|32px]] Added stone axes.}}
{{History||v0.3.0|[[File:Wooden Axe JE1 BE1.png|32px]] Added wooden axes.
|Survival players no longer start with an infinite durability stone axe in the inventory.}}
{{History||v0.3.2|[[File:Iron Axe JE4 BE1.png|32px]] [[File:Golden Axe JE2 BE1.png|32px]] [[File:Diamond Axe JE1 BE1.png|32px]] Added iron, golden and diamond axes.}}
{{History||v0.4.0|Removed stone axes from the creative inventory.}}
{{History||v0.11.0|snap=build 11|All axes are now available in the [[creative]] [[inventory]].}}
{{History|||snap=build 12|All axes have been removed from creative.}}
{{History|||snap=build 13|All axes have been re-added to creative mode.}}
{{History||v0.12.1|snap=build 1|Instead of replacing the barehanded [[damage]] ({{hp|1}}), axes now add their damage onto the barehanded damage, which results in all axes doing {{hp|1}} more damage than before.}}
{{History|pocket}}
{{History||1.0.0|snap=alpha 0.17.0.1|Stone axes now can be found inside [[igloo]] basement [[chest]]s.}}
{{History||1.0.4|snap=alpha 1.0.4.0|Weaponsmith [[villager]]s now [[trading|sell]] iron axes for 6-8 [[emerald]]s as part of their first tier [[trading|trades]] and [[enchanting|enchanted]] diamond axes for 9-12 emeralds as part of their third tier trades.}}
{{History||1.1.0|snap=alpha 1.1.0.0|Iron and golden axes are now [[smelting|smeltable]].
|Iron axes with the [[Efficiency]] I enchantment can now be found inside [[chest]]s in [[woodland mansion]]s.
|Added [[vindicator]]s, who rarely [[drops|drop]] iron axes.}}
{{History|bedrock}}
{{History||1.2.0|snap=beta 1.2.0.2|Wooden and stone axes can now be found in [[bonus chest]]s.}}
{{History||1.4.0|snap=beta 1.2.13.8|Using an axe on a [[log]] now turns it into a stripped log.}}
{{History|||snap=beta 1.2.20.1|Stone axes can now be found inside [[underwater ruins]] chests.}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Wooden Axe JE2 BE2.png|32px]] [[File:Stone Axe JE2 BE2.png|32px]] [[File:Iron Axe JE5 BE2.png|32px]] [[File:Golden Axe JE3 BE2.png|32px]] [[File:Diamond Axe JE2 BE2.png|32px]] The textures of all axes have been changed.}}
{{History||1.11.0|snap=beta 1.11.0.4|[[Vindicator]]s and [[pillager]]s that spawn in [[raid]]s can now [[drops|drop]] an iron axe.
|[[Trading]] has been changed, weaponsmith [[villager]]s now [[trading|sell]] iron axes for 3 [[emerald]]s and [[enchanting|enchanted]] diamond axes for 12 emeralds as part of their fourth tier [[trading|trades]].
|Stone axes, enchanted iron axes, and diamond axes can now be [[trading|bought]] from toolsmith villagers.}}
{{History||1.16.0|snap=beta 1.16.0.51|[[File:Netherite Axe BE1.png|32px]] Added netherite axes.|Netherite axes are obtained by combining one diamond axe and one netherite ingot in a crafting table.
|[[File:Diamond Axe JE3 BE3.png|32px]] The texture of diamond axes has been changed.}}
{{History|||snap=beta 1.16.0.57|Netherite axes can no longer be crafted.
|Netherite axes are now obtained by combining one diamond axe and one netherite ingot in a smithing table.
|Stone axes can now be crafted using blackstone.
|Golden axes now generate randomly enchanted in [[ruined portal]] chests.
|Netherite axes now generate randomly enchanted in [[bastion remnant]] chests.}}
{{History||1.16.20|snap=beta 1.16.20.50|Added [[piglin brute]]s, who rarely drop golden axes.}}
{{History||1.16.100|snap=beta 1.16.100.54|Piglin brutes no longer spawn with enchanted axes.}}
{{History|||snap=beta 1.16.100.55|Zombified piglins that are converted from piglin brutes now keep their golden axes.}}
{{History||1.16.220|snap=beta 1.16.220.52|Axes can now be used to scrape wax off copper blocks.}}
{{History||1.18.30|snap=beta 1.18.30.26|Axes can now temporarily disable [[shield]] use. This is not mentioned in the official changelog.<ref>{{tweet|kingbdogz|1504505321884196872|We missed a change in recent changelogs for the Bedrock beta that you may like - we have now made a parity fix that makes shields get disabled for 5 seconds when attacked by an Axe-wielding mob or player. We will make sure to list this properly in the next beta :)|March 17, 2022}}</ref>
}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.00|wiiu=Patch 1|switch=1.0.1|[[File:Wooden Axe JE1 BE1.png|32px]] [[File:Stone Axe JE1 BE1.png|32px]] [[File:Iron Axe JE4 BE1.png|32px]] [[File:Golden Axe JE2 BE1.png|32px]] [[File:Diamond Axe JE1 BE1.png|32px]] Added axes (all five types).}}
{{History||xbox=TU53|xbone=CU43|ps=1.49|wiiu=Patch 23|switch=1.0.3|Iron and golden axes are now [[smelting|smeltable]].}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Wooden Axe JE2 BE2.png|32px]] [[File:Stone Axe JE2 BE2.png|32px]] [[File:Iron Axe JE5 BE2.png|32px]] [[File:Golden Axe JE3 BE2.png|32px]] [[File:Diamond Axe JE2 BE2.png|32px]] The textures of all axes have been changed.}}

{{History|New Nintendo 3DS Edition}}
{{History||0.1.0|[[File:Wooden Axe JE1 BE1.png|32px]] [[File:Stone Axe JE1 BE1.png|32px]] [[File:Iron Axe JE4 BE1.png|32px]] [[File:Golden Axe JE2 BE1.png|32px]] [[File:Diamond Axe JE1 BE1.png|32px]] Added axes.}}
{{History|foot}}

==Issues==
{{issue list}}

==Trivia==
*Before [[Java Edition 1.13]], in the language files, axes were referred to as Hatchets.<ref name="1.8 lang">''1.8/assets/minecraft/lang/en_US.lang'', line 915: '''item.hatchetIron.name= Iron Axe'''</ref>
*Weaponsmith villagers gifting stone, iron and golden axes is a reference to the story ''[[wikipedia:The Honest Woodcutter|The Honest Woodcutter]]'', where a woodcutter dropped his axe into a river, and is successively provided a silver and a golden axe by the river god.{{cn}}

== Gallery ==
<gallery>
Stone Axe SDGP.png|Stone axe in the [[Super Duper Graphics Pack]].
</gallery>
=== Enchanted axes ===
<gallery>
Enchanted Wooden Axe.gif
Enchanted Stone Axe.gif
Enchanted Iron Axe.gif
Enchanted Golden Axe.gif
Enchanted Diamond Axe.gif
Enchanted Netherite Axe.gif
</gallery>

==See also==
*{{ItemLink|Pickaxe}}

==References==
{{Reflist}}

== External Links ==
*[https://www.minecraft.net/en-us/article/taking-inventory--axe Taking Inventory: Axe] – Minecraft.net on February 6, 2020

{{items}}

[[Category:Combat]]

[[cs:Sekera]]
[[de:Axt]]
[[es:Hacha]]
[[fr:Hache]]
[[hu:Balta]]
[[ja:斧]]
[[ko:도끼]]
[[nl:Bijl]]
[[pl:Siekiera]]
[[pt:Machado]]
[[ru:Топор]]
[[th:ขวาน]]
[[uk:Сокира]]
[[zh:斧]]</li></ul>
18w43aAdded /execute (if|unless) data.
1.15
{{Extension DPL}}<ul><li>[[Beetroot|Beetroot]]<br/>{{about|the basic food item|the seeds|Beetroot Seeds|the soup|Beetroot Soup}}
{{Item
| title = Beetroot
| image = Beetroot.png
| heals = {{hunger|1}}
| renewable = Yes
| stackable = Yes (64)
}}

A '''beetroot''' is a food and [[dye]] ingredient.

== Obtaining ==

=== Farming ===
Beetroots are obtained from harvesting a fully grown [[beetroots|crop block]], which drops 1 beetroot and 1-4 seeds ({{frac|2|5|7}} seeds per plant harvested on average). Seed yield can be increased using a tool enchanted with [[Fortune]], with Fortune III harvesting an average of {{frac|5|3|7}} seeds per plant.

These crops can be found growing in [[village]]s or can be grown from planted [[beetroot seeds]].<!-- Do not add locations for finding seeds. Where to find seeds is described in the article about the seeds. -->

== Usage ==

=== Food ===
A beetroot can be eaten to restore {{hunger|1}} [[hunger]] and 1.2 hunger [[Hunger#Mechanics|saturation]]. Six beetroots can be crafted into [[beetroot soup]], which restores six times the hunger and saturation of a single beetroot.

=== Crafting ingredient ===
{{crafting usage}}

=== Breeding ===
Beetroots can be used to [[breeding|breed]] [[pig]]s. Pigs also follow a player who is holding beetroot.

[[Villager]]s can pick up beetroot items to become willing, allowing them to breed. Villagers need 12 beetroots before they can breed.

=== Composting ===
Placing beetroot into a [[composter]] has a 65% chance of raising the compost level by 1.

=== Trading ===

Novice-level Farmer villagers have a 25%{{only|bedrock}} or 40%{{only|java}} chance to buy 15 beetroots for an emerald.

== Sounds ==

{{Sound table/Entity/Food}}

== Data values ==

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

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Beetroot
|spritetype=item
|nameid=beetroot
|id=285
|form=item
|foot=1}}

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

== History ==
{{History|java}}
{{History||1.9|snap=15w31a|[[File:Beetroot JE1 BE1.png|32px]] Beetroots have been added, along with its [[beetroot seeds|seeds]] and [[beetroot soup]]. Beetroot can also be used to craft [[rose red]] dye.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 434.}}
{{History||1.14|snap=18w43a|[[File:Beetroot JE2 BE2.png|32px]] The texture of beetroot has been changed.}}
{{History|||snap=19w03a|Placing beetroot into the new [[composter]] has a 50% chance of raising the compost level by 1.}}
{{History|||snap=19w05a|Beetroot now has a 65% chance of increasing the compost level in a composter by 1.}}
{{History|||snap=19w11a|Farmer [[villager]]s now [[trading|buy]] beetroots.}}
{{History||1.17|snap=21w13a|The model of the [[crop]] for the beetroot crops has been tweaked that the backside textures are mirrored.}}

{{History|pocket alpha}}
{{History||November 13, 2013|link=http://instagram.com/p/gnkWOlJMB3/|[[Jeb]] announces on [[wikipedia:Instagram|Instagram]] that [[Johan Bernhardsson]] is working on a surprise feature for 0.8.0 alongside a picture of the [[player]] holding beetroot.}}
{{History||November 14, 2013|link={{tweet|jbernhardsson|400902957782147072}}|Johan posts another image of beetroot, confirming that the image previously posted by Jeb was indeed beetroot.}}
{{History||v0.8.0|snap=build 2|[[File:Beetroot JE1 BE1.png|32px]] Added beetroots. They are not obtainable in the Creative inventory.}}
{{History||v0.9.0|snap=build 1|Beetroot can now be used to lead and [[breeding|breed]] [[pig]]s.}}
{{History||v0.12.1|snap=build 1|Beetroot now restore [[hunger]], rather than [[health]].
|Beetroot can now generate in [[village]]s as [[crop]]s.}}
{{History||v0.13.1|Added beetroot to the Creative inventory.<ref name="missing beetroot item">https://bugs.mojang.com/browse/MCPE-10497</ref><!---{{info needed}}, the bug tracker has very little information. It's not in the Creative inventory in v0.12.1 or v0.13.0 initial release, but is in v0.14.0--->}}
{{History||v0.16.0|snap=build 1|Beetroot can now be used to craft [[rose red]] dye.}}
{{History||v0.16.2|Beetroot can now be found in [[chest]]s inside large houses in [[snowy taiga]] and [[snowy tundra]] [[village]]s.}}
{{History|pocket}}
{{History||1.0.4|snap=alpha 1.0.4.0|[[Villager]]s can now can pick up beetroot to become willing.}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Beetroot JE2 BE2.png|32px]] The texture of beetroot has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.1|Beetroot can now be used to fill up [[composter]]s.}}
{{History|||snap=beta 1.11.0.4|Beetroot can now be sold to farmer villagers.}}

{{History|console}}
{{History||xbox=TU43|xbone=CU33|ps=1.36|wiiu=Patch 13|switch=1.0.1|[[File:Beetroot JE1 BE1.png|32px]] Added beetroots.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Beetroot JE2 BE2.png|32px]] The texture of beetroot has been changed.}}

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

== Issues ==

{{Issue list}}

== Gallery ==

<gallery>
File:Beetrootstwitpic.png|The image released by [[Johan Bernhardsson]] on [[Wikipedia:Twitter|Twitter]].
File:Pigs following beetroot holder.png|Pigs following the [[player]].
File:Village Wheat Beetroot Farm.png|Beetroots generated in a [[village]].
File:Beetroot farm.png|A beetroot garden.
</gallery>

== References ==
{{Reflist}}

{{Items}}

[[Category:Plants]]
[[Category:Food]]
[[Category:Renewable resources]]

[[cs:Červená řepa]]
[[de:Rote Bete]]
[[es:Remolacha]]
[[fr:Betterave]]
[[hu:Cékla]]
[[it:Barbabietola]]
[[ja:ビートルート]]
[[ko:비트]]
[[nl:Biet]]
[[pl:Burak]]
[[pt:Beterraba]]
[[ru:Свёкла]]
[[th:บีทรูท]]
[[uk:Буряк]]
[[zh:甜菜根]]</li><li>[[Netherite Ingot|Netherite Ingot]]<br/>{{About|the refined item|the scrap|Netherite Scrap|the ore|Ancient Debris|other uses|Netherite}}
{{Item
| rarity = Common
| renewable = No
| stackable = Yes (64)
}}
'''Netherite ingots''' are items obtained from crafting [[netherite scrap]]s and [[gold ingot]]s together, as well as loot from [[bastion remnant]] loot chests. Unlike other items, they are immune to fire and [[lava]] damage. They are primarily used to upgrade [[diamond]] gear and craft [[lodestone]]s.

== Obtaining ==

Netherite ingots are obtained by crafting four [[netherite scrap]]s and four [[gold ingot]]s. It is a shapeless recipe, therefore the placement of the netherite scraps and gold ingots does not matter when crafting it.

=== Crafting ===

{{Crafting
|head=1
|showname=0
|Netherite Scrap
|Netherite Scrap
|Netherite Scrap
|Netherite Scrap
|Gold Ingot
|Gold Ingot
|Gold Ingot
|Gold Ingot
|Output=Netherite Ingot
|type=Material
}}

{{Crafting 
|Block of Netherite
|Output=Netherite Ingot,9
|type=Material
|foot=1
}}

=== Chest loot ===
{{LootChestItem|netherite-ingot}}

== Usage ==
Netherite ingots are crafting materials used to make netherite tools, weapons, and armor.

=== Crafting ingredient ===

{{crafting usage}}

=== Smithing ingredient ===
Netherite ingots can be used on a [[smithing table]] to upgrade diamond items to netherite items, as well as trim any armor piece. Data such as durability, enchantments, and custom names are preserved.

{{Smithing
|head=1
|ingredients=[[Netherite Upgrade]] +<br>Any [[diamond]] gear +<br>[[Netherite Ingot]]
|Netherite Upgrade
|Diamond Helmet; Diamond Chestplate; Diamond Leggings; Diamond Boots; Diamond Sword; Diamond Pickaxe; Diamond Axe; Diamond Shovel; Diamond Hoe
|Netherite Ingot
|Netherite Helmet; Netherite Chestplate; Netherite Leggings; Netherite Boots; Netherite Sword; Netherite Pickaxe; Netherite Axe; Netherite Shovel; Netherite Hoe
}}
{{Smithing
|ingredients=Any Armor Trim +<br/>Any Armor Piece + <br/>Netherite Ingot
|Any Armor Trim Smithing Template
|Diamond Chestplate
|Netherite Ingot
|Netherite Trim Diamond Chestplate
|showdescription=1
|description = All armor types can be used in this recipe,<br/>a diamond chestplate is shown as an example.<br/>
|tail=1
}}

'''Trim color palette'''
The following color palettes are shown on the designs on trimmed armor:
* {{TrimPalette|netherite ingot}}
* {{TrimPalette|netherite ingot|darker=1}} (a darker color palette is used when a netherite armor piece is trimmed using a netherite ingot).

=== Repairing ===

Netherite ingots are the repair items for the netherite [[tier]] and [[armor material]], and thus can be used to [[item repair|repair]] the following items in an [[anvil]]:
* {{ItemLink|Netherite Helmet}}
* {{ItemLink|Netherite Chestplate}}
* {{ItemLink|Netherite Leggings}}
* {{ItemLink|Netherite Boots}}
* {{ItemLink|Netherite Sword}}
* {{ItemLink|Netherite Pickaxe}}
* {{ItemLink|Netherite Axe}}
* {{ItemLink|Netherite Shovel}}
* {{ItemLink|Netherite Hoe}}

=== Beacons ===

A netherite ingot could be used to select powers from a [[beacon]] instead of using an [[emerald]], [[gold ingot]], [[iron ingot]], or a [[diamond]]. The player must select one of the available powers, and then insert an ingot in the item slot. The [[gold]] option is more efficient than the netherite option because it consumes 3 fewer gold and no [[Netherite Scrap|netherite scrap]].

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showitemtags=y
|showforms=y
|generatetranslationkeys=y
|displayname=Netherite Ingot
|spritetype=item
|nameid=netherite_ingot
|itemtags=beacon_payment_items
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Netherite Ingot
|spritetype=item
|nameid=netherite_ingot
|id=603
|form=item
|foot=1}}

=== Advancements ===
{{load advancements|Serious dedication}}

== History ==
{{History|java}}
{{History||1.16|snap=20w06a|[[File:Netherite Ingot JE1 BE2.png|32px]] Added netherite ingots.}}
{{History|||snap=20w07a|Netherite ingots can now be used to power [[beacon]]s.}}
{{History|||snap=20w10a|The [[crafting]] recipe for netherite [[tools]] and [[armor]] has been changed so that a [[smithing table]] is used instead of a [[crafting table]] and [[enchanting|enchantments]] are preserved when upgrading [[item]]s.}}
{{History|||snap=20w13a|Netherite ingots can now be used to craft [[lodestone]]s.}}
{{History|||snap=20w16a|Netherite ingots can now be found in [[bastion remnant]] chests.}}
{{History||1.16.2|snap=20w30a|Increased the chance of finding netherite ingots in bastion remnant chests from 16.8% to 42.1%.}}
{{History||1.20<br>(Experimental)|link=1.19.4|snap=23w04a|Netherite ingots can now be used as an armor trim material.|Upgrading diamond tools and armor to netherite now requires the netherite upgrade [[smithing template]] in addition to a netherite ingot.}}
{{History|||snap=23w05a|Netherite ingots can now be used to trim netherite armor.}}
{{History||1.20|snap=23w12a|Netherite ingots are now usable for trimming without requiring the "Update 1.20" experimental datapack to be enabled.}}

{{History|bedrock}}
{{History||1.16.0|snap=beta 1.16.0.51|[[File:Netherite Ingot BE1.png|32px]] Added netherite ingots.}}
{{History|||snap=beta 1.16.0.57|Netherite ingots can now be used to power [[beacon]]s.
|The [[crafting]] recipe for netherite [[tools]] and [[armor]] has been changed so that a [[smithing table]] is used instead of a [[crafting table]] and [[enchanting|enchantments]] are preserved when upgrading [[item]]s.
|Netherite ingots can now be used to craft [[lodestone]]s.
|Netherite ingots can now be found in [[bastion remnant]] chests.}}
{{History||1.17.10|snap=beta 1.17.10.20|[[File:Netherite Ingot JE1 BE2.png|32px]] The texture of netherite ingots has been changed to match ''Java Edition''.}}
{{History||Next Major Update<br>(Experimental)|link=Bedrock Edition 1.19.80|snap=beta 1.19.80.21|Netherite ingots can now be used as an armor trim material.|Upgrading diamond tools and armor to netherite now requires the netherite upgrade [[smithing template]] in addition to a netherite ingot.}}
{{History||1.20.0|snap=beta 1.20.0.21|Netherite ingots are now usable for trimming without requiring the "Next Major Update" experimental toggle to be enabled.}}
{{History|foot}}

== Issues ==
{{issue list}}

== See also ==
* {{EnvLink|Bastion Remnant}}
* {{BlockLink|Block of Netherite}}
* {{ItemLink|Netherite Scrap}}
*  {{BlockLink|Ancient Debris}}
*{{BlockLink|Lodestone}}

== External Links ==
* [https://www.minecraft.net/en-us/article/taking-inventory--netherite-ingot Taking Inventory: Netherite Ingot] – Minecraft.net on May 28, 2020

{{Items}}

[[de:Netheritbarren]]
[[es:Lingote de netherita]]
[[fr:Lingot de Netherite]]
[[it:Lingotto di netherite]]
[[ja:ネザライトインゴット]]
[[ko:네더라이트 주괴]]
[[pl:Sztabka netherytu]]
[[pt:Barra de netherita]]
[[ru:Незеритовый слиток]]
[[th:แท่งเนเธอไรต์]]
[[uk:Незеритовий злиток]]
[[zh:下界合金锭]]
[[Category:Non-renewable resources]]</li></ul>
19w38aAdded /execute (if|unless) predicate.
Added /execute store (result|success) storage.
1.19.3
{{Extension DPL}}<ul><li>[[Bottle o' Enchanting|Bottle o' Enchanting]]<br/>{{ItemEntity
|image=Bottle o' Enchanting.gif
|imagesize=160px
|invimage=Bottle o' Enchanting
|stackable=Yes (64)
|renewable=Yes
|size=Height: 0.25 Blocks<br>Width: 0.25 Blocks
|rarity=Uncommon
|networkid='''[[JE]]''': 75
}}

A '''bottle o' enchanting''' is a throwable item that releases [[experience]] orbs on impact.

== Obtaining ==

=== Trading ===
Master-level cleric [[villager]]s sell bottles o' enchanting for 3 emeralds as part of their trade.

=== Natural generation ===

{{LootChestItem|bottle-o'-enchanting}}

== Usage ==

A bottle o' enchanting can be thrown by pressing {{control|use}}. On impact, it drops [[experience]] orbs worth {{xp|3|11}} (average 7.0) and sends out blue particles.

== Sounds ==
{{Edition|Java}}:<br>
Bottles o' enchanting use the Friendly Creatures sound category for entity-dependent sound events.
{{Sound table
|sound=Glass dig1.ogg
|sound2=Glass dig2.ogg
|sound3=Glass dig3.ogg
|subtitle=Bottle smashes
|source=neutral
|description=When a bottle o' enchanting impacts something
|id=entity.splash_potion.break
|translationkey=subtitles.entity.potion.splash
|volume=1.0
|pitch=0.9-1.0
|distance=16}}
{{Sound table
|rowspan=2
|sound=Bow shoot.ogg
|subtitle=Bottle thrown
|source=neutral
|description=When a bottle o' enchanting is thrown by a player
|id=entity.experience_bottle.throw
|translationkey=subtitles.entity.potion.throw
|volume=0.5
|pitch={{frac|1|3}}-0.5
|distance=16}}
{{Sound table
|subtitle=Dispensed item
|source=block
|description=When a bottle o' enchanting is dispensed from a [[dispenser]]
|id=block.dispenser.launch
|translationkey=subtitles.block.dispenser.dispense
|volume=1.0
|pitch=1.2
|distance=16
|foot=1}}

{{Edition|Bedrock}}:
{{Sound table
|type=bedrock
|sound=Glass dig1.ogg
|sound2=Glass dig2.ogg
|sound3=Glass dig3.ogg
|source=block
|description=When a splash potion impacts something
|id=random.glass
|volume=1.0
|pitch=1.0}}
{{Sound table
|rowspan=2
|sound=Bow shoot.ogg
|source=player
|description=When a splash potion is thrown by a player
|id=random.bow
|volume=0.5
|pitch=0.33-0.5}}
{{Sound table
|source=player
|description=When a splash potion is dispensed from a dispenser
|id=random.bow
|volume=1.0
|pitch=0.83-1.25
|foot=1}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|firstcolumnname=Item
|showforms=y
|generatetranslationkeys=y
|displayname=Bottle o' Enchanting
|spritetype=item
|nameid=experience_bottle
|form=item
|foot=1}}
{{ID table
|edition=java
|firstcolumnname=Entity
|generatetranslationkeys=y
|displayname=Thrown Bottle o' Enchanting
|spritetype=entity
|spritename=Bottle o' Enchanting
|nameid=experience_bottle
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|firstcolumnname=Item
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Bottle o' Enchanting
|spritetype=item
|nameid=experience_bottle
|id=508
|form=item
|foot=1}}
{{ID table
|edition=bedrock
|firstcolumnname=Entity
|shownumericids=y
|generatetranslationkeys=y
|displayname=Bottle o' Enchanting
|spritetype=entity
|nameid=xp_bottle
|id=68
|foot=1}}

=== Entity data ===
{{see also|Chunk format}}

Thrown bottles o' enchanting have entity data that define various properties of the entity.

{{/ED}}

== History ==
<!--When were dispensers made able to fire these? Or was this always a thing?-->
{{History|java}}
{{History||1.2.1|snap=12w04a|[[File:Bottle o' Enchanting JE1 BE1.png|32px]] Added bottles o' enchanting. 
|Bottles o' enchanting can currently be obtained only in [[creative]] mode.}}
{{History||1.3.1|snap=12w21a|With the implementation of the [[trading]] system, the [[player]] can now trade with priest [[villager]]s to obtain 2–4 bottles o' enchanting for 1 [[emerald]].}}
{{History||1.8|snap=14w02a|With the trading revamp, villagers no longer [[trading|sell]] bottles o' enchanting, making them again unobtainable in regular [[survival]].}}
{{History|||snap=14w31a|Cleric [[villager]]s now sell bottles o' enchanting for 3–11 [[emerald]]s each, making them [[renewable resource|renewable]] again.}}
{{History||1.9|snap=15w49a|Bottles o' enchanting, like all projectiles, now take thrower's motion into account.}}
{{History||1.11|snap=16w32a|The entity ID has now been changed from <code>ThrownExpBottle</code> to <code>xp_bottle</code>.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 384.}}
{{History|||snap=18w11a|Bottles o' enchanting can now generate in [[shipwreck]] chests.}}
{{History|||snap=pre5|The entity ID has now been changed to <code>experience_bottle</code>.}}
{{History||1.14|snap=18w43a|[[File:Bottle o' Enchanting JE2 BE2.png|32px]] The texture of bottles o' enchanting has now been changed.}}
{{History|||snap=18w47a|Bottles o' enchanting can now generate in [[pillager outpost]] chests.}}
{{History||1.19|snap=22w13a|Bottles o' enchanting may now be found in [[ancient city]] [[chest]]s.}}

{{History|pocket alpha}}
{{History||v0.12.1|snap=build 1|[[File:Bottle o' Enchanting JE1 BE1.png|32px]] Added bottles o' enchanting. 
|Due to the lack of [[trading]], bottles o' enchanting are currently available only in [[creative]] mode, similar to [[Java Edition 12w04a|12w04a]] when it was first released.}}
{{History|pocket}}
{{History||1.0.4|snap=alpha 1.0.4.0|With [[villager]] [[trading]] added, it is now possible to obtain bottles o' enchanting legitimately.}}
{{History||1.1.0|snap=alpha 1.1.0.0|The entity ID has now been changed from <code>potion.experience</code> to <code>xp_bottle</code>.}}
{{History|bedrock}}
{{History||1.4.0|snap=beta 1.2.14.2|Bottles o' enchanting can now be found inside [[shipwreck]] and [[buried treasure]] [[chest]]s.}}
{{History||1.10.0|snap=beta 1.10.0.3|Bottles o' enchanting can now be found in [[pillager outpost]] chests.
|[[File:Bottle o' Enchanting JE2 BE2.png|32px]] The texture of bottles o' enchanting has now been changed.}}
{{History||1.11.0|snap=beta 1.11.0.4|[[Trading]] has now been changed and bottles o' enchanting are now [[trading|sold]] by cleric [[villager]]s for 3 [[emerald]]s.}}

{{History|console}}
{{History||xbox=TU7|xbone=CU1|ps=1.0|wiiu=Patch 1|[[File:Bottle o' Enchanting JE1 BE1.png|32px]] Added bottles o' enchanting.
|Bottle o' enchanting can be found in the Miscellaneous tab in the [[Creative inventory]].}}
{{History||xbox=TU12|Moved bottle o' enchanting to the Brewing tab in the Creative inventory.}}
{{History|PS4}}
{{History||1.90|[[File:Bottle o' Enchanting JE2 BE2.png|32px]] The texture of bottles o' enchanting has now been changed.}}

{{History|3ds}}
{{History||0.1.0|[[File:Bottle o' Enchanting JE1 BE1.png|32px]] Added bottles o' enchanting.
|Bottles o' enchanting are not available within the [[Creative inventory]].}}
{{History||?|Added bottles o' enchanting to the Creative inventory.{{info needed|Which update did this occur?}}}}
{{History|foot}}

== Issues ==
{{issue list|Bottle o' Enchanting|Experience Bottle}}

== Gallery ==

<gallery>
Bottle O' Enchanting Splash.gif|Bottle o' enchanting splash animation on impact.
Bottle O' Enchanting villager.png|Players may trade with villagers to obtain bottles o' enchanting in survival mode.
</gallery>


{{Items}}
{{Entities}}

[[cs:Lektvar očarování]]
[[de:Erfahrungsfläschchen]]
[[es:Frasco con experiencia]]
[[fr:Fiole d'expérience]]
[[ja:エンチャントの瓶]]
[[ko:경험치 병]]
[[pl:Zaklęta butelka]]
[[pt:Frasco de experiência]]
[[ru:Зелье опыта]]
[[th:ขวดแห่งเวทมนตร์]]
[[zh:附魔之瓶]]</li><li>[[A Very Fine Item|A Very Fine Item]]<br/>{{Joke feature}}
{{Item
| image = A Very Fine Item.png
| renewable = No
| stackable = Yes (64)
}}

'''A very fine item''' was a joke item from [[Java Edition 20w14∞]], found only in the {{code|isolation}} dimension.

== Appearance ==
The texture of a very fine item resembles the side face of a grass block with the words "Home Sweet Home" written on it. Unlike most items, its texture is 64x64 pixels, rather than the usual 16x16.

== Obtaining ==
=== Dimension ===
A very fine item can only be obtained from an item frame in the {{Code|isolation}} dimension. There is a maximum of 1 fine item that can be found legitimately in any world.

=== Cheats/Creative mode ===
This item can't be found in the creative inventory, but it can be middle-click duplicated in creative mode or given with the {{Code|code=give <target> minecraft:fine_item <amount>}} command.

== Usage ==
This item cannot be placed or used in any way other than a trophy. It can still be inserted and/or rotated inside of an item frame.

== Data values ==

=== ID ===
{{ID table
|showforms=y
|generatetranslationkeys=java
|displayname=A Very Fine Item
|spritetype=item
|nameid=fine_item
|form=item
|foot=1}}

== History ==
{{History|java}}
{{History||20w14∞|[[File:A Very Fine Item.png|32px]] Added a very fine item.}}
{{History|foot}}

== Gallery ==
<gallery>
File:isolation biome.png|The Easter Egg dimension that the item spawns in.
</gallery>

== References ==
{{reflist}}

{{Items}}
{{Jokes}}

[[Category:Non-renewable resources]]
[[Category:Joke items]]

[[es:A Very Fine Item]]
[[pt:Um item muito bom]]</li></ul>
22w46aAdded /execute (if|unless) biome.
1.19.4
{{Extension DPL}}<ul><li>[[Egg|Egg]]<br/>{{About|chicken eggs|the similar item that spawns mobs|Spawn egg|other uses}}
{{ItemEntity
|image=Egg.png
|renewable=Yes
|stackable=Yes (16)
|size=Height: 0.25 Blocks<br>Width: 0.25 Blocks
}}

An '''egg''' is an [[item]] that can be used to craft [[food]] items, or thrown for a chance to spawn [[chick]]s on impact.

== Obtaining ==
=== Mob loot ===
{{see also|Tutorials/Egg farming}}
A [[chicken]] drops an egg item every 5–10 minutes. The theoretical average would be expected at 1 egg every 7.5 minutes, or 0.1333 eggs per minute.

A [[fox]] sometimes spawns holding an egg, which it always drops upon death. Alternatively, a player dropping a food item causes the fox to drop the egg.

=== Chest loot ===
{{LootChestItem|egg}}

== Usage ==

=== Crafting ingredient ===
{{crafting usage}}

=== Combat ===
Players are able to throw eggs and deal knockback to [[mob]]s (but not other players{{only|JE|short=1}}<ref>{{bug|MC-3179|||WAI}}</ref>{{until|JE Combat Tests}}), but no damage is dealt, similar to a [[snowball]]. Likewise, throwing eggs at [[neutral mobs]] provokes them. Eggs can also be fired from [[dispenser]]s and are affected by gravity.

=== Spawning chickens ===
When thrown by a dispenser or by pressing the {{control|use}} button, an egg has a {{fraction|1|8}} (12.5%) chance of spawning a [[chick]]. If this occurs, there is a {{fraction|1|32}} (3.125%) chance of spawning three additional chicks (on average, 1 out of every 256 eggs spawns 4 chicks). In other words, whenever an egg is thrown, there is a {{fraction|31|256}} chance of spawning 1 chick and a {{fraction|1|256}} chance of spawning four chicks.

The expected value of the number of chicks an egg produces is {{fraction|35|256}} or 13.7%. This means that on average, a chick is spawned every 7.3 eggs, a stack of 16 eggs spawns 2.188 chicks, and a full inventory including the hotbar and off-hand (<code>37 * 16 = 592</code> eggs) is expected to spawn approximately 81 chicks.

== Sounds ==
{{Edition|Java}}:<br>
Thrown eggs use the Friendly Creatures sound category for entity-dependent sound events.
{{Sound table
|rowspan=2
|sound=Bow shoot.ogg
|subtitle=Egg flies
|source=player
|description=When an egg is thrown
|id=entity.egg.throw
|translationkey=subtitles.entity.egg.throw
|volume=0.5
|pitch={{frac|1|3}}-0.5
|distance=16}}
{{Sound table
|subtitle=Dispensed item
|source=block
|description=When a dispenser shoots an egg
|id=block.dispenser.launch
|translationkey=subtitles.block.dispenser.dispense
|volume=1.0
|pitch=1.2
|distance=16}}
{{Sound table
|sound=Chicken plop.ogg
|subtitle=Chicken plops
|source=Friendly Creatures
|description=When an egg is laid by a chicken
|id=entity.chicken.egg
|translationkey=subtitles.entity.chicken.egg
|volume=1.0
|pitch=0.8-1.2
|distance=16
|foot=1}}

{{Edition|Bedrock}}:
{{Sound table
|type=bedrock
|rowspan=2
|sound=Bow shoot.ogg
|source=player
|description=When an egg is thrown
|id=random.bow
|volume=0.5
|pitch=0.33-0.5}}
{{Sound table
|source=player
|description=When a dispenser shoots an egg
|id=random.bow
|volume=1.0
|pitch=0.83-1.25}}
{{Sound table
|sound=Chicken plop.ogg
|source=neutral
|description=When an egg is laid by a chicken
|id=mob.chicken.plop
|volume=1.0
|pitch=0.8-1.2
|foot=1}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Egg
|spritetype=item
|nameid=egg
|form=item
|foot=1}}
{{ID table
|edition=java
|showentitytags=y
|generatetranslationkeys=y
|displayname=Thrown Egg
|spritetype=entity
|spritename=Egg
|nameid=egg
|entitytags=impact_projectiles
|foot=1}}
{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Egg
|spritetype=item
|nameid=egg
|id=390
|form=item
|foot=1}} 
{{ID table
|edition=bedrock
|shownumericids=y
|generatetranslationkeys=y
|displayname=Egg
|spritetype=entity
|nameid=egg
|id=82
|foot=1}}

=== Entity Data ===

Thrown eggs 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]].

== Achievements ==
{{load achievements|The Lie}}

==Advancements==
{{Load advancements|Bullseye}}

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

== History ==
{{History|java alpha}}
{{History||v1.0.14|[[File:Egg JE1 BE1.png|32px]] Added eggs.
|Eggs currently have no purpose.}}
{{History|java beta}}
{{History||1.0|Eggs are now throwable at the request of a fan as the result of a [[wikipedia:Twitter|Twitter]] conversation about a man eating his [[wikipedia:USB|USB]], if [[Notch]] added egg throwing.<ref>{{tweet|notch|11773078791000065}}</ref>}}
{{History||1.2|Eggs are now used to craft [[cake]]s.
|Eggs can now be thrown by [[dispenser]]s.}}
{{History|java}}
{{History||1.0.0|snap=Beta 1.9 Prerelease 2|[[Breeding]] has been added, making eggs easier to obtain.}}
{{History|||snap=RC1|Thrown eggs now hatch chicks instead of adult chickens.
|The egg's throw [[sound]] has been changed.}}
{{History||1.4.2|snap=12w37a|Eggs are now used to craft [[pumpkin pie]]s.}}
{{History||1.9|snap=15w32a|Eggs no longer [[damage]] the [[ender dragon]].}}
{{History|||snap=15w36b|Eggs now produce particles when thrown at an entity.}}
{{History|||snap=15w49a|Eggs, like all throwable projectiles, now take the thrower's motion into account when fired.}}
{{History||1.11|snap=16w32a|The [[entity]] ID has now been changed from <code>ThrownEgg</code> to <code>egg</code>.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 344.}}
{{History||1.14|snap=18w43a|[[File:Egg JE2 BE2.png|32px]] The texture of eggs has been changed.}}
{{History|||snap=18w50a|Eggs can now be found in [[chest]]s in [[village]] fletcher houses.
|Therefore, chickens are no longer the only source of eggs.}}
{{History|||snap=19w07a|Added [[fox]]es, which sometimes spawn with eggs in their mouths.}}
{{History||1.16.2|snap=Pre-Release 1|Eggs are now affected by [[bubble column]]s.}}

{{History|pocket alpha}}
{{History||v0.4.0|[[File:Egg JE1 BE1.png|32px]] Added eggs. They are currently unobtainable.
|Eggs are throwable, but are unable to spawn chickens.}}
{{History||v0.7.0|[[Chicken]]s now occasionally lay eggs.
|Eggs can be used to craft [[cake]].
|Thrown eggs now have a chance of spawning adult chickens.}}
{{History||v0.8.0|snap=build 1|Eggs are now used to craft [[pumpkin pie]]s.}}
{{History|||snap=build 3|Thrown eggs now have a chance of spawning chicks instead of adult chickens.}}
{{History|pocket}}
{{History||1.1.0|snap=alpha 1.1.0.0|The [[entity]] ID has now been changed from <code>thrownegg</code> to <code>egg</code>.}}
{{History|bedrock}}
{{History||1.2.0|Eggs now deal knockback to [[player]]s.}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Egg.png|32px]] The texture of eggs has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.1|Eggs can now be found in [[village]] fletcher [[chest]]s.}}
{{History|||snap=beta 1.11.0.4|Eggs can now be [[trading|sold]] to farmer [[villager]]s.}}
{{History||1.13.0|snap=beta 1.13.0.1|Added [[fox]]es, which can [[drops|drop]] eggs.}}
{{History||1.16.0|snap=beta 1.16.0.57|[[Trading]] has now been changed, eggs can no longer be [[trading|sold]] to farmer [[villager]]s.}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.0|wiiu=Patch 1|[[File:Egg JE1 BE1.png|32px]] Added eggs.}}
{{History|PS4}}		
{{History||1.90|[[File:Egg JE2 BE2.png|32px]] The texture of eggs has been changed.}}

{{History|New 3DS}}
{{History||0.1.0|[[File:Egg JE1 BE1.png|32px]] Added eggs.}}
{{History|foot}}

== Issues ==
{{issue list}}

== Trivia ==
* Eggs break mid-fall if hit by another projectile; the chance of spawning a chick is not affected.
* Throwing an egg at a [[nether portal]] breaks the egg when it hits the portal.
* A thrown egg faces toward the [[player]] in first-person view, while it appears rotated horizontally in third-person view. This is the case for all throwable [[item]]s ([[ender pearl]]s, eggs, [[snowball]]s, and all throwable [[potion]]s).

== References ==
{{Reflist}}

{{Items}}
{{entities}}

[[Category:Combat]]
[[Category:Egg]]

[[cs:Vajíčko]]
[[de:Ei]]
[[es:Huevo]]
[[fr:Œuf]]
[[hu:Tojás]]
[[it:Uovo]]
[[ja:卵]]
[[ko:달걀]]
[[nl:Ei]]
[[pl:Jajko]]
[[pt:Ovo]]
[[ru:Яйцо]]
[[th:ไข่ไก่]]
[[uk:Яйце]]
[[zh:鸡蛋]]
<br /></li><li>[[Redstone Repeater|Redstone Repeater]]<br/>{{Block
| image = <gallery>
Redstone Repeater.png|Redstone Repeater
Redstone Repeater BE.png|Redstone Repeater (BE)
</gallery>
| extratext = View [[#Renders|all renders]]
| transparent = Yes
| light = No
| tool = any
| stackable = Yes (64)
| flammable = No
| lavasusceptible = No
| renewable = Yes
}}
{{about|the block|repeater circuits|Transmission circuit#Repeater|other topics related to redstone|Redstone (disambiguation)}}
A '''redstone repeater''' is a [[block]] that produces a full-strength [[Redstone Dust|output signal]] from its front when its back is powered, with four configurable delay settings. It can also be locked into a power state by its side being directly powered by a repeater or a [[Redstone Comparator|comparator]].

== Obtaining ==
=== Breaking ===
A redstone repeater can be broken instantly using any [[tool]], or without a tool, and drops itself as an item. To remove a redstone repeater, {{control|mine}} it.

A redstone repeater is removed and drops as an item if:
* its attachment block is moved, removed, or destroyed;
* [[water]] or [[lava]] flows into its space;{{only|java}}
* a [[piston]] tries to push it or moves a block into its space.

=== Natural generation ===
[[File:Redstone Repeater naturally generated.png|thumb|A redstone repeater generated in the jungle temple's hidden room.]]
A single redstone repeater is generated naturally in each [[jungle temple]].
They also generate in [[Ancient City|ancient cities]].

=== Crafting ===
{{Crafting
|A2= Redstone Torch
|B2= Redstone Dust
|C2= Redstone Torch
|B3= Stone
|C3= Stone
|A3= Stone
|Output= Redstone Repeater
|type= Redstone
}}

== Usage ==
{{see also|Redstone circuit}}
A redstone repeater can be used in four different ways: to "repeat" redstone signals back to full strength, delay signals, prevent signals moving backwards, or to "lock" signals in one state.

A repeater can be placed only on top of [[opaque]] blocks (dirt, stone, etc.), on top of upside-down [[slab]]s, upside-down [[stairs]], furnaces, and glass. {{IN|be}}, a repeater can also be placed on fences and stone walls. They can also be placed on some transparent blocks. See [[Opacity/Placement]] for more information. To place a repeater, use the {{control|Place Block}} [[control]].

A redstone repeater has a front and back – the arrow on the top points to the repeater's front. A repeater also has two small redstone torches on its top – the color of the torches indicates whether its output is on (dark red when off, bright red when on) and the distance between them indicates the delay the repeater adds to the signal transmission.

A repeater is 0.125 ({{frac|1|8}}) blocks high.

=== Signal transmission ===
A repeater transmits signals only from its back to its front, but its behavior can be modified from the side (see [[#Signal locking|signal locking]], below).

[[File:Redstone Torch Power.png|Different ways to power a repeater|thumb]]
A redstone repeater can be powered by any of the following components at its back:
* an active [[power component]] (redstone torch, lever, block of redstone, etc.)
* powered [[redstone dust]]
* a powered [[redstone comparator]] or another powered redstone repeater facing the repeater
* a powered opaque block (including any opaque [[mechanism component]]s, such as [[dispenser]]s, [[redstone lamp]]s, etc.)

A redstone repeater can power any of the following components at its front:
* redstone dust
* a redstone comparator or another redstone repeater facing away from the repeater
* any opaque block (including any opaque [[mechanism component]]s)

A redstone repeater can activate any [[mechanism component]] it is facing.

An opaque block powered by a redstone repeater is called "strongly-powered" (as opposed to an opaque block "weakly-powered" by redstone dust). A strongly-powered opaque block can power adjacent redstone dust, as well as other redstone components.

=== Signal repeating ===
{{see also|Transmission circuit#Repeater}}
A redstone repeater can "repeat" a [[Redstone Dust|redstone]] signal, boosting it back up to power level 15.

Redstone signals have a maximum power level of 15 and that level drops by 1 for every block of [[redstone dust]] the signal travels through. If a signal must travel through more than 15 [[block]]s of redstone dust, a redstone repeater can be used to boost the signal back up to full strength. An extra two blocks of distance can be achieved by placing solid opaque blocks before and after the repeater.

While redstone repeaters can allow signals to travel great distances, each always adds some delay to the transmission since the minimum amount of delay is 1 redstone tick (0.1 seconds, barring lag).

=== Signal delay ===
When initially placed, a redstone repeater has a delay of one [[redstone tick]] (equivalent to two game ticks, or 0.1 seconds barring lag).

A repeater's delay can be modified by using the {{control|Use Item}} control. Each use increases the repeater's delay by one redstone tick, to a maximum of four redstone ticks, then back to one redstone tick. Longer delays can be made with multiple repeaters – for example, a repeater set to 'four' and another to 'one' provides a half-second delay (0.4s + 0.1s = 0.5s).

A repeater set to a delay of two to four redstone ticks increases the length of any shorter [[Pulse circuit#Pulses|on-pulse]] to match the length of the repeater's delay, and suppress any shorter off-pulse. For example, a repeater set to a 4-tick delay changes a 1-tick, 2-tick, or 3-tick on-pulse into a 4-tick on-pulse, and does not allow through any off-pulse shorter than 4 ticks.

Although a repeater cannot be set to have a delay of zero, [[Transmission circuit#Instant repeater|instant repeater circuits]] are possible (circuits that repeat a signal with no delay).

In Bedrock Edition, the first repeater have a delay of zero but the repeater is still showing 1-tick{{info needed}}

=== {{anchor|diode}} Signal direction ===
{{see also| Mechanics/Redstone/Transmission circuit#Diode}}

A redstone repeater acts as a diode – it allows redstone signals through in one direction (unlike [[redstone dust]] or opaque blocks that can transmit redstone signals in any direction).

A diode can be used to protect a [[redstone circuit]] from redstone signals feeding back into the circuit from its output, or can be used to isolate one part of a circuit from another.

=== {{anchor|lock}} Signal locking ===
{{see also| Mechanics/Redstone/Memory circuit}}
[[File:Latch.png|thumb|The left repeater has been locked in an unpowered output state by the right repeater.]]
A redstone repeater can be "locked" by another powered redstone repeater facing its side. When locked, the repeater does not change its output (whether powered or unpowered), no matter what the input does. When the side repeater turns back off, the repeater returns to its normal behavior.

A repeater can also be locked by a powered [[redstone comparator]] facing its side. This offers additional possibilities for locking signals because a comparator's output can be affected from 3 sides as well as by containers.

If a repeater is locked again too quickly after unlocking (e.g. the lock is controlled by a fast clock circuit), or the lock and the input are changed only on the same tick (e.g. because they're fed by the same clock and both repeaters have the same delay), the repeater does not switch states.

== Sounds ==
{{Edition|java}}:
{{Sound table/Block/Stone/JE}}
{{Edition|bedrock}}:
{{Sound table/Block/Wood/BE}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Redstone Repeater
|spritetype=block
|nameid=repeater
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|firstcolumnname=Redstone Repeater
|shownumericids=y
|showforms=y
|generatetranslationkeys=y
|displayname=Unpowered block
|spritename=unpowered-repeater
|spritetype=block
|nameid=unpowered_repeater
|id=93
|form=block
|translationkey=-}}
{{ID table
|displayname=Powered block
|spritename=powered-repeater
|spritetype=block
|nameid=powered_repeater
|id=94
|form=block
|translationkey=-}}
{{ID table
|displayname=Item
|spritename=redstone-repeater
|spritetype=item
|nameid=repeater
|id=419
|form=item
|foot=1}}

=== Block states ===
{{see also|Block states}}
{{/BS}}

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

== History ==
''For a more in-depth breakdown of changes to repeater textures and models, including a set of renders for each state combination, see [[/Asset history]]''
{{History|java beta}}
{{History||1.3|[[File:Redstone Repeater (S) JE1.png|32px]] [[File:Redstone Repeater (item) JE1.png|32px]] Added redstone repeaters.
|Originally, the four possible settings were "1, 2, 5 and 7",<ref>http://twitter.com/jeb_/status/33888465502339073</ref> but [[Jeb]] decided to change the settings to "1, 2, 3, and 4".<ref>http://www.reddit.com/r/Minecraft/comments/fmdtp/teammojang_redstone_repeater_video/c1gzrn6</ref>
|The particles when [[breaking]] redstone repeaters erroneously use the [[pumpkin]] top texture.}}
{{History||unknown|The breaking particles of redstone repeaters now use the smooth stone [[slab]] top texture, even though none of the elements on the [[model]] use it.}}
{{History||1.7|[[File:Redstone Repeater (S) JE2.png|32px]] The side texture of redstone repeaters has been changed to the previous bottom part of the texture.
|[[Redstone dust]] now automatically connects to the input of a redstone repeater. Previously, it needed to be specifically pointed towards the repeater like with other blocks.}}
{{History||unknown|Redstone dust now visually connects to the output of redstone repeaters, though this does not change its behavior.}}
{{History|java}}
{{History||unknown|The breaking particles of redstone repeaters have been changed to an unlit [[redstone torch]] when unpowered and a lit redstone torch when powered.}}
{{History||1.3.1|snap=12w22a|Redstone repeaters now naturally generate inside [[jungle temple]]s.}}
{{History|||snap=1.3|[[File:Redstone Repeater (item) JE2 BE1.png|32px]] The texture of redstone repeater [[item]]s have been changed.}}
{{History||1.4.2|snap=12w42a|[[File:Redstone Repeater (S) JE3.png|32px]] The top texture of redstone repeaters has now been changed.
|[[File:Locked Redstone Repeater (S) JE1.png|32px]] Added repeater locking to redstone repeaters. Interestingly, the smallest face of the bedrock cuboid's texture changes depending on the delay, but the other two faces remain the same. When/if this changed is unknown.}}
{{History||1.5|snap=13w02a|[[File:Redstone Repeater (S) JE4.png|32px]] The side textures of redstone repeaters have been changed to use the top texture of stone [[slab]]s.}}
{{History||unknown|The breaking [[particles|particle]] of redstone repeaters has been changed once again and now matches the top texture of redstone repeaters.}}
{{History||1.8|snap=14w06a|Repeaters no longer produce block [[light]] when powered.}}
{{History|||snap=14w10a|[[File:Powered Redstone Repeater (S) JE5.png|32px]] Torches on repeaters now no longer have protruding features.
|The torches underneath redstone repeaters have now been shortened, which has changed the underside textures from [[File:Redstone Repeater JE2 BE1 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 2 JE2 BE1 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 3 JE2 BE1 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 4 JE2 BE1 (facing NWU).png|32px]] [[File: Active Redstone Repeater JE2 BE1 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 2 JE2 BE1 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 3 JE2 BE1 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 4 JE2 BE1 (facing NWU).png|32px]] [[File: Locked Redstone Repeater JE2 BE1 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 2 JE2 BE1 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 3 JE2 BE1 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 4 JE2 BE1 (facing NWU).png|32px]] [[File: Active Locked Redstone Repeater JE2 BE1 (facing NWU).png|32px]] [[File: Active Locked Redstone Repeater Delay 2 JE2 BE1 (facing NWU).png|32px]] [[File: Active Locked Redstone Repeater Delay 3 JE2 BE1 (facing NWU).png|32px]] [[File: Active Locked Redstone Repeater Delay 4 JE2 BE1 (facing NWU).png|32px]] to [[File:Redstone Repeater JE3 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 2 JE3 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 3 JE3 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 4 JE3 (facing NWU).png|32px]] [[File: Active Redstone Repeater JE3 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 2 JE3 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 3 JE3 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 4 JE3 (facing NWU).png|32px]] [[File: Locked Redstone Repeater JE3 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 2 JE3 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 3 JE3 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 4 JE3 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater JE3 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 2 JE3 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 3 JE3 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 4 JE3 (facing NWU).png|32px]].}}
{{History|||snap=14w10b|[[File:Powered Redstone Repeater (S) JE4.png|32px]] Repeater torches now have protruding features again.<ref>{{bug|MC-50242}}</ref>}}
{{History|||snap=?|[[File:Powered Redstone Repeater (S) JE7.png|32px]] The torches on redstone repeaters are now affected by directional shading.}}
{{History||1.13|snap=17w47a|All 3 IDs for the redstone repeater have now been merged into 1 ID: <code>repeater</code>.
|Added powered block state to redstone repeaters.
|Redstone repeaters now render their underside, which has changed their undersides from [[File:Redstone Repeater JE3 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 2 JE3 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 3 JE3 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 4 JE3 (facing NWU).png|32px]] [[File: Active Redstone Repeater JE3 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 2 JE3 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 3 JE3 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 4 JE3 (facing NWU).png|32px]] [[File: Locked Redstone Repeater JE3 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 2 JE3 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 3 JE3 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 4 JE3 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater JE3 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 2 JE3 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 3 JE3 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 4 JE3 (facing NWU).png|32px]] to [[File:Redstone Repeater JE4 BE2 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 2 JE4 BE2 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 3 JE4 BE2 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 4 JE4 BE2 (facing NWU).png|32px]] [[File: Active Redstone Repeater JE4 BE2 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 2 JE4 BE2 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 3 JE4 BE2 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 4 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Redstone Repeater JE4 BE2 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 2 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 3 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 4 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater JE4 BE2 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 2 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 3 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 4 JE4 BE2 (facing NWU).png|32px]].
|Prior to [[1.13/Flattening|''The Flattening'']], these [[block]]s' numeral IDs were 93 and 94, and the [[item]]'s 356.}}
{{History||1.14|snap=18w43a|[[File:Redstone Repeater (S) JE5.png|32px]] [[File:Powered Redstone Repeater (S) JE9.png|32px]] [[File:Locked Redstone Repeater (S) JE5.png|32px]] [[File:Powered Locked Redstone Repeater (S) JE6.png|32px]] [[File:Redstone Repeater (item) JE3 BE2.png|32px]] The textures of redstone repeaters have now been changed.}}
{{History|||snap=18w50a|[[File:Locked Redstone Repeater (S) JE6.png|32px]] [[File:Powered Locked Redstone Repeater (S) JE7.png|32px]] As the texture of [[bedrock]] has been changed, the textures of locked redstone repeaters have also now been changed.}}
{{History|||snap=19w12b|Redstone repeaters can now be placed on [[glass]], [[ice]], [[glowstone]] and [[sea lantern]]s.}}
{{History||1.19|snap=22w13a|Redstone repeaters now generate in [[Ancient City|ancient cities]].}}
{{History||1.20.2|snap=23w33a|Redstone repeaters now use stone sounds instead of wood sounds.<ref>{{bug|MC-182820|||Fixed}}</ref>}}

{{History|pocket alpha}}
{{History||v0.14.0|snap=build 1|[[File:Redstone Repeater (S) JE3.png|32px]] [[File:Redstone Repeater (item) JE2 BE1.png|32px]] Added redstone repeaters.}}
{{History|bedrock}}
{{History||1.2.0|snap=beta 1.2.0.2|Redstone repeaters now render their underside, which has changed their undersides from [[File:Redstone Repeater JE2 BE1 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 2 JE2 BE1 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 3 JE2 BE1 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 4 JE2 BE1 (facing NWU).png|32px]] [[File: Active Redstone Repeater JE2 BE1 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 2 JE2 BE1 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 3 JE2 BE1 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 4 JE2 BE1 (facing NWU).png|32px]] [[File: Locked Redstone Repeater JE2 BE1 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 2 JE2 BE1 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 3 JE2 BE1 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 4 JE2 BE1 (facing NWU).png|32px]] [[File: Active Locked Redstone Repeater JE2 BE1 (facing NWU).png|32px]] [[File: Active Locked Redstone Repeater Delay 2 JE2 BE1 (facing NWU).png|32px]] [[File: Active Locked Redstone Repeater Delay 3 JE2 BE1 (facing NWU).png|32px]] [[File: Active Locked Redstone Repeater Delay 4 JE2 BE1 (facing NWU).png|32px]] to [[File:Redstone Repeater JE4 BE2 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 2 JE4 BE2 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 3 JE4 BE2 (facing NWU).png|32px]] [[File: Redstone Repeater Delay 4 JE4 BE2 (facing NWU).png|32px]] [[File: Active Redstone Repeater JE4 BE2 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 2 JE4 BE2 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 3 JE4 BE2 (facing NWU).png|32px]] [[File: Active Redstone Repeater Delay 4 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Redstone Repeater JE4 BE2 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 2 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 3 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Redstone Repeater Delay 4 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater JE4 BE2 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 2 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 3 JE4 BE2 (facing NWU).png|32px]] [[File: Locked Active Redstone Repeater Delay 4 JE4 BE2 (facing NWU).png|32px]].}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Redstone Repeater (S) BE2.png|32px]] [[File:Powered Redstone Repeater (S) BE2.png|32px]] [[File:Redstone Repeater (item) JE3 BE2.png|32px]] The textures of redstone repeaters have now been changed.}}
{{History||1.20.30|snap=beta 1.20.30.20|Redstone Repeaters now use the <code>minecraft:cardinal_direction</code> [[block state]] instead of <code>direction</code>.}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Redstone Repeater (S) JE3.png|32px]]{{verify|Was this model actually used here?}} [[File:Redstone Repeater (item) JE2 BE1.png|32px]] Added redstone repeaters.}}
{{History||xbox=TU19|xbone=CU7|ps=1.12|wiiu=Patch 1|switch=1.0.1|[[File:Locked Redstone Repeater (S) JE1.png|32px]]{{verify|Was this model actually used here?}} Added repeater locking to redstone repeaters.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Redstone Repeater (S) JE4.png|32px]]{{verify|Was this model actually used here?}} [[File:Redstone Repeater (item) JE3 BE2.png|32px]] The textures of redstone repeaters have now been changed.}}

{{History|new 3ds}}
{{History||0.1.0|[[File:Redstone Repeater (S) JE3.png|32px]]{{verify|Was this model actually used here?}} [[File:Redstone Repeater (item) JE2 BE1.png|32px]] Added redstone repeaters and repeater locking.}}
{{History|foot}}

=== Redstone repeater "items" ===
{{:Technical blocks/Redstone Repeater}}

== Issues ==
{{Issue list}}

== Trivia ==
* The recipe and appearance of redstone repeaters are a likely reference to the old method of repeating signals, which would also use two torches at a time, inverting each other

== Gallery ==
<gallery>
Repeater clock.gif|A redstone clock formed from a redstone torch and a repeater.
Repeater feedback.gif|A redstone clock formed from two repeaters.
Two way repeater.gif|MCRedstoneSim diagram of a two-way repeater.
Repeater bridge.png|Crossing redstone wires using repeaters.
Jeb Repeaters 1.png|
Jeb Repeaters 2.png|
Jeb Repeaters 3.png|
</gallery>

=== Renders ===
<gallery>
Redstone Repeater.png
Redstone Repeater Delay 2.png
Redstone Repeater Delay 3.png
Redstone Repeater Delay 4.png
Powered Redstone Repeater.png
Powered Redstone Repeater Delay 2.png
Powered Redstone Repeater Delay 3.png
Powered Redstone Repeater Delay 4.png
Locked Redstone Repeater.png
Locked Redstone Repeater Delay 2.png
Locked Redstone Repeater Delay 3.png
Locked Redstone Repeater Delay 4.png
Powered Locked Redstone Repeater.png
Powered Locked Redstone Repeater Delay 2.png
Powered Locked Redstone Repeater Delay 3.png
Powered Locked Redstone Repeater Delay 4.png
Redstone Repeater BE.png
Redstone Repeater Delay 2 BE.png
Redstone Repeater Delay 3 BE.png
Redstone Repeater Delay 4 BE.png
Powered Redstone Repeater BE.png
Powered Redstone Repeater Delay 2 BE.png
Powered Redstone Repeater Delay 3 BE.png
Powered Redstone Repeater Delay 4 BE.png
Locked Redstone Repeater BE.png
Locked Redstone Repeater Delay 2 BE.png
Locked Redstone Repeater Delay 3 BE.png
Locked Redstone Repeater Delay 4 BE.png
Powered Locked Redstone Repeater BE.png
Powered Locked Redstone Repeater Delay 2 BE.png
Powered Locked Redstone Repeater Delay 3 BE.png
Powered Locked Redstone Repeater Delay 4 BE.png
</gallery>

== References ==
{{Reflist}}

{{Redstone}}
{{Blocks|Utility}}
{{Items}}

[[Category:Mechanics]]
[[Category:Redstone mechanics]]
[[Category:Redstone]]
[[Category:Mechanisms]]
[[Category:Manufactured blocks]]
[[Category:Generated structure blocks]]
[[Category:Non-solid blocks]]

[[de:Redstone-Verstärker]]
[[es:Repetidor de redstone]]
[[fr:Répéteur de redstone]]
[[hu:Redstone-jelismétlő]]
[[it:Ripetitore di redstone]]
[[ja:レッドストーンリピーター]]
[[ko:레드스톤 중계기]]
[[nl:Redstoneversterker]]
[[pl:Przekaźnik]]
[[pt:Repetidor de redstone]]
[[ru:Красный повторитель]]
[[tr:Kızıltaş tekrarlayıcı]]
[[zh:红石中继器]]</li></ul>
23w03aAdded /execute on.
Added /execute (if|unless) dimension and /execute (if|unless) loaded.
23w04aAdded a new relation origin for /execute on.
23w06aAdded /execute summon.
Now /execute if loaded is a condition subcommand instead of a modify-like subcommand.[1]
Pre-release 1Added /execute positioned over.
Upcoming Java Edition
1.20.2
{{Extension DPL}}<ul><li>[[Cooked Porkchop|Cooked Porkchop]]<br/>{{Item
| title = Cooked Porkchop
| image = Cooked Porkchop.png
| renewable = Yes
| heals = {{hunger|8}}
| stackable =  Yes (64)
}}

'''Cooked porkchop''' is a [[food]] [[item]] that can be eaten by the [[player]].

== Obtaining ==
{{see also|Tutorials/Animal farming|title1=Animal farming}}

Cooked porkchops can be obtained by cooking [[raw porkchop]]s or by [[trading]] with butchers, and is a [[drops|drop]] from [[pig]]s and [[hoglin]]s that die while on [[fire]].

=== Mob loot ===

==== Pigs ====

Adult [[pig]]s drop 1–3 cooked porkchop if killed while on fire. The maximum amount is increased by 1 per level of [[Looting]], for a maximum of 1-6 with Looting III.

==== Hoglins ====

Adult [[hoglin]]s drop 2–4 cooked porkchop if killed while on fire. The maximum amount is increased by 1 per level of Looting, for a maximum of 7 with Looting III.

=== Cooking ===

[[Raw porkchop]] can be cooked in a [[furnace]], [[smoker]], or [[campfire]]. Each piece of cooked porkchop removed from a furnace output slot gives 0.35 [[experience]] (22.4 experience per stack).
{{Smelting
|Raw Porkchop
|Cooked Porkchop
|0,35
}}

=== Trading ===
{{IN|java}}, apprentice-level butcher [[villager]]s have a {{frac|2|3}} chance of selling 5 cooked porkchop for 1 [[emerald]].

Butcher villagers may give players with the [[Hero of the Village]] effect a cooked porkchop.{{only|java}}

{{IN|bedrock}}, apprentice-level butcher villagers have a 25% chance to sell 5 cooked porkchop for 1 emerald.

=== Chest loot ===
{{LootChestItem|cooked-porkchop}}

== Usage ==

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

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

=== Wolves ===

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

=== Piglins ===
[[Piglin]]s pick up any cooked porkchops in their [[item (entity)|item]] form. However, they do not eat it.

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

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showitemtags=y
|showforms=y
|generatetranslationkeys=y
|displayname=Cooked Porkchop
|spritetype=item
|nameid=cooked_porkchop
|itemtags=piglin_food
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Cooked Porkchop
|spritetype=item
|nameid=cooked_porkchop
|id=263
|form=item
|foot=1}}

== Achievements ==

{{load achievements|Pork Chop}}

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

== History ==

{{History|java indev}}
{{History||20100219|[[File:Cooked Porkchop JE1.png|32px]] Added cooked porkchops.
|Cooked porkchops restore {{hp|8}} and do not stack in the [[inventory]].
|Created by cooking [[raw porkchops]] in the inventory.}}
{{History|java alpha}}
{{History||v1.2.0|snap=preview|[[Zombie pigmen]] now [[drops|drop]] 0-2 cooked porkchops upon [[death]].}}
{{History|java beta}}
{{History||1.5|[[Pig]]s now [[drops|drop]] cooked porkchops when killed with [[fire]].}}
{{History||1.8|snap=Pre-release|[[File:Cooked Porkchop JE2 BE1.png|32px]] The texture of cooked porkchops has been changed to avoid confusion with [[steak]].
|Cooked porkchops are now stackable to 64 and restore [[hunger]] instead of [[health]].
|Cooked porkchops now restore {{hunger|8}} to the food bar.
|Cooked porkchops are no longer dropped by [[zombie pigmen]] upon their [[death]].}}
{{History|java}}
{{History||1.2.1|snap=12w03a|Cooked porkchop can now be used to breed wolves.}}
{{History||1.3.1|snap=12w21a|Butcher [[villager]]s now [[trading|sell]] 6–7 cooked porkchops for 1 [[emerald]].}}
{{History||1.4.2|snap=12w37a|[[File:Cooked Porkchop JE3 BE2.png|32px]] The texture of cooked porkchops has been changed, so that it no longer has a dark outline.}}
{{History||1.8|snap=14w02a|Butcher [[villager]]s now [[trading|sell]] 5–7 cooked porkchops for 1 [[emerald]].}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 320.}}
{{History||1.14|snap=18w43a|[[File:Cooked Porkchop JE4 BE3.png|32px]] The texture of cooked porkchops has been changed.}}
{{History|||snap=19w13a|Butcher villagers now give cooked porkchops to players under the [[Hero of the Village]] effect.}}
{{History||1.16|snap=20w07a|[[Hoglin]]s now drop cooked porkchops if killed while on fire.}}
{{History|||snap=20w16a|Cooked porkchops can now be found in hoglin stable chests in [[bastion remnant]]s.}}
{{History||1.16.2|snap=20w30a|Cooked porkchops can now be found in generic bastion remnant chests as well.}}

{{History|pocket alpha}}
{{History||v0.4.0|[[File:Cooked Porkchop JE2 BE1.png|32px]] Added cooked porkchops.}}
{{History||v0.5.0|Cooked porkchops now restore {{hp|8}} instead of {{hp|4}}.}}
{{History||v0.8.0|snap=build 1|[[File:Cooked Porkchop JE3 BE2.png|32px]] The texture of cooked porkchops has been changed, so that it no longer has a dark outline.}}
{{History||v0.12.1|snap=build 1|Cooked porkchops now restore [[hunger]] instead of [[health]].}}
{{History|pocket}}
{{History||1.0.4|snap=alpha 1.0.4.0|Butcher [[villager]]s now [[trading|sell]] 5–7 cooked porkchops for 1 [[emerald]].}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Cooked Porkchop JE4 BE3.png|32px]] The texture of cooked porkchops has been changed.}} 
{{History||1.11.0|snap=beta 1.11.0.4|[[Trading]] has been changed, butcher [[villager]]s now have a 25% chance to [[trading|sell]] 4 cooked porkchops as part of their second-tier [[trading|trade]].}}
{{History||1.16.0|snap=beta 1.16.0.57|Trading has been changed, apprentice butcher [[villager]]s now have a 25% chance to [[trading|sell]] 5 cooked porkchops instead of 3.}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.0|wiiu=Patch 1|[[File:Cooked Porkchop JE1.png|32px]] Added cooked porkchops.}}
{{History||xbox=TU3|[[File:Cooked Porkchop JE2 BE1.png|32px]] The texture of cooked porkchops has been changed to be consistent with [[Java Edition]].}}
{{History||xbox=TU5|Cooked porkchops are now stackable to 64.
|Cooked porkchops now fill [[hunger]] instead of [[health]].}}
{{History||xbox=TU12|[[File:Cooked Porkchop JE3 BE2.png|32px]] The texture of cooked porkchops has been changed, so that it no longer has a dark outline.}}
{{History|PS4}}
{{History||1.90|[[File:Cooked Porkchop JE4 BE3.png|32px]] The texture of cooked porkchops has been changed.}} 

{{History|new3DS}}
{{History||0.1.0|[[File:Cooked Porkchop JE3 BE2.png|32px]] Added cooked porkchops.}}
{{History|foot}}

== Issues ==
{{issue list}}

== External Links ==
*[https://www.minecraft.net/en-us/article/taking-inventory--porkchop Taking Inventory: Porkchop] – Minecraft.net on February 13, 2020

{{Items}}

[[Category:Food]]
[[Category:Renewable resources]]

[[cs:Pečená kotleta]]
[[de:Gebratenes Schweinefleisch]]
[[es:Chuleta de cerdo cocinada]]
[[fr:Côtelette de porc cuite]]
[[hu:Sült sertésszelet]]
[[ja:焼き豚]]
[[nl:Gebraden varkensvlees]]
[[pl:Pieczony schab]]
[[pt:Costeleta de porco assada]]
[[ru:Жареная свинина]]
[[uk:Смажена свинина]]
[[zh:熟猪排]]</li><li>[[Lapis Lazuli|Lapis Lazuli]]<br/>{{Item
| image = Lapis Lazuli.png
|type=
| renewable = Yes
| stackable = Yes (64)
}}
{{About|the item|the ore|Lapis Lazuli Ore|the mineral block|Lapis Lazuli Block}}

'''Lapis lazuli''' is a mineral required to [[Enchanting|enchant]] items in an [[Enchanting Table|enchanting table]].

== Obtaining ==

=== Mining ===

When mined with a stone [[pickaxe]] or better, [[lapis lazuli ore]] drops 4–9 lapis lazuli. With the [[Fortune]] III enchantment, a single block has a chance of dropping up to 36 items.

=== Crafting ===

{{Crafting
  |Block of Lapis Lazuli
  |Output=Lapis Lazuli,9
  |type=Material
}}

=== Smelting ===
{{Smelting
  |showname=1
  |Lapis Lazuli Ore; Deepslate Lapis Lazuli Ore
  |Lapis Lazuli
  |0.2
}}

=== Villager gifts ===

{{IN|java}}, cleric [[villager]]s give [[player]]s lapis lazuli if they have the [[Hero of the Village]] effect.

=== Trading ===

Apprentice-level cleric villagers sell one lapis lazuli for an [[emerald]] as part of their trades.

{{IN|bedrock}}, [[wandering trader]]s may sell 3 lapis lazuli for an emerald.

=== Chest loot ===
{{see also|Lapis Lazuli Ore#Natural generation}}
{{LootChestItem|lapis-lazuli}}

== Usage ==

=== Enchanting ===

1–3 pieces of lapis lazuli are required to use an [[Enchanting Table|enchanting table]] to enchant an [[items|item]]. More specifically, the enchanting table UI shows 3 options (see [[Enchanting mechanics]] for details): the first, second, and third options cost 1, 2, and 3 lapis lazuli, respectively.

=== Crafting ingredient ===

Lapis lazuli can be used to make [[blocks of lapis lazuli]] and [[blue dye]]. {{IN|bedrock}}, it can also be used directly as a substitute for blue dye.
{{crafting usage}}

{{IN|bedrock}}, lapis lazuli can be also used in banner patterns:
{{banner crafting usage}}

=== Loom ingredient === 
{{Banner loom usage|Lapis Lazuli}}

=== Dye ===
{{Dye usage}}

=== Smithing ingredient ===
{{Smithing
|head=1
|ingredients=Any Armor Trim +<br/>Any Armor Piece + <br/>Lapis Lazuli
|Any Armor Trim Smithing Template
|Netherite Chestplate
|Lapis Lazuli
|Lapis Trim Netherite Chestplate
|showdescription=1
|description = All armor types can be used in this recipe,<br/>a netherite chestplate is shown as an example.<br/>
|tail=1
}}

;Trim color palette
The following color palette is shown on the designs on trimmed armor:
*{{TrimPalette|lapis lazuli}}

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

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|showaliasids=y
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Lapis Lazuli
|spritetype=item
|nameid=lapis_lazuli
|aliasid=dye / 4
|id=414
|form=item
|translationkey=item.dye.blue.name
|foot=1}}

== Advancements ==
{{load advancements|Enchanter}}

== History ==

{{History|java beta}}
{{History||1.2|[[File:Lapis Lazuli JE1 BE1.png|32px]] Added lapis lazuli.}}
{{History||1.2_02|[[Lapis lazuli ore]] can now be found at [[bedrock]] level and now drops 4–8 lapis lazuli per block mined (increased from 1) on [[singleplayer]] only. However, servers have not been affected yet.}}
{{History||1.8|snap=Pre-release|Lapis lazuli can now be found in [[mineshaft]] [[chest]]s.}}
{{History|java}}
{{History||1.4.2|snap=12w34a|Lapis lazuli can now be used to [[Armor#Dyeing|dye]] leather [[armor]] and [[wolf]] collars.}}
{{History||1.4.6|snap=12w49a|Lapis lazuli can now be [[crafting|crafted]] with [[gunpowder]] to create a [[firework star]].}} 
{{History||1.6.1|snap=13w19a|Lapis lazuli can now be used to craft blue [[stained clay]].}}
{{History||1.7.2|snap=13w41a|Lapis lazuli can now be used to craft blue [[stained glass]].}}
{{History||1.8|snap=14w02a|[[Enchanting]] now requires lapis lazuli. Different enchantments require different amounts of levels and different amounts of levels now require different amounts of lapis lazuli (between 1-3).
|Cleric [[villager]]s now [[trading|sell]] 1–2 lapis lazuli for 1 [[emerald]], making it a [[renewable resource]].}}
{{History|||snap=14w30a|Lapis lazuli can now be used to dye [[banner]]s.}}
{{History||1.9|snap=15w44a|The average yield of lapis lazuli in [[mineshaft]] [[chest]]s has been decreased.}}{{History||1.11|snap=16w39a|Added the ability to dye [[shulker box]]es.}}
{{History||1.12|snap=17w06a|Can now be used to craft blue [[concrete powder]].}}
{{History|||snap=17w15a|Added the ability 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|||snap=18w11a|Lapis lazuli now generates in [[shipwreck]] [[chest]]s.}}
{{History||1.14|snap=18w43a|Lapis lazuli can now be used to craft [[blue dye]].
|Lapis lazuli can no longer be used as a [[dye]].
|All of the dye-related functions and crafting recipes of lapis lazuli (except lapis lazuli blocks) have been transferred to blue dye.
|[[File:Lapis Lazuli JE2 BE2.png|32px]] The texture of lapis lazuli has been changed.}}
{{History|||snap=18w50a|Lapis lazuli can now be found in chests in [[village]] temples.}}
{{History|||snap=19w13a|Cleric villagers now give lapis lazuli to players under the [[Hero of the Village]] effect.}}
{{History||1.17|snap=21w08a|Lapis lazuli can now drop and be smelted from [[deepslate lapis lazuli ore]].}}
{{History||1.20<br>(Experimental)|link=1.19.4|snap=23w04a|Lapis lazuli can now be used as an armor trim material.}}

{{History|pocket alpha}}
{{History||v0.3.0|[[File:Lapis Lazuli JE1 BE1.png|32px]] Added lapis lazuli.}}
{{History||v0.3.2|Lapis lazuli can now be crafted into lapis lazuli blocks, and vice versa.}}
{{History||v0.12.1|snap=build 1|Lapis lazuli is now required for [[enchanting]].}}
{{History||v0.14.0|snap=build 1|Lapis lazuli can now be found inside [[minecart with chest]]s in [[mineshaft]]s.
|Lapis lazuli can now be used to dye [[water]] in [[cauldron]]s.}}
{{History|pocket}}
{{History||1.0.4|snap=alpha 1.0.4.0|Cleric [[villager]]s now [[trading|sell]] 1–2 lapis lazuli for 1 [[emerald]].
|Lapis lazuli can now be used to [[dyeing|dye]] [[shulker shell]]s.}}
{{History||1.1.0|snap=alpha 1.1.0.0|Lapis lazuli can now be used to dye [[shulker box]]es and [[bed]]s.
|Lapis lazuli can now be used to [[crafting|craft]] blue [[concrete powder]].}}
{{History|bedrock}}
{{History||1.2.0|snap=beta 1.2.0.2|Lapis lazuli can now be used to dye [[banner]]s, [[firework star]]s and [[glass]].}}
{{History||1.4.0|snap=beta 1.2.14.2|Lapis lazuli can now be found in [[shipwreck]] treasure chests.}}
{{History|||snap=beta 1.2.20.1|Lapis lazuli can now be used to craft [[balloon]]s and [[glow stick]]s.}}
{{History||1.8.0|snap=beta 1.8.0.10|Lapis lazuli can now be used to craft [[blue dye]]s.}}
{{History||1.10.0|snap=beta 1.10.0.3|Lapis lazuli are now [[trading|sold]] by [[wandering trader]]s.
|[[File:Lapis Lazuli JE2 BE2.png|32px]] The texture of lapis lazuli has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.1|Lapis lazuli can now be found in [[desert]] [[village]] temple [[chest]]s.}}
{{History|||snap=beta 1.11.0.4|Cleric [[villager]]s now [[trading|sell]] one lapis lazuli for one [[emerald]].}}
{{History||1.16.100|snap=beta 1.16.100.56|The ID of lapis lazuli has been changed from <code>dye/4</code> to <code>lapis_lazuli</code>.}}
{{History||1.17.0|snap=beta 1.16.230.52|Lapis lazuli can now drop and be smelted from [[deepslate lapis lazuli ore]].}}
{{History||1.19.80|snap=beta 1.19.80.21|Lapis lazuli can now be used as an armor trim material.}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Lapis Lazuli JE1 BE1.png|32px]] Added lapis lazuli.}}
{{History||xbox=TU31|xbone=CU19|ps=1.22|wiiu=Patch 3|switch=1.0.1|Lapis lazuli can now be used in [[enchanting]].}}
{{History|Ps4}}
{{History||1.90|[[File:Lapis Lazuli JE2 BE2.png|32px]] The texture of lapis lazuli has been changed.}}
{{History|foot}}

== Issues ==

{{issue list}}

== Trivia ==
* In real life, lapis lazuli is a blue gem that can be ground and processed into ultramarine pigment. Lapis lazuli pigment has been famously used in the production of illuminated manuscripts, stained glass, and cave paintings. [[Wikipedia:Lapis lazuli|See the Wikipedia article for more information]].
* Lapis lazuli is the only [[ore]] that can be used as a [[dye]]{{only|BE|short=1}} or making a dye.
* It is the only item that can be put in the second slot of an [[enchantment table]].

== References ==
{{reflist}}

{{Items}}

[[Category:Dyes]]

[[cs:Lazurit]]
[[de:Lapislazuli]]
[[es:Lapislázuli]]
[[fr:Lapis-lazuli]]
[[hu:Lazurit]]
[[ja:ラピスラズリ]]
[[ko:청금석]]
[[nl:Lapis lazuli]]
[[pl:Lazuryt]]
[[pt:Lápis-lazúli]]
[[ru:Лазурит]]
[[th:แร่แลพิสแลซูลี]]
[[uk:Лазурит]]
[[zh:青金石]]
[[Category:Renewable resources]]</li></ul>
23w31aAdded /execute (if|unless) function.
1.20.2 Pre-release 1Temporarily removed syntax /execute (if|unless) function.
Bedrock Edition
Upcoming Creator Features
(Experimental)
beta 1.19.10.20Added new /execute syntax to closer resemble that of Java Edition.
beta 1.19.40.20Implemented the /execute rotated command.
beta 1.19.40.21Implemented the /execute facing and /execute align commands.
beta 1.19.40.23Implemented the /execute anchored and /execute in commands.
1.19.50
{{Extension DPL}}<ul><li>[[Red Dye|Red Dye]]<br/>{{Item
| title = Red Dye
| renewable = Yes
| stackable = Yes (64)
}}
'''Red dye''' is a [[Dye#Primary|primary color dye]] created primarily from flowers.

== Obtaining ==

=== Crafting ===

{{Crafting
|head=1
|showname=0
|Poppy; Red Tulip; Beetroot 
|Output=Red Dye
|type=Material
}}
{{Crafting
|Rose Bush
|Output=Red Dye,2
|type=Material
|foot=1
}}

=== Trading ===

[[Wandering trader]]s sell 3 red dye for an [[emerald]].

== Usage ==

{{dye usage}}

=== Crafting ingredient ===

{{crafting usage|ignore=Banner|continue=1}}
{{banner crafting usage}}

=== Loom ingredient ===
{{Banner loom usage|Red Dye}}

=== Trading ===
Journeyman-level shepherd villagers have a {{frac|1|6}} chance to buy 12 red dye for an emerald.

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

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|showaliasids=y
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Red Dye
|spritetype=item
|nameid=red_dye
|aliasid=dye / 1
|id=396
|form=item
|translationkey=item.dye.red.name
|foot=1}}

== Video ==

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

== History ==
{{History|java beta}}
{{History||January 10, 2011<ref group="n">Supposed time when fragment was filmed. Based on modified date of client.jar/gui/trap.png in [[Beta 1.2]].</ref>|link=https://www.youtube.com/watch?v=cBF2ugTzXqQ&t=181s|[[File:Red Dye (pre-release).png|32px]] Shown rose red in development as part of [[Minecraft: The Story of Mojang]].}}
{{History||1.2|[[File:Red Dye JE1 BE1.png|32px]] Added rose red.}}
{{History||1.6.6|Roses can now be generated using [[Bone Meal|bone meal]], making rose red [[renewable resource|renewable]].}}
{{History|java}}
{{History||1.3.1|snap=1.3|[[File:Red Dye JE2 BE2.png|32px]] The texture of rose red has now been changed.}}
{{History||1.4.2|snap=12w34a|Added the ability to [[Armor#Dyeing|dye]] leather [[armor]] and [[wolf]] collars.}}
{{History||1.4.6|snap=12w49a|Rose red can now be crafted with [[gunpowder]] to create a [[firework star]].}} 
{{History||1.6.1|snap=13w19a|Rose red can now be used to craft stained clay.}}
{{History||1.7.2|snap=13w36a|Rose red is now crafted using a poppy instead of a rose, as the latter is removed.
|Rose red can now be crafted using red tulips and rose bushes.}}
{{History|||snap=13w37a|Each poppy now yields only 1 rose red, instead of 2.}}
{{History|||snap=13w41a|Rose red can now be used to craft stained glass.}}
{{History||1.8|snap=14w30a|Added [[banner]]s, which can be dyed.}}
{{History||1.9|snap=15w31a|Rose red can now be crafted using [[beetroot]].}}
{{History||1.11|snap=16w39a|Added the ability to dye [[shulker box]]es.}}
{{History||1.12|snap=17w06a|Rose red can now be used to craft red [[concrete powder]].}}
{{History|||snap=17w15a|Added the ability to dye [[bed]]s.}}
{{History||1.13|snap=17w47a|The different data values for the <code>dye</code> ID have now 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|"Rose Red" has now been renamed to "Red Dye".
|[[File:Red Dye JE3 BE3.png|32px]] The texture of red dye has now been changed.}}
{{History|||snap=18w44a|Red dye can now change the text color on [[sign]]s to red.}}
{{History|||snap=19w05a|Added the [[wandering trader]], which sells red dye.}}
{{History|||snap=19w11a|Red dye can now be [[trading|bought]] by shepherd villagers.}}
{{History||1.17|snap=20w45a|Red dye can now be used to craft [[red candle]]s.}}
{{History|||snap=21w19a|Red dye can no longer be used to craft red candles.}}
{{History|||snap=Pre-release 1|Red dye can once again be used to craft red candles.}}
{{History||1.20<br>(Experimental)|link=1.19.3|snap=22w42a|Red dye can now change the text color on [[hanging sign]]s to red.}}

{{History|pocket alpha}}
{{History||v0.3.0|[[File:Red Dye JE1 BE1.png|32px]] Added rose red. It is currently unobtainable and serves no purpose.}}
{{History||v0.4.0|Rose red is now obtainable by smelting red [[mushroom]]s.
|Rose red can now be used to craft other dyes and red wool.}}
{{History||v0.8.0|snap=build 1|[[File:Red Dye JE2 BE2.png|32px]] The texture of red dye has been changed.
|Rose red is now used to craft [[cocoa beans]].}}
{{History||v0.9.0|snap=build 3|Rose red can now be obtained by putting a poppy, red tulip or rose bush [[flower]]s in the crafting grid.}}
{{History||v0.15.0|snap=build 1|Red mushrooms can no longer be smelted to obtain rose red.}}
{{History||v0.16.0|snap=build 1|Rose red is no longer used to craft cocoa beans.}}
{{History|bedrock}}
{{History||1.8.0|snap=beta 1.8.0.10|"Rose Red" has now been renamed to "Red Dye".}}
{{History||1.10.0|snap=beta 1.10.0.3|Red dye can now be [[trading|bought]] from [[wandering trader]]s.
|[[File:Red Dye JE3 BE3.png|32px]] The texture of red dye has now been changed.}}
{{History||1.11.0|snap=beta 1.11.0.4|Red dye can now be [[trading|sold]] to shepherd [[villager]]s.}}
{{History||1.16.100|snap=beta 1.16.100.56|The ID of red dye has been changed from <code>dye/1</code> to <code>red_dye</code>.}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.00|switch=1.0.1|wiiu=Patch 1|[[File:Red Dye JE1 BE1.png|32px]] Added rose red.}}
{{History||xbox=none|xbone=none|ps=1.83|switch=none|wiiu=none|"Rose Red" has now been renamed to "Red Dye".}}
{{History||ps=1.90|[[File:Red Dye JE3 BE3.png|32px]] The texture of red dye has now been changed.}}

{{History|new 3ds}}
{{History||0.1.0|[[File:Red Dye JE1 BE1.png|32px]] Added rose red.}}
{{History|foot}}

;Notes
{{reflist|group=n}}

== Issues ==
{{issue list}}

{{Items}}



[[cs:Šípková červeň]]
[[de:Roter Farbstoff]]
[[es:Tinte rojo]]
[[fr:Teinture rouge]]
[[hu:Rózsavörös]]
[[ja:赤色の染料]]
[[ko:장밋빛 빨강 염료]]
[[nl:Rozenrood]]
[[pl:Czerwony barwnik]]
[[pt:Corante vermelho]]
[[ru:Красный краситель]]
[[zh:红色染料]]

[[Category:Items]]
[[Category:Dyes]]
[[Category:Renewable resources]]</li><li>[[Prismarine Crystals|Prismarine Crystals]]<br/>{{Item
|type=
| renewable = Yes
| stackable = Yes (64)
}}

'''Prismarine crystals''' are items obtained by defeating [[guardian]]s or [[elder guardian]]s. They are used along with [[prismarine shard]]s to craft [[sea lantern]]s.

== Obtaining ==

=== Mob loot ===

[[Guardian]]s and [[elder guardian]]s have a 40% chance and {{frac|1|3}} chance, respectively, of dropping prismarine crystals upon death. The maximum drop count is increased by one per level of [[Looting]].

=== Mining ===

Prismarine crystals are dropped by [[sea lantern]]s when not using a [[Silk Touch]] tool. They drop 2–3 crystals each time, which can be increased to a maximum of 5 using the [[Fortune]] enchantment.

=== Natural generation ===

{{LootChestItem|prismarine-crystals}}

== Usage ==

=== Crafting ingredient ===

{{crafting usage}}

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

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Prismarine Crystals
|spritetype=item
|nameid=prismarine_crystals
|id=549
|form=item
|foot=1}}

== History ==

{{History|java}}
{{History||1.8|snap=14w25a|[[File:Prismarine Crystals JE1 BE1.png|32px]] Added prismarine crystals.}}
{{History||1.9|snap=15w43a|The chance of [[guardian]]s and [[elder guardian]]s dropping prismarine crystals upon [[death]] has been increased, from 33% to 40%.}}
{{History|||snap=15w43b|The chance of elder guardians [[drops|dropping]] crystals upon [[death]]  has now been reverted back to 33%. However, the chance for guardians to drop them is still 40%.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 410.}}
{{History|||snap=18w10a|Prismarine crystals now generate in [[buried treasure]] [[chest]]s.}}
{{History||1.14|snap=18w43a|[[File:Prismarine Crystals JE2 BE2.png|32px]] The texture of prismarine crystals has been changed.}}

{{History|pocket alpha}}
{{History||v0.16.0|snap=build 1|[[File:Prismarine Crystals JE1 BE1.png|32px]] Added prismarine crystals.}}
{{History|bedrock}}
{{History||1.4.0|snap=beta 1.2.14.2|Prismarine crystals can now be found inside [[buried treasure]] [[chest]]s.}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Prismarine Crystals JE2 BE2.png|32px]] The texture of prismarine crystals has been changed.}}

{{History|console}}
{{History||xbox=TU31|xbone=CU19|ps=1.22|wiiu=Patch 3|[[File:Prismarine Crystals JE1 BE1.png|32px]] Added prismarine crystals.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Prismarine Crystals JE2 BE2.png|32px]] The texture of prismarine crystals has been changed.}}

{{History|New 3DS}}
{{History||1.3.12|[[File:Prismarine Crystals JE1 BE1.png|32px]] Added prismarine crystals.}}
{{History|foot}}

== Issues ==

{{issue list}}


{{Items}}

[[Category:Renewable resources]]

[[de:Prismarinkristalle]]
[[es:Cristales de prismarina]]
[[fr:Cristaux de prismarine]]
[[hu:Prizmarin kristály]]
[[ja:プリズマリンクリスタル]]
[[ko:프리즈머린 수정]]
[[lzh:海磷晶]]
[[nl:Prismarienkristallen]]
[[pl:Kryształy pryzmarynu]]
[[pt:Cristais de prismarinho]]
[[ru:Призмариновый кристалл]]
[[uk:Призмаринові кристали]]
[[zh:海晶砂粒]]</li></ul>
beta 1.19.50.23The new /execute syntax is no longer behind the "Upcoming Creator Features" experimental toggle.
1.19.70
{{Extension DPL}}<ul><li>[[Footprint|Footprint]]<br/>{{about|the joke item|the unused particle|Java Edition unused features#Footprint particle}}
{{Joke feature}}
{{Item
| image = Footprint (item).png
| renewable = No
| stackable = Yes (64)
}}

The '''Footprint''' was a joke item from [[Java Edition 20w14∞]], found only in the {{code|missing}} dimension.

== Appearance ==
This item is semi-transparent with a grey colour scheme.

== Obtaining ==

=== Dimension ===
Footprints were obtained only from a chest in the {{Code|missing}} dimension. Only existing in 2020 April fools snapshot 20w14∞, it cannot exist in any non-April Fool's joke versions and April Fool's joke versions before or after 20w14∞. There is a maximum of 2 footprints that can be obtained legitimately in any given world.

=== Cheats/Creative Mode ===
Despite these footprints not being available in the creative inventory, it is still possible to acquire them via the command {{Code|code=give <target> minecraft:footprint <amount>}} or duplicating them by holding down middle-click whilst in creative mode.

== Usage ==
As of snapshot 20w14∞, this item cannot be placed or used in any way other than a trophy. This item can be inserted and/or rotated inside of an item frame, and it has a stack limit of 64.

== Data values ==
=== ID ===
{{ID table
|showforms=y
|generatetranslationkeys=java
|displayname=Footprint
|spritetype=item
|nameid=footprint
|form=item
|foot=1}}

== History ==
{{History|java}}
{{History||20w14∞|[[File:Footprint (item).png|32px]] Added the footprint item.}}
{{History|foot}}

== Gallery ==
<gallery>
File:Missing biome.png|The Easter Egg dimension that the item spawns in.
</gallery>

== Trivia ==
* This is a reference to the removed "Footstep" particle, hence in the "missing" dimension.
** This item is intended as a joke directed towards the commands' community where the "Footstep" particle is commonly requested.<ref>https://gist.github.com/boq/8e65cb85badc75765eeb8956af78aaa5</ref>

== References ==
{{reflist}}

{{Items}}
{{Jokes}}

[[Category:Non-renewable resources]]
[[Category:Joke items]]

[[es:Footprint]]
[[pt:Pegada]]</li><li>[[Raw Copper|Raw Copper]]<br/>{{Item
| image = Raw Copper.png
| renewable = No
| stackable = Yes (64)
}}
'''Raw copper''' is a raw metal resource obtained from mining [[copper ore]].

== Obtaining ==

=== Mining ===
Copper ore and deepslate copper ore mined with a [[stone pickaxe]] or better drops 2–5 units of raw copper. If the pickaxe is enchanted with [[Fortune]], it can drop extra raw copper, allowing for a maximum of 20 units per ore block with Fortune III, or an average of 7.7 units of raw copper per ore block. If the ore is mined using a pickaxe enchanted with [[Silk Touch]], it drops the ore block instead.

=== Crafting ===
{{Crafting
|showname=1
|Block of Raw Copper
|Output=Raw Copper,9
|type=Material
|foot=1
}}

== Usage ==
The primary usage of raw copper is [[smelting]] it into [[copper ingot]]s.

=== Crafting ===
{{crafting usage}}

=== Smelting ingredient ===
{{Smelting
|showname=2
|Raw Copper
|Copper Ingot
|0.7
}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showitemtags=y
|showforms=y
|generatetranslationkeys=y
|displayname=Raw Copper
|spritetype=item
|nameid=raw_copper
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Raw Copper
|spritetype=item
|nameid=raw_copper
|form=item
|id=507
|foot=1}}

== History ==
{{History|java}}
{{History||1.17|snap=21w14a|[[File:Raw Copper JE1.png|32px]] Added raw copper.}}
{{History|||snap=April 13, 2021|slink={{Tweet|JasperBoerstra|1381991999952277513}}|[[File:Raw Copper JE2.png|32px]] [[JAPPA]] shows a new raw copper texture.}}
{{History|||snap=21w15a|[[File:Raw Copper JE2.png|32px]] The texture of raw copper has been changed.
|Raw copper can now be used to craft [[block of raw copper]].}}
{{History|||snap=April 16, 2021|slink={{Tweet|JasperBoerstra|1383047666037325829}}|[[File:Raw Copper (pre-release).png|32px]] [[JAPPA]] shows a new raw copper texture again.}}
{{History|||snap=21w16a|[[File:Raw Copper JE3.png|32px]] The texture of raw copper has been changed.}}
{{History|||snap=21w17a|[[Copper ore]] now drops 2-3 raw copper when mined instead of a single unit.}}
{{History||1.18|snap=21w40a|[[Copper ore]] now drops 2-5 raw copper when mined.}}

{{History|bedrock}}
{{History||1.17.0|snap=beta 1.17.0.50|[[File:Raw Copper JE2.png|32px]] Added raw copper.}}
{{History|||snap=beta 1.17.0.52|Raw copper are now available without enabling [[experimental gameplay]].}}
{{History|||snap=beta 1.17.0.54|[[File:Raw Copper JE3.png|32px]] The texture of raw copper has been changed.}}
{{History|foot}}

== Issues ==
{{Issue list}}

==Gallery==
<gallery>
JE 1.17 Dev Raw Metals.jpg|Jappa shows raw ore textures.
Jappa Raw Ores 1.jpg|Jappa shows raw ore textures.
Jappa Raw Ores 2.png|Jappa shows raw ore textures.
Jappa Raw Ores 3.jpg|Jappa shows raw ore textures.
Jappa Raw Ores 4.jpg|Jappa shows raw ore textures.
Jappa Raw Ores 5.jpg|Jappa shows raw ore textures.
</gallery>

{{Items}}

[[Category:Non-renewable resources]]

[[de:Rohkupfer]]
[[es:Cobre en bruto]]
[[fr:Cuivre brut]]
[[it:Rame grezzo]]
[[ja:銅の原石]]
[[pl:Surowa miedź]]
[[pt:Cobre bruto]]
[[ru:Необработанная медь]]
[[tr:Ham Bakır]]
[[uk:Необроблена мідь]]
[[zh:粗铜]]</li></ul>
beta 1.19.70.21Removed data: int argument from /execute <if|unless> block.

References

  1. MC-259227 — resolved as "Fixed".