Minecraft:Entity format: Difference between revisions
More actions
Sync: new page from Minecraft |
Sync: updated from Minecraft |
||
| Line 22: | Line 22: | ||
An entity that inherits from an abstract class or other entity share their implementation and functionalities with each other, while an entity that inherits from an interface may not necessarily share its functionalities, rather implement the required behaviors from the interface itself. As such, an entity's implementation of the interface may be different from other entities. Any entity may implement multiple interfaces, while only inheriting a single abstract class or other entity. | An entity that inherits from an abstract class or other entity share their implementation and functionalities with each other, while an entity that inherits from an interface may not necessarily share its functionalities, rather implement the required behaviors from the interface itself. As such, an entity's implementation of the interface may be different from other entities. Any entity may implement multiple interfaces, while only inheriting a single abstract class or other entity. | ||
{{Missing information|Where are sulfur cubes placed?}} | |||
=== Abstract classes === | === Abstract classes === | ||
{{blist | {{blist | ||
| Line 600: | Line 601: | ||
{{collapse|title={{EntitySprite|bogged|link=Bogged|text='''bogged'''}}|content={{#lst:Bogged|entity data}}}} | {{collapse|title={{EntitySprite|bogged|link=Bogged|text='''bogged'''}}|content={{#lst:Bogged|entity data}}}} | ||
{{collapse|title={{EntitySprite|breeze|link=Breeze|text='''breeze'''}}|content={{#lst:Breeze|entity data}}}} | {{collapse|title={{EntitySprite|breeze|link=Breeze|text='''breeze'''}}|content={{#lst:Breeze|entity data}}}} | ||
{{collapse|title={{EntitySprite|camel|link=Camel|text='''camel'''}}|content={{#lst:Camel|entity data}}}}{{ | {{collapse|title={{EntitySprite|camel|link=Camel|text='''camel'''}}|content={{#lst:Camel|entity data}}}} | ||
{{collapse|title={{EntitySprite|camel-husk|link=Camel Husk|text='''camel_husk'''}}|content={{#lst:Camel Husk|entity data}}}} | |||
{{collapse|title={{EntitySprite|cat|link=Cat|text='''cat'''}}|content={{#lst:Cat|entity data}}}} | |||
{{collapse|title={{EntitySprite|chicken|link=Chicken|text='''chicken'''}}|content={{#lst:Chicken|entity data}}}} | {{collapse|title={{EntitySprite|chicken|link=Chicken|text='''chicken'''}}|content={{#lst:Chicken|entity data}}}} | ||
{{collapse|title={{EntitySprite|cod|link=Cod|text='''cod'''}}|content={{#lst:Cod|entity data}}}} | {{collapse|title={{EntitySprite|cod|link=Cod|text='''cod'''}}|content={{#lst:Cod|entity data}}}} | ||
| Line 629: | Line 632: | ||
{{collapse|title={{EntitySprite|iron-golem|link=Iron Golem|text='''iron_golem'''}}|content={{#lst:Iron Golem|entity data}}}} | {{collapse|title={{EntitySprite|iron-golem|link=Iron Golem|text='''iron_golem'''}}|content={{#lst:Iron Golem|entity data}}}} | ||
{{collapse|title={{EntitySprite|llama|link=Llama|text='''llama'''}}|content={{#lst:Llama|entity data}}}} | {{collapse|title={{EntitySprite|llama|link=Llama|text='''llama'''}}|content={{#lst:Llama|entity data}}}} | ||
{{collapse|title={{EntitySprite|magma-cube|link=Magma Cube|text='''magma_cube'''}}|content={{#lst:Magma Cube|entity data}}}}{{ | {{collapse|title={{EntitySprite|magma-cube|link=Magma Cube|text='''magma_cube'''}}|content={{#lst:Magma Cube|entity data}}}} | ||
{{collapse|title={{EntitySprite|mule|link=Mule|text='''mule'''}}|content={{#lst:Mule|entity data}}}}{{ | {{collapse|title={{EntitySprite|mannequin|link=Mannequin|text='''mannequin'''}}|content={{#lst:Mannequin|entity data}}}} | ||
{{collapse|title={{EntitySprite|mooshroom|link=Mooshroom|text='''mooshroom'''}}|content={{#lst:Mooshroom|entity data}}}} | |||
{{collapse|title={{EntitySprite|mule|link=Mule|text='''mule'''}}|content={{#lst:Mule|entity data}}}} | |||
{{collapse|title={{EntitySprite|nautilus|link=Nautilus|text='''nautilus'''}}|content={{#lst:Nautilus|entity data}}}} | |||
{{collapse|title={{EntitySprite|ocelot|link=Ocelot|text='''ocelot'''}}|content={{#lst:Ocelot|entity data}}}} | |||
{{collapse|title={{EntitySprite|panda|link=Panda|text='''panda'''}}|content={{#lst:Panda|entity data}}}} | {{collapse|title={{EntitySprite|panda|link=Panda|text='''panda'''}}|content={{#lst:Panda|entity data}}}} | ||
{{collapse|title={{EntitySprite|parrot|link=Parrot|text='''parrot'''}}|content={{#lst:Parrot|entity data}}}} | {{collapse|title={{EntitySprite|parrot|link=Parrot|text='''parrot'''}}|content={{#lst:Parrot|entity data}}}} | ||
| Line 656: | Line 663: | ||
{{collapse|title={{EntitySprite|squid|link=Squid|text='''squid'''}}|content={{#lst:Squid|entity data}}}} | {{collapse|title={{EntitySprite|squid|link=Squid|text='''squid'''}}|content={{#lst:Squid|entity data}}}} | ||
{{collapse|title={{EntitySprite|stray|link=Stray|text='''stray'''}}|content={{#lst:Stray|entity data}}}} | {{collapse|title={{EntitySprite|stray|link=Stray|text='''stray'''}}|content={{#lst:Stray|entity data}}}} | ||
{{collapse|title={{EntitySprite|Sulfur-Cube|link=Sulfur Cube|text='''sulfur_cube'''}}|content={{#lst:Sulfur Cube|entity data}}}} | |||
{{collapse|title={{EntitySprite|tadpole|link=Tadpole|text='''tadpole'''}}|content={{#lst:Tadpole|entity data}}}} | {{collapse|title={{EntitySprite|tadpole|link=Tadpole|text='''tadpole'''}}|content={{#lst:Tadpole|entity data}}}} | ||
{{collapse|title={{EntitySprite|trader-llama|link=Trader Llama|text='''trader_llama'''}}|content={{#lst:Llama|entity data}}}} | {{collapse|title={{EntitySprite|trader-llama|link=Trader Llama|text='''trader_llama'''}}|content={{#lst:Llama|entity data}}}} | ||
| Line 749: | Line 757: | ||
|{{HistoryLine|java}} | |{{HistoryLine|java}} | ||
|{{HistoryLine||1.4.2|dev=1.4.1|Added <code>PersistenceRequired</code>.}} | |{{HistoryLine||1.4.2|dev=1.4.1|Added <code>PersistenceRequired</code>.}} | ||
|{{HistoryLine||1.9|dev=15w31a|Added tags <code>HandItems</code>, <code>ArmorItems</code>, <code>HandDropChances</code>, and <code>ArmorDropChances</code> to <code>Living</code>.|The Tag <code>Equipment</code> (under <code>Living</code>) has become deprecated.|The Tag <code>DropChances</code> (under <code>Living</code>) has become deprecated.}} | |{{HistoryLine||1.9|dev=15w31a|Added tags <code>HandItems</code>, <code>ArmorItems</code>, <code>HandDropChances</code>, and <code>ArmorDropChances</code> to <code>Living</code>. | ||
|The Tag <code>Equipment</code> (under <code>Living</code>) has become deprecated.|The Tag <code>DropChances</code> (under <code>Living</code>) has become deprecated.}} | |||
|{{HistoryLine||1.17|dev=20w45a|Entities have been extracted from main (terrain) chunks and are now stored in separate entities directory (similar to [[Minecraft:Point_of_Interest_format|POI storage]]). Those new files are still region files with NBT.}} | |{{HistoryLine||1.17|dev=20w45a|Entities have been extracted from main (terrain) chunks and are now stored in separate entities directory (similar to [[Minecraft:Point_of_Interest_format|POI storage]]). Those new files are still region files with NBT.}} | ||
|{{HistoryLine||1.19|dev=22w11a|The <code>Id</code> tag for each effect in a mob's <code>ActiveEffects</code> tag is now a {{nbt|int|TAG_Integer}} instead of a {{nbt|byte|TAG_Byte}}.}} | |{{HistoryLine||1.19|dev=22w11a|The <code>Id</code> tag for each effect in a mob's <code>ActiveEffects</code> tag is now a {{nbt|int|TAG_Integer}} instead of a {{nbt|byte|TAG_Byte}}.}} | ||
| Line 766: | Line 775: | ||
|<code>Leash</code> in all leashable entities has been renamed to <code>leash</code>. | |<code>Leash</code> in all leashable entities has been renamed to <code>leash</code>. | ||
|<code>PatrolTarget</code> in patrolling mobs has been renamed to <code>patrol_target</code>.}} | |<code>PatrolTarget</code> in patrolling mobs has been renamed to <code>patrol_target</code>.}} | ||
|{{HistoryLine||1.21.4|dev=24w44a|In NBT format for entity type <code>tnt_minecart</code>, added optional field <code>explosion_speed_factor</code>.|The <code>TNTFuse</code> field of TNT | |{{HistoryLine||1.21.4|dev=24w44a|In NBT format for entity type <code>tnt_minecart</code>, added optional field <code>explosion_speed_factor</code>. | ||
|{{HistoryLine||1.21.5|dev=25w02a|The {{nbt|compound|ArmorDropChances}}, {{nbt|compound|HandDropChances}}, and {{nbt|compound|body_armor_drop_chance}} fields have been merged into a {{nbt|compound|drop_chances}} field.|Drop chances with a default value will no longer be stored, and the {{nbt|compound|drop_chances}} field is removed entirely if all defaults.|Area effect clouds have a new field: {{nbt|float|potion_duration_scale}}.}} | |The <code>TNTFuse</code> field of minecarts with TNT has been renamed to <code>fuse</code>.}} | ||
|{{HistoryLine||1.21.5|dev=25w02a|The {{nbt|compound|ArmorDropChances}}, {{nbt|compound|HandDropChances}}, and {{nbt|compound|body_armor_drop_chance}} fields have been merged into a {{nbt|compound|drop_chances}} field. | |||
|Drop chances with a default value will no longer be stored, and the {{nbt|compound|drop_chances}} field is removed entirely if all defaults. | |||
|Area effect clouds have a new field: {{nbt|float|potion_duration_scale}}.}} | |||
|{{HistoryLine|||dev=25w03a|The {{nbt|compound|ArmorItems}}, {{nbt|compound|HandItems}}, and {{nbt|compound|body_armor_item}} fields have been merged into an {{nbt|compound|equipment}} field.}} | |{{HistoryLine|||dev=25w03a|The {{nbt|compound|ArmorItems}}, {{nbt|compound|HandItems}}, and {{nbt|compound|body_armor_item}} fields have been merged into an {{nbt|compound|equipment}} field.}} | ||
|{{HistoryLine|||dev=25w07a|{{cd|Pos}}, {{cd|Motion}}, and {{cd|Rotation}} values without the correct number of components (3, 3, and 2 respectively) will now be fully discarded, instead of only selecting the specified components.|The {{nbt|int|SleepingX}}, {{nbt|int|SleepingY}}, and {{nbt|int|SleepingZ}} fields have been collected into a single {{nbt|int-array|sleeping_pos}} field}} | |{{HistoryLine|||dev=25w07a|{{cd|Pos}}, {{cd|Motion}}, and {{cd|Rotation}} values without the correct number of components (3, 3, and 2 respectively) will now be fully discarded, instead of only selecting the specified components. | ||
|{{HistoryLine|||dev=25w09a|The {{cd|FallFlying}} field will no longer be preserved if removed.|The {{cd|Health}} and {{cd|Air}} fields now default to their respective maximum value if not specified.}} | |The {{nbt|int|SleepingX}}, {{nbt|int|SleepingY}}, and {{nbt|int|SleepingZ}} fields have been collected into a single {{nbt|int-array|sleeping_pos}} field}} | ||
|{{HistoryLine|||dev=25w09a|The {{cd|FallFlying}} field will no longer be preserved if removed. | |||
|The {{cd|Health}} and {{cd|Air}} fields now default to their respective maximum value if not specified.}} | |||
|{{HistoryLine|||dev=25w10a|Custom data (previously present only on [[Minecraft:marker]]s) is now available on all entities.}} | |{{HistoryLine|||dev=25w10a|Custom data (previously present only on [[Minecraft:marker]]s) is now available on all entities.}} | ||
|{{HistoryLine||1.21.6|dev=25w15a|{{cd|area_effect_cloud}}: the {{cd|Particle}} field has been renamed to {{cd|custom_particle}}, and now always functions as an exact override for the default colored {{cd|entity_effect}} particle.}} | |{{HistoryLine||1.21.6|dev=25w15a|{{cd|area_effect_cloud}}: the {{cd|Particle}} field has been renamed to {{cd|custom_particle}}, and now always functions as an exact override for the default colored {{cd|entity_effect}} particle.}} | ||
|{{HistoryLine|||dev=25w18a|Added <code>home_pos</code> and <code>home_radius</code> fields to all mobs.}} | |{{HistoryLine|||dev=25w18a|Added <code>home_pos</code> and <code>home_radius</code> fields to all mobs.}} | ||
|{{HistoryLine|||dev=25w19a|{{cd|tnt}}: The entity that primed the TNT is now stored in an optional {{cd|owner}} field (UUID of Living entity).|{{cd|vex}}: The owner of a vex is now stored in an optional {{cd|owner}} field (UUID of Mob). | |{{HistoryLine|||dev=25w19a|{{cd|tnt}}: The entity that primed the TNT is now stored in an optional {{cd|owner}} field (UUID of Living entity). | ||
}} | |{{cd|vex}}: The owner of a vex is now stored in an optional {{cd|owner}} field (UUID of Mob).}} | ||
|{{HistoryLine||1.21.9|dev=25w32a|{{cd|copper_golem}}: The {{cd|weather_state}} field now expects a string id instead of integer id..}} | |{{HistoryLine||1.21.9|dev=25w32a|{{cd|copper_golem}}: The {{cd|weather_state}} field now expects a string id instead of integer id..}} | ||
|{{HistoryLine|||dev=pre1|{{cd|minecraft:player}} has received several changes to the {{cd|respawn}} object.}} | |{{HistoryLine|||dev=pre1|{{cd|minecraft:player}} has received several changes to the {{cd|respawn}} object.}} | ||
|{{HistoryLine||1.21.11|dev=25w41a|The {{cd|AngryAt}} field has been renamed to {{cd|angry_at}}.|The {{cd|AngerTime}} field has been removed.|An {{cd|anger_end_time}} (long) field has been added, containing the time anger ends in game ticks.}} | |{{HistoryLine||1.21.11|dev=25w41a|The {{cd|AngryAt}} field has been renamed to {{cd|angry_at}}. | ||
|{{HistoryLine||26.1|dev=snap2|The {{cd|current_explosion_impact_pos}} and {{cd|current_impulse_context_reset_grace_time}} fields from players have been added to all mobs and the [[Minecraft:armor stand]].|The {{cd|ignore_fall_damage_from_current_explosion}} field on players has been removed.}} | |The {{cd|AngerTime}} field has been removed. | ||
|An {{cd|anger_end_time}} (long) field has been added, containing the time anger ends in game ticks.}} | |||
|{{HistoryLine||26.1|dev=snap2|The {{cd|current_explosion_impact_pos}} and {{cd|current_impulse_context_reset_grace_time}} fields from players have been added to all mobs and the [[Minecraft:armor stand]]. | |||
|The {{cd|ignore_fall_damage_from_current_explosion}} field on players has been removed.}} | |||
}} | }} | ||
Latest revision as of 11:07, 7 May 2026
Template:Exclusive
Entities are stored in the entities folder of respective dimension folders. It is stored like Minecraft Minecraft:Anvil format files, which are named in the form r.x.z.mca.
Directory structure
- Template:File
- Template:File: Contains entity files for the Minecraft:Overworld. These used to be part of region.
- Template:File: Contains region files of the Minecraft:Nether.
- Template:File: Contains region files of Minecraft:the End.
Entity inheritance
Most entities share similar functionalities with each other from abstract classes or interfaces. For instance, horses (and their undead variants), donkeys, camels, mules, and llamas all inherit from Abstract Horse, which share some of its horse-like behaviors and properties to their inheritance. This inheritance can be seen under the game's code for all of its entities.
An entity that inherits from an abstract class or other entity share their implementation and functionalities with each other, while an entity that inherits from an interface may not necessarily share its functionalities, rather implement the required behaviors from the interface itself. As such, an entity's implementation of the interface may be different from other entities. Any entity may implement multiple interfaces, while only inheriting a single abstract class or other entity.
Abstract classes
Interfaces
NBT structure
Every Minecraft:entity is an unnamed Template:Nbt compound contained in the Entities list of a chunk file. The sole exception is the Player entity, stored in level.dat, or in <player>.dat files on servers.
- Template:Nbt The root tag.
- Template:Nbt: Version of the chunk data.
- Template:Nbt: Position of this chunk.
- Template:Nbt: X coordinate.
- Template:Nbt: Z coordinate.
- Template:Nbt: All the entities. Each compound in this list defines an entity in this chunk.
- Template:Nbt: An entity. See #Entity format below.
Entity format
All entities are with the following structure:
- Template:Nbt Entity data
Mobs
Mobs are a subclass of Living Entity with additional tags to store their health, attacking/damaged state, potion effects, and more depending on the mob. Players and Minecraft:armor stands are a subclass of living entities.
Mob-specific data
Many mobs additionally have individual data.
Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:CollapseTemplate:CollapseTemplate:Collapse Template:Collapse
Projectiles
Projectiles are a subclass of Entity.
Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse
Items and XP Orbs
Items and XPOrbs are a subclass of Entity.
Template:Collapse Template:Collapse
Vehicles
Vehicles are subclasses of Entity.
Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse
Dynamic tiles
Dynamic tiles are a subclass of Entity and are used to simulate realistically moving blocks.
Template:Collapse Template:Collapse
Display
Display entities are subclasses of Entity.
Template:Collapse Template:Collapse Template:Collapse
Other
Other entity types that are a subclass of Entity but do not fit into any of the above categories.
Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse Template:Collapse
History
References
Template:Navbox Java Edition technical
Minecraft:de:Objektdaten Minecraft:fr:Format d'entité Minecraft:ja:エンティティフォーマット Minecraft:ko:개체 형식 Minecraft:pt:Formato de entidade Minecraft:zh:实体数据格式