<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ACommands%2Fitem</id>
	<title>Minecraft:Commands/item - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sasgaming.net/index.php?action=history&amp;feed=atom&amp;title=Minecraft%3ACommands%2Fitem"/>
	<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Commands/item&amp;action=history"/>
	<updated>2026-04-09T06:16:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.sasgaming.net/index.php?title=Minecraft:Commands/item&amp;diff=49712&amp;oldid=prev</id>
		<title>imported&gt;RedX at 01:36, 31 October 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.sasgaming.net/index.php?title=Minecraft:Commands/item&amp;diff=49712&amp;oldid=prev"/>
		<updated>2025-10-31T01:36:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{about||the [[Minecraft:Bedrock Edition]] equivalent|Commands/replaceitem|other uses|Item (disambiguation)}}&lt;br /&gt;
{{Exclusive|Java}}&lt;br /&gt;
{{Infobox command&lt;br /&gt;
|name=item&lt;br /&gt;
|oplevel=2&lt;br /&gt;
}}&lt;br /&gt;
Manipulate or copy [[Minecraft:item]]s in the [[Minecraft:inventories]] of [[Minecraft:block]]s ([[Minecraft:chest]]s, [[Minecraft:furnace]]s, etc.) or [[Minecraft:entities]] ([[Minecraft:player]]s or [[Minecraft:mob]]s).&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;item modify&amp;#039;&amp;#039;&amp;#039; (block &amp;lt;pos&amp;gt;|entity &amp;lt;targets&amp;gt;) &amp;lt;slot&amp;gt; &amp;lt;modifier&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Modifies the items in the specified slot with the specified [[Minecraft:item modifier]].&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;item replace&amp;#039;&amp;#039;&amp;#039; (block &amp;lt;pos&amp;gt;|entity &amp;lt;targets&amp;gt;) &amp;lt;slot&amp;gt; &amp;#039;&amp;#039;&amp;#039;with&amp;#039;&amp;#039;&amp;#039; &amp;lt;item&amp;gt; [&amp;lt;count&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Replaces the items in the specified slot with the specified items.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;item replace&amp;#039;&amp;#039;&amp;#039; (block &amp;lt;pos&amp;gt;|entity &amp;lt;targets&amp;gt;) &amp;lt;slot&amp;gt; &amp;#039;&amp;#039;&amp;#039;from&amp;#039;&amp;#039;&amp;#039; (block &amp;lt;sourcePos&amp;gt;|entity &amp;lt;sourceTarget&amp;gt;) &amp;lt;sourceSlot&amp;gt; [&amp;lt;modifier&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Copies the source items to the target slot and optionally modifies it with the &amp;lt;code&amp;gt;modifier&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Syntax displayed in various ways&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:{| class=&amp;quot;collapsible collapsed collapse-button-none&amp;quot; data-description=&amp;quot;simple_tree&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align:left&amp;quot; | Simplified tree:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;item&amp;#039;&amp;#039;&amp;#039; ...&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;... &amp;#039;&amp;#039;&amp;#039;modify&amp;#039;&amp;#039;&amp;#039; &amp;lt;&amp;#039;&amp;#039;TARGET&amp;#039;&amp;#039;&amp;gt; &amp;lt;slot&amp;gt; &amp;lt;modifier&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;... &amp;#039;&amp;#039;&amp;#039;replace&amp;#039;&amp;#039;&amp;#039; &amp;lt;&amp;#039;&amp;#039;TARGET&amp;#039;&amp;#039;&amp;gt; &amp;lt;slot&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;... &amp;#039;&amp;#039;&amp;#039;with&amp;#039;&amp;#039;&amp;#039; &amp;lt;item&amp;gt; [&amp;lt;count&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;... &amp;#039;&amp;#039;&amp;#039;from&amp;#039;&amp;#039;&amp;#039; &amp;lt;&amp;#039;&amp;#039;SOURCE&amp;#039;&amp;#039;&amp;gt; &amp;lt;sourceSlot&amp;gt; [&amp;lt;modifier&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
: where substituted arguments are:&lt;br /&gt;
:: &amp;lt;code&amp;gt;&amp;lt;&amp;#039;&amp;#039;TARGET&amp;#039;&amp;#039;&amp;gt;&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;(block &amp;lt;pos&amp;gt;|entity &amp;lt;targets&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;&amp;lt;&amp;#039;&amp;#039;SOURCE&amp;#039;&amp;#039;&amp;gt;&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;(block &amp;lt;sourcePos&amp;gt;|entity &amp;lt;sourceTarget&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
:{| class=&amp;quot;collapsible collapsed collapse-button-none&amp;quot; data-description=&amp;quot;one_line&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align:left&amp;quot; | Minimised:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
: &amp;lt;code&amp;gt;item (modify (block &amp;lt;pos&amp;gt;|entity &amp;lt;targets&amp;gt;) &amp;lt;slot&amp;gt; &amp;lt;modifier&amp;gt;|replace (block &amp;lt;pos&amp;gt;|entity &amp;lt;targets&amp;gt;) &amp;lt;slot&amp;gt; (with &amp;lt;item&amp;gt; [&amp;lt;count&amp;gt;]|from (block &amp;lt;sourcePos&amp;gt;|entity &amp;lt;sourceTarget&amp;gt;) &amp;lt;sourceSlot&amp;gt; [&amp;lt;modifier&amp;gt;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
:{| class=&amp;quot;collapsible collapsed collapse-button-none&amp;quot; data-description=&amp;quot;maximised_tree&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align:left&amp;quot; | Maximised:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
: &amp;lt;code&amp;gt;item modify block &amp;lt;pos&amp;gt; &amp;lt;slot&amp;gt; &amp;lt;modifier&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;item modify entity &amp;lt;targets&amp;gt; &amp;lt;slot&amp;gt; &amp;lt;modifier&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;item replace block &amp;lt;pos&amp;gt; &amp;lt;slot&amp;gt; with &amp;lt;item&amp;gt; [&amp;lt;count&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;item replace block &amp;lt;pos&amp;gt; &amp;lt;slot&amp;gt; from block &amp;lt;sourcePos&amp;gt; &amp;lt;sourceSlot&amp;gt; [&amp;lt;modifier&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;item replace block &amp;lt;pos&amp;gt; &amp;lt;slot&amp;gt; from entity &amp;lt;sourceTarget&amp;gt; &amp;lt;sourceSlot&amp;gt; [&amp;lt;modifier&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;item replace entity &amp;lt;targets&amp;gt; &amp;lt;slot&amp;gt; with &amp;lt;item&amp;gt; [&amp;lt;count&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;item replace entity &amp;lt;targets&amp;gt; &amp;lt;slot&amp;gt; from block &amp;lt;sourcePos&amp;gt; &amp;lt;sourceSlot&amp;gt; [&amp;lt;modifier&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;item replace entity &amp;lt;targets&amp;gt; &amp;lt;slot&amp;gt; from entity &amp;lt;sourceTarget&amp;gt; &amp;lt;sourceSlot&amp;gt; [&amp;lt;modifier&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
{{argument|pos|block_pos}}&lt;br /&gt;
: Specifies the position of the block to be modified.&lt;br /&gt;
: {{arg desc|je=block_pos}}&lt;br /&gt;
&lt;br /&gt;
{{argument|targets|entity}}&lt;br /&gt;
: Specifies one or more entities to modify.&lt;br /&gt;
: {{arg desc|je=entity|amount=multiple|type=entities}}&lt;br /&gt;
&lt;br /&gt;
{{argument|slot|item_slot}}&lt;br /&gt;
: Specifies the inventory slot to be modified. Valid values depend on whether a block or an entity is being modified.&lt;br /&gt;
: {{arg desc|je=item_slot}}&lt;br /&gt;
&lt;br /&gt;
{{argument|modifier|loot_modifier}}&lt;br /&gt;
: Specifies the [[Minecraft:item modifier]] to apply on the chosen item.&lt;br /&gt;
: {{Arg desc|je=loot_modifier}}&lt;br /&gt;
&lt;br /&gt;
{{argument|item|item_stack}}&lt;br /&gt;
: Specifies the item to be placed in the block or entity&amp;#039;s inventory slot.&lt;br /&gt;
: {{arg desc|je=item_stack}}&lt;br /&gt;
&lt;br /&gt;
{{argument|count|integer}}&lt;br /&gt;
: Specifies the number of items to be placed in the block or entity&amp;#039;s inventory slot.&lt;br /&gt;
: {{arg desc|je=integer|min=1|max=99}}&amp;lt;!--unparseable if bigger than 99, failed if bigger than the max stack size--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{argument|sourcePos|block_pos}}&lt;br /&gt;
: Specifies the position of the block to copy items from.&lt;br /&gt;
: {{arg desc|je=block_pos}}&lt;br /&gt;
&lt;br /&gt;
{{argument|sourceTarget|entity}}&lt;br /&gt;
: Specifies an entity to copy items from.&lt;br /&gt;
: {{arg desc|je=entity|amount=single}}&lt;br /&gt;
&lt;br /&gt;
{{argument|sourceSlot|item_slot}}&lt;br /&gt;
: Specifies the inventory slot to copy the items from. Valid values depend on whether the source is block or an entity.&lt;br /&gt;
: {{arg desc|je=item_slot}}&lt;br /&gt;
&lt;br /&gt;
== Result ==&lt;br /&gt;
{{Result table|onlyje=1}}&lt;br /&gt;
{{Result table|The command is incomplete, or any argument is not specified correctly.|unparseable}}&lt;br /&gt;
{{Result table|cmd=/item modify ...&amp;lt;br&amp;gt;/item ... from ...|&amp;lt;code&amp;gt;&amp;lt;modifier&amp;gt;&amp;lt;/code&amp;gt; doesn&amp;#039;t meet any of the following conditions:&lt;br /&gt;
* If it is a resource location, it should be the resource location of an existing item modifier.&lt;br /&gt;
* If it is a string NBT tag, it should be able to be parsed into a resource location, and the resource location should be of an existing item modifier.&lt;br /&gt;
* If it is a non-string NBT tag, it should be able to be decoded as an item modifier.|fail}}&lt;br /&gt;
{{Result table|cmd=/item modify block ...&amp;lt;br&amp;gt;/item replace block ...|&amp;lt;code&amp;gt;&amp;lt;pos&amp;gt;&amp;lt;/code&amp;gt; is unloaded or out of the world.}}&lt;br /&gt;
{{Result table|The block at the &amp;lt;code&amp;gt;&amp;lt;pos&amp;gt;&amp;lt;/code&amp;gt; is not a container.}}&lt;br /&gt;
{{Result table|The block at the &amp;lt;code&amp;gt;&amp;lt;pos&amp;gt;&amp;lt;/code&amp;gt; does not have the specified slot.}}&lt;br /&gt;
{{Result table|cmd=/item modify entity ...&amp;lt;br&amp;gt;/item replace entity ...|&amp;lt;code&amp;gt;&amp;lt;targets&amp;gt;&amp;lt;/code&amp;gt; fails to resolve to one or more entities (named player must be online).}}&lt;br /&gt;
{{Result table|All selected entities meet one or more of the following conditions:&lt;br /&gt;
* It doesn&amp;#039;t have the specified slot (for example, zombies have no &amp;lt;code&amp;gt;horse.armor&amp;lt;/code&amp;gt;).&lt;br /&gt;
* Specified item cannot be placed into the specified slot of its (for example, to place a stone into &amp;lt;code&amp;gt;armor.chest&amp;lt;/code&amp;gt; of a player).}}&lt;br /&gt;
{{Result table|cmd=/... with &amp;lt;item&amp;gt; &amp;lt;count&amp;gt;|&amp;lt;code&amp;gt;&amp;lt;count&amp;gt;&amp;lt;/code&amp;gt; exceeds the stack limit of the specified item.}}&lt;br /&gt;
{{Result table|cmd=/... from block ...|&amp;lt;code&amp;gt;&amp;lt;sourcePos&amp;gt;&amp;lt;/code&amp;gt; is unloaded or out of the world.}}&lt;br /&gt;
{{Result table|The block at &amp;lt;code&amp;gt;&amp;lt;sourcePos&amp;gt;&amp;lt;/code&amp;gt; is not a container.}}&lt;br /&gt;
{{Result table|The block at &amp;lt;code&amp;gt;&amp;lt;sourcePos&amp;gt;&amp;lt;/code&amp;gt; does not have the specified slot.}}&lt;br /&gt;
{{Result table|cmd=/... from entity ...|&amp;lt;code&amp;gt;&amp;lt;sourceTarget&amp;gt;&amp;lt;/code&amp;gt; fails to resolve to a single entity (named player must be online).}}&lt;br /&gt;
{{Result table|The &amp;lt;code&amp;gt;&amp;lt;sourceTarget&amp;gt;&amp;lt;/code&amp;gt; doesn&amp;#039;t have the specified slot (for example, zombies have no horse.armor).}}&lt;br /&gt;
{{Result table|cmd=|succeed}}&lt;br /&gt;
{{Result table}}&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
{{Output table}}&lt;br /&gt;
{{Output table|edition=je|On fail|0|0|0}}&lt;br /&gt;
{{Output table|cmd=/item (modify{{!}}replace) block ...|On success|1|1|1}}&lt;br /&gt;
{{Output table|cmd=/item (modify{{!}}replace) entity ...|On success|1|1|the number of entities whose items are successfully replaced}}&lt;br /&gt;
{{Output table}}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
* To replace the items in the bottom-right slot of a single chest two block above with four spruce saplings:&lt;br /&gt;
** &amp;lt;code&amp;gt;/item replace block ~ ~2 ~ container.26 with minecraft:spruce_sapling 4&amp;lt;/code&amp;gt;&lt;br /&gt;
* To replace the items in the rightmost hotbar slot of the nearest player with four spruce saplings:&lt;br /&gt;
** &amp;lt;code&amp;gt;/item replace entity @p hotbar.8 with minecraft:spruce_sapling 4&amp;lt;/code&amp;gt;&lt;br /&gt;
* To replace the item in the offhand of the selected player with the item in their main hand:&lt;br /&gt;
** &amp;lt;code&amp;gt;/item replace entity @s weapon.offhand from entity @s weapon.mainhand&amp;lt;/code&amp;gt;&lt;br /&gt;
* To put a brown [[Minecraft:banner]] on a player&amp;#039;s head&lt;br /&gt;
** &amp;lt;code&amp;gt;/item replace entity @s armor.head with minecraft:brown_banner&amp;lt;/code&amp;gt;&lt;br /&gt;
* To increase the count of the item in your main hand:&lt;br /&gt;
** &amp;lt;code&amp;gt;/item modify entity @s weapon.mainhand example:increase_count&amp;lt;/code&amp;gt;&lt;br /&gt;
** file in a data pack: &amp;lt;code&amp;gt;data/example/item_modifier/increase_count.json&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
  &amp;quot;function&amp;quot;: &amp;quot;minecraft:set_count&amp;quot;,&lt;br /&gt;
  &amp;quot;count&amp;quot;: 1,&lt;br /&gt;
  &amp;quot;add&amp;quot;: true&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* To increase the count of the item in your main hand without external files:&lt;br /&gt;
** &amp;lt;code&amp;gt;item modify entity @s weapon.mainhand {&amp;quot;function&amp;quot;:&amp;quot;minecraft:set_count&amp;quot;,&amp;quot;count&amp;quot;:1,&amp;quot;add&amp;quot;:true}&amp;lt;/code&amp;gt;&lt;br /&gt;
* To put the item in your hand, on your head:&lt;br /&gt;
** &amp;lt;code&amp;gt;/item replace entity @s armor.head from entity @s weapon.mainhand&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
{{HistoryTable&lt;br /&gt;
|{{HistoryLine|java}}&lt;br /&gt;
|{{HistoryLine||November 8, 2017|link=https://www.minecraft.net/en-us/article/minecraft-snapshot-17w45a|A command called {{cmd|modifyitem|link=none}} was mentioned in snapshot&amp;#039;s [[Minecraft:Java Edition 17w45a]] update log at [[Minecraft:minecraft.net]]. At first it was planned to replace {{cmd|enchant}}.}}&lt;br /&gt;
|{{HistoryLine||February 9, 2018|link=https://www.minecraft.net/en-us/article/minecraft-snapshot-18w06a|In [[Minecraft:Java Edition 18w06a]]&amp;#039;s update logs, [[Minecraft:Dinnerbone]] states that the team has shelved the {{cmd|modifyitem|link=none}} idea, but that it may be considered the future.}}&lt;br /&gt;
|{{HistoryLine||1.17|dev=20w46a|Added {{cmd|item|link=none}}, replacing {{cmd|replaceitem}} and reusing the idea of {{cmd|modifyitem|link=none}} through one of its arguments, &amp;lt;code&amp;gt;modify&amp;lt;/code&amp;gt;, which in fact contains a similar functionality to {{cmd|enchant|link=none}}, as they use [[Minecraft:item modifier]]s capable of changing the specified item&amp;#039;s enchantments.}}&lt;br /&gt;
|{{HistoryLine|||dev=21w19a|Syntax of {{cmd|item|link=none}} has been changed.}}&lt;br /&gt;
|{{HistoryLine||1.19|dev=Pre-release 1|Replacing the off-hand slot using {{cmd|item|link=none}} no longer produces a [[Minecraft:vibration]].&amp;lt;ref&amp;gt;{{bug|MC-250022}}&amp;lt;/ref&amp;gt;}}&lt;br /&gt;
|{{HistoryLine||1.20.2|dev=23w31a|Can now replace items in [[Minecraft:jukebox]]es.&lt;br /&gt;
|Can now remove items in [[Minecraft:chiseled bookshelves]].}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{cmd|data}} — can also replace items in a container&amp;#039;s or mob&amp;#039;s inventory, or modify the drop chances of armor and weapons&lt;br /&gt;
* {{cmd|give}} — give items to players without specifying specific inventory slots or overwriting other items&lt;br /&gt;
* {{cmd|replaceitem}} — The {{el|be}} equivalent&lt;br /&gt;
&lt;br /&gt;
== Navigation ==&lt;br /&gt;
{{Navbox commands}}&lt;br /&gt;
&lt;br /&gt;
[[Minecraft:de:Befehl/item]]&lt;br /&gt;
[[Minecraft:es:Comandos/item]]&lt;br /&gt;
[[Minecraft:ja:コマンド/item]]&lt;br /&gt;
[[Minecraft:pt:Comandos/item]]&lt;br /&gt;
[[Minecraft:ru:Команды консоли/item]]&lt;br /&gt;
[[Minecraft:zh:命令/item]]&lt;/div&gt;</summary>
		<author><name>imported&gt;RedX</name></author>
	</entry>
</feed>