The Entity and TileEntity classes
- class litemapy.Entity(str_or_nbt)
A Minecraft entity. Each entity is identified by a type identifier (e.g. minecraft:skeleton) and has a position within a region, as well as a rotation and a velocity vector. Most also have arbitrary data depending on their type (e.g. a sheep has a tag for its color and one indicating whether it has been sheared).
- Parameters:
str_or_nbt (str | Compound) – either the entity identifier as a string, in which case all other tag will be default, or an bnt compound tag with the entitie’s data.
- static fromnbt(nbt)
Read an entity from an nbt tag.
- class litemapy.TileEntity(nbt)
A tile entity, also often referred to as block entities, is a type of entity which complements a block state to store additional data (e.g. containers like chest both have a block state that stores properties like their id ( minecraft:chest ) and orientation, and tile entity that stores their content. For this reason, the
TileEntityclass does not store an ID but only a position. The ID can be inferred by looking up theBlockStateas the same position in theRegion.