Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Entity format: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: updated from Minecraft
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:


== Directory structure ==
== Directory structure ==
{{See also|World#Storage location}}
{{See also|World#Storage}}
<div class="treeview">
<div class="treeview">
*{{File|directory|''world save directory''}}
*{{File|directory|''world save directory''}}
**{{File|directory|entities}}: Contains entity files for the [[Minecraft:Overworld]]. These used to be part of region.  
**{{File|directory|dimensions}}
***{{File|file|r.<x>.<z>.mca}}
***{{File|directory|minecraft}}
**{{File|directory|DIM-1}}: Contains region files of the [[Minecraft:Nether]].
****{{File|directory|overworld}}
***{{File|directory|entities}}
*****{{File|directory|entities}}: Contains entity files for the [[Minecraft:Overworld]]. These used to be part of region.  
****{{File|file|r.<x>.<z>.mca}}
******{{File|file|r.<x>.<z>.mca}}
**{{File|directory|DIM1}}: Contains region files of [[Minecraft:the End]].
****{{File|directory|the_nether}}
***{{File|directory|entities}}
*****{{File|directory|entities}}
****{{File|file|r.<x>.<z>.mca}}
******{{File|file|r.<x>.<z>.mca}}: Contains entity files for the [[Minecraft:Nether]].
****{{File|directory|the_end}}
*****{{File|directory|entities}}: Contains entity files for the [[Minecraft:End]].
******{{File|file|r.<x>.<z>.mca}}
</div>
</div>


Line 22: Line 25:
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 54: Line 56:
       |collapse=1
       |collapse=1
       |{{EntityLink|Armor Stand}}
       |{{EntityLink|Armor Stand}}
       |{{EntityLink|Mannequin}}
       |Avatar {{Blist
      |[[Minecraft:Mob]]{{#lst:Entity format|mob-class}}
        |{{EntityLink|Player}} {{blist
      |{{EntityLink|Player}} {{blist
          |Server Player
        |Server Player
          |Abstract Client Player {{blist
        |Abstract Client Player {{blist
            |Local Player
          |Local Player
            |Remote Player
          |Remote Player
          }}
         }}
         }}
        |{{EntityLink|Mannequin}} {{blist
          |Client Mannequin
        }}
       }}
       }}
    }}
      |[[Minecraft:Mob]]{{#lst:Entity format|mob-class}}
    }}
     |{{Collapse
     |{{Collapse
         |title=[[Minecraft:Projectile]]
         |title=[[Minecraft:Projectile]]
Line 93: Line 99:
<section begin="mob-class"/>{{blist
<section begin="mob-class"/>{{blist
   |{{EntityLink|Ender Dragon}}
   |{{EntityLink|Ender Dragon}}
  |{{EntityLink|Ghast}}
  |{{EntityLink|Phantom}}
   |Ambient Creature {{blist
   |Ambient Creature {{blist
     |{{EntityLink|Bat}}
     |{{EntityLink|Bat}}
  }}
  |Flying Mob {{blist
    |{{EntityLink|Ghast}}
    |{{EntityLink|Phantom}}
   }}
   }}
   |Pathfinder Mob {{blist
   |Pathfinder Mob {{blist
Line 109: Line 113:
     }}
     }}
     |Ageable Mob {{blist
     |Ageable Mob {{blist
      |AbstractCubeMob {{blist
        |{{EntityLink|Magma Cube}}
        |{{EntityLink|Slime}}
        |{{EntityLink|Sulfur Cube}} 
      }}
       |Abstract Villager {{blist
       |Abstract Villager {{blist
         |{{EntityLink|Villager}}
         |{{EntityLink|Villager}}
Line 164: Line 173:
         }}
         }}
       }}
       }}
    }}
  }}
    |{{blist
  |{{blist
       |title=[[Minecraft:Monster]]
       |title=[[Minecraft:Monster]]
       |collapse=1
       |collapse=1
Line 218: Line 227:
       }}
       }}
     }}
     }}
    |Water Animal {{blist
 
  |Water Animal {{blist
       |{{EntityLink|Dolphin}}
       |{{EntityLink|Dolphin}}
       |Abstract Fish {{blist
       |Abstract Fish {{blist
Line 233: Line 243:
       }}
       }}
     }}
     }}
  }}
  }}  
  |{{EntityLink|Slime}} {{blist
    |{{EntityLink|Magma Cube}}
  }}
}}<section end="mob-class"/>
}}<section end="mob-class"/>


Line 282: Line 289:
  |content={{blist
  |content={{blist
   |{{EntityLink|Axolotl}}
   |{{EntityLink|Axolotl}}
  |{{EntityLink|Sulfur Cube}}
   |Abstract Fish {{blist
   |Abstract Fish {{blist
     |{{EntityLink|Pufferfish}}
     |{{EntityLink|Pufferfish}}
Line 801: Line 809:
|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.}}
|{{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.}}
|{{HistoryLine|java upcoming}}
|{{HistoryLine||26.3|dev=snap6|Added {{cd|invulnerable_time}} tag which makes a mob temporarily invulnerable for a specific number of ticks.}}
}}
}}



Latest revision as of 11:14, 12 August 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:See also

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

Template:Blist

<section begin="mob-class"/>Template:Blist<section end="mob-class"/>

<section begin="inheritance-projectile"/>Template:Blist<section end="inheritance-projectile"/>

Interfaces

Template:Blist

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.

Entity format

All entities are with the following structure:

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

Template:HistoryTable

References

Template:ReflistTemplate:Notelist

Navigation

Template:Navbox Java Edition technical

Minecraft:de:Objektdaten Minecraft:fr:Format d'entité Minecraft:ja:エンティティフォーマット Minecraft:ko:개체 형식 Minecraft:pt:Formato de entidade Minecraft:zh:实体数据格式