Minecraft:Entity format: Difference between revisions
More actions
Sync: updated from Minecraft |
Sync: updated from Minecraft |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 43: | Line 43: | ||
}} | }} | ||
|Hanging Entity {{blist | |Hanging Entity {{blist | ||
|{{EntityLink|Cushion}}{{upcoming|java 26.3}} | |||
|{{EntityLink|Item Frame}} {{blist | |{{EntityLink|Item Frame}} {{blist | ||
|{{EntityLink|Glow Item Frame}} | |{{EntityLink|Glow Item Frame}} | ||
| Line 577: | Line 578: | ||
<div class="treeview"> | <div class="treeview"> | ||
* {{nbt|compound}} Entity data | * {{nbt|compound}} Entity data | ||
{{: | {{:Entity format/Entity}} | ||
</div> | </div> | ||
| Line 586: | Line 587: | ||
* {{nbt|compound}} Mob data | * {{nbt|compound}} Mob data | ||
** {{nbt inherit/entity}} | ** {{nbt inherit/entity}} | ||
{{: | {{:Entity format/Mob}} | ||
</div> | </div> | ||
| Line 740: | Line 741: | ||
{{collapse|title={{EntitySprite|area-effect-cloud|link=Lingering Potion|text='''area_effect_cloud'''}}|content={{#lst:Lingering Potion|entity data}}}} | {{collapse|title={{EntitySprite|area-effect-cloud|link=Lingering Potion|text='''area_effect_cloud'''}}|content={{#lst:Lingering Potion|entity data}}}} | ||
{{collapse|title={{EntitySprite|cushion|link=Cushion|text='''cushion'''}}|content={{#lst:Cushion|entity data}}}} | |||
{{collapse|title={{EntitySprite|end-crystal|link=End Crystal|text='''end_crystal'''}}|content={{#lst:End Crystal|entity data}}}} | {{collapse|title={{EntitySprite|end-crystal|link=End Crystal|text='''end_crystal'''}}|content={{#lst:End Crystal|entity data}}}} | ||
{{collapse|title={{EntitySprite|evoker-fangs|link=Evoker|text='''evoker_fangs'''}}|content={{#lst:Evoker|fang entity data}}}} | {{collapse|title={{EntitySprite|evoker-fangs|link=Evoker|text='''evoker_fangs'''}}|content={{#lst:Evoker|fang entity data}}}} | ||
| Line 779: | Line 781: | ||
|{{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. | |{{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. | |Drop chances with a default value will no longer be stored, and the {{nbt|compound|drop_chances}} field is removed entirely if all defaults. | ||
|{{nbt|int-array|last_hurt_by_player}}, {{nbt|int|last_hurt_by_player_memory_time}}, {{nbt|int-array|last_hurt_by_mob}}, and {{nbt|int|ticks_since_last_hurt_by_mob}} added to living entities. | |||
|Area effect clouds have a new field: {{nbt|float|potion_duration_scale}}.}} | |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.}} | ||
| Line 797: | Line 800: | ||
|{{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]]. | |{{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|ignore_fall_damage_from_current_explosion}} field on players has been removed.}} | ||
|{{HistoryLine||26.2|dev=snap6|The {{cd|HurtByTimestamp}} field has been removed from the LivingEntity class; {{cd|ticks_since_last_hurt_by_mob}} should be used instead.}} | |||
}} | }} | ||
Latest revision as of 11:13, 22 July 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 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:实体数据格式