Minecraft Wiki
Advertisement
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page describes content that exists only in outdated versions of Java Edition. 
This command was superseded by the /data command in Java Edition 1.13.

Modifies the data tag of an entity.

Syntax

entitydata <entity> <dataTag>

Arguments

entity
Specifies the entity or entities to be modified. Must be an entity UUID or the @e target selector.
dataTag
Specifies the data tag elements to be added to, or overwrite elements of, the specified entity (data tags cannot be removed and strings cannot be set to a null value). Must be a compound NBT tag (for example, {CustomName:Steve}).

Result

Fails if the arguments are not specified correctly, or if entity fails to resolve to one or more non-player entities (players cannot be changed).

On success, modifies the data tag of the targeted entity or entities.

Examples

  • To prevent all zombies from picking up loot:
    entitydata @e[type=zombie] {CanPickUpLoot:0}

History

Java Edition
1.8
{{Extension DPL}}<ul><li>[[Drinks|Drinks]]<br/>[[File:Drinking Steve.png|150px|right]] [[File:Drinking Alex.png|150px|right]]

'''Drinks''' are a narrow class of consumable [[item]]s that can be ingested by the [[player]] in an extremely similar manner to [[food]]. However, drinks are not encountered quite as commonly as food is, and they are not nearly as integral to Survival gameplay. Drinks can generally be distinguished from food by the sounds they make upon consumption, the lack of [[particles]] they emit, and the fact that they leave an empty container item in the [[inventory]] after consumption. Drinks do not affect [[hunger]] or saturation values upon use (with the exception of [[honey bottle]]s), and do not need those values to be depleted in order to be consumed.

Drinks are drunk by holding {{control|use item}} while having the drink item selected in the hotbar or in the off hand.

== Drinks ==

{{/table}}

== History ==
{{main|Milk#History|Potion#History|Honey Bottle#History}}
{{History|java alpha}}
{{History||v1.0.11|[[File:Milk Bucket JE1 BE1.png|32px]] Added milk.}}
{{History|java}}
{{History||1.0.0|snap=Beta 1.9 Prerelease 3|Added water bottles and potions.}}
{{History||1.15|snap=19w34a|[[File:Honey Bottle JE1.png|32px]] Added honey bottles.}}

{{History|pocket alpha}}
{{History||v0.7.0|[[File:Milk Bucket JE1 BE1.png|32px]] Added milk buckets.}} 
{{History||v0.12.1|snap=build 1|Added water bottles and potions.}}
{{History|bedrock}}
{{History||1.14.0|snap=beta 1.14.0.1|[[File:Honey Bottle BE1.png|32px]] Added honey bottles.}} 
{{History|foot}}
{{Items}}

[[ja:飲み物]]
[[pt:Bebidas]]
[[Category:Food]]</li><li>[[:Category:Joke items|Category:Joke items]]<br/>[[Category:Joke features|Items]]
[[Category:Items]]</li></ul>
14w32bAdded /entitydata.
1.13
{{Extension DPL}}<ul><li>[[Enchanted Golden Apple|Enchanted Golden Apple]]<br/>{{Item
| image = Enchanted Golden Apple.png
| rarity = Epic
| heals = {{hunger|4}}
| effects = 
* {{EffectLink|Absorption}} IV (2:00)
* {{EffectLink|Regeneration}} II (0:20){{only|java|short=yes}}/V (0:30){{only|bedrock|short=yes}}
* {{EffectLink|Fire Resistance}} (5:00)
* {{EffectLink|Resistance}} (5:00)
| renewable = No
| stackable = Yes (64)
}}

An '''enchanted golden apple''' ({{in|je}}), notch apple, or '''enchanted apple''' ({{in|be}}), is a rare, uncraftable variant of the [[golden apple]] that grants much more powerful effects when consumed.

== Obtaining ==
=== Chest loot ===
{{LootChestItem|enchanted-golden-apple}}

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

To eat an enchanted golden apple, press and hold {{control|use}} while it is selected in the hotbar. It restores {{hunger|4}} points of hunger and 9.6 [[Hunger#Mechanics|saturation]].

The enchanted golden apple provides: 
* [[Absorption]] IV for 2 minutes (providing {{hp|16|absorption=1}} points of absorption health)
* [[Regeneration]] level II {{in|java}} or V {{in|bedrock}} for 30 seconds ({{in|java}}, {{hp|1}} is restored every 25 ticks, {{hp|2|notag=1}} × 0.4 per second) for 20 seconds (long enough to heal {{hp|16}} points of damage; {{in|bedrock}}, {{hp|1}} is restored every 6 ticks, {{hp|2|notag=1}} × 1.66 per second for 30 seconds, which is long enough to heal up to {{hp|100}} points of damage.
* [[Fire Resistance]] I for 5 minutes
* [[Resistance]] I (20% reduced damage from all sources except the [[void]]) for 5 minutes

=== Horses ===
Enchanted golden apples can be used for improving the chances of taming a [[horse]] by 10%, for [[breeding]] and leading horses, and for speeding up the growth of [[baby]] horses by 4 minutes.

=== Crafting ingredient ===
{{crafting usage|Enchanted Golden Apple|match=start}}
===Piglins===
{{EntityLink|Piglin|Piglins}} are attracted to enchanted golden apples and run toward any enchanted golden apples on the ground, and inspect it for 6 to 8 seconds before putting it in their inventory. However, piglins do not eat enchanted golden apples (or any [[food]]).

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

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Enchanted Golden Apple
|spritetype=item
|nameid=enchanted_golden_apple
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|showaliasids=y
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Enchanted Golden Apple
|spritetype=item
|nameid=enchanted_golden_apple
|aliasid=appleenchanted
|id=259
|form=item
|translationkey=item.appleEnchanted.name
|foot=1}}

== Achievements ==
{{load achievements|Overpowered;Fruit on the Loom;Oooh, shiny!}}

== Advancements ==
{{load advancements|Oh Shiny;A Furious Cocktail;How Did We Get Here;Husbandry;A Balanced Diet}}

== History ==
{{History|java}}
{{History||1.3.1|snap=12w21a|[[File:Enchanted Golden Apple JE1 BE1.gif|32px]] Added enchanted golden apples.
|Enchanted golden apples highly resemble the golden apple prior to [[Java Edition 1.1|1.1]]. 
|Enchanted golden apples have [[Regeneration]] IV (30 seconds), [[Resistance]] (5 minutes) and [[Fire Resistance]] (5 minutes). 
|Enchanted golden apples can be [[crafted]] with 8 [[blocks of gold]] and one apple, making them [[renewable]]. 
|Enchanted golden apples shine like an [[enchanting|enchanted]] [[item]] and have a purple tooltip while the standard golden apple's tooltip changed to blue. However, the standard golden apple's effects remain unchanged.}}
{{History|||snap=12w21b|Added Enchanted Golden Apples to the Creative inventory.}}
{{History||1.6.1|snap=13w24b|Enchanted golden apples now give the player Absorption as well, and Regeneration IV has been increased to Regeneration V.}}
{{History|||snap=?|Enchanted golden apples can now be used to tame, breed and heal horses and donkeys.}}
{{History||1.8|snap=14w06a|[[Crafting]] an enchanted golden apple now gives the [[player]] the [[Achievements/Java_Edition|''achievement'']] "Overpowered."}}
{{History||1.9|snap=15w37a|Enchanted golden apples now give Regeneration II (down from V) and [[Absorption]] IV (up from I), in addition to the unchanged [[Resistance]] and [[Fire Resistance]] effects. The duration of the Regeneration effect has now also been decreased to 20 seconds.}}
{{History|||snap=15w44a|Enchanted golden apples are now uncraftable, making them no longer renewable.
|Enchanted golden apples have been added to [[dungeon]], [[desert temple]] and [[mineshaft]] chests.}}
{{History||1.11|snap=16w39a|Enchanted golden apples are now found in the new [[woodland mansion]] chests.}}
{{History||1.13|snap=17w47a|The names and IDs have been split into golden apple and enchanted golden apple.
|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 322.}}
{{History||1.14|snap=18w43a|[[File:Enchanted Golden Apple JE2 BE2.gif|32px]] The texture for enchanted golden apples has been changed.}}
{{History||1.16|snap=20w16a|Enchanted golden apples can now be found inside [[ruined portal]] chests.}}
{{History||1.16.2|snap=20w30a|Enchanted golden apples can now be found inside [[bastion remnant]] chests.}}
{{History||1.18|snap=experimental snapshot 6|Horses, donkeys and mules now follow players holding enchanted golden apples.}}
{{History||1.19|snap=22w13a|Enchanted golden apples may now be found in [[ancient city]] [[chest]]s.}}

{{History|pocket alpha}}
{{History||v0.12.1|snap=build 1|[[File:Enchanted Golden Apple JE1 BE1.gif|32px]] Added enchanted golden apples.}}
{{History|||snap=build 4|A crafting recipe has been added for enchanted golden apples.}}
{{History|pocket}}
{{History||1.1.0|snap=alpha 1.1.0.0|Enchanted golden apples are now known as "Enchanted Apple."}}
{{History|bedrock}}
{{History||1.2.0|snap=?|Enchanted apples now give [[Absorption]] IV rather than Absorption I.}}
{{History||1.2.13|snap=?|Enchanted golden apples are now uncraftable, making them no longer [[renewable resource|renewable]].}}
{{History||?|Enchanted apples now give [[Regeneration]] V rather than IV.}}
{{History||1.10.0|snap=beta 1.10.0.3|Enchanted apples are no longer used to [[crafting|craft]] patterns on [[banner]]s directly, but are now used to craft Thing [[banner pattern]]s.
|[[File:Enchanted Golden Apple JE2 BE2.gif|32px]] The texture for the enchanted golden apple has been changed.}}
{{History||1.16.0|snap=beta 1.16.0.57|Enchanted golden apples can now be found inside [[ruined portal]] chests.}}
{{History||1.16.100|snap=beta 1.16.100.56|The ID of enchanted apples has been changed from <code>appleenchanted</code> to <code>enchanted_golden_apple</code>.}}

{{History|console}}
{{History||xbox=TU14|xbone=CU1|ps=1.04|wiiu=Patch 1|switch=1.0.1|[[File:Enchanted Golden Apple JE1 BE1.gif|32px]] Added enchanted golden apples.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Enchanted Golden Apple JE2 BE2.gif|32px]] The texture for the enchanted golden apple has been changed.}}

{{History|New 3DS}}
{{History||0.1.0|[[File:Enchanted Golden Apple JE1 BE1.gif|32px]] Added enchanted golden apples.}}
{{History|foot}}

== Issues ==
{{issue list}}

== Trivia ==
* The damage tag of an enchanted apple obtained {{in|be}} is 1, although setting it to 0 makes no difference.

== Gallery ==
<gallery>
GoldenAppleComparison.png|A comparison of the two golden apple variations.
EnchantedGoldenAppleEffects.png|The effects of consuming an enchanted golden apple.
Notch Apple In Mansion Chest.png|An extremely rare occasion where a regular golden apple and an enchanted apple being found in the same woodland mansion chest {{in|ee}}.
GoldenAppleDungeonChest.png|Golden apple in a [[dungeon]] chest, prior to 1.3.1. It resembles the enchanted golden apple.
GodPortal.png|An enchanted golden apple found in a ruined portal chest.
GodSpawner.png|An enchanted golden apple found in a monster room chest.
</gallery>

{{Items}}

[[Category:Non-renewable resources]]
[[Category:Food]]

[[de:Verzauberter goldener Apfel]]
[[es:Manzana dorada encantada]]
[[fr:pomme dorée enchantée]]
[[ja:エンチャントされた金のリンゴ]]
[[pt:Maçã dourada encantada]]
[[th:แอปเปิ้ลทองร่ายมนตร์]]
[[zh:附魔金苹果]]</li><li>[[Photo|Photo]]<br/>{{exclusive|education}}
{{Item
| image = Photo EE2.png
| renewable = No (unless [[portfolio]] is available)
| stackable = 
}}

A '''photo''' is an [[item]] containing a picture taken with a [[camera]].<ref>{{cite|url=https://web.archive.org/web/20210925044841mp_/https://educommunity.minecraft.net/hc/en-us/articles/4407489082644-Feature-Walkthrough-Minecraft-Education-Edition-GOAT-Beta-version-1-17-30-| title = Feature Walkthrough Minecraft: Education Edition GOAT Beta (version 1.17.30)|website=Minecraft: Education Edition Support|date=September 24, 2021}}</ref><ref>{{cite|url=https://education.minecraft.net/en-us/blog/new-update-and-anniversary-for-mee| title = The GOAT Update Celebrates a Minecraft Milestone!|website=Minecraft: Education Edition|date=November 2, 2021}}</ref><ref>{{ytl|2Wd0J-EIfws|GOAT Release Playthrough|Minecraft: Education Edition|December 2, 2021}}</ref>

== Obtaining ==
A photo in a [[portfolio]] can be saved as a photo item by selecting the "Save to Inventory" button underneath it.

== Usage ==
Photos display an image when held in the hand or when placed in an [[item frame]], similarly to [[map]]s. Photos can have captions added to them by renaming them in an [[anvil]] or by adding a caption while they are in a portfolio. Photos can be added to [[book and quill]]s and portfolios by selecting the "Add Photo" button in the book and quill or portfolio.

== Data values ==
=== ID ===
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Photo
|spritetype=item
|nameid=photo_item
|id=?
|form=item
|foot=1}}

== History ==
{{History|education}}
{{History||1.17.30|snap=1.17.30.2|[[File:Photo EE1.png|32px]] Added photos.}}
{{History||1.17.30|snap=release|[[File:Photo EE2.png|32px]] Changed photo texture.}}
{{History|foot}}

== Gallery ==
<gallery>
Photo Item 1.png|A photo being placed in an item frame.
Photo Item 2.png|A photo being saved from a portfolio.
Photo Item 3.png|A photo being added to a book and quill.
</gallery>

== References ==
{{Reflist}}

{{Items}}
{{Education Edition}}

[[Category:Education Edition items]]
[[Category:Non-renewable resources]]

[[ja:写真]]
[[pl:Zdjęcie]]
[[zh:相片]]</li></ul>
17w45bRemoved /entitydata as its features are merged into /data.

See also

Advertisement