Entity format/Mob
Minecraft Wiki article. Categories: Information_needed, Top-level_data_pages
📌 Mirrored from Minecraft Wiki
This article is reproduced from Entity format/Mob on the Minecraft Wiki. Mirrored from revision 3684089. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
- [Float] AbsorptionAmount: The amount of extra health added by the Absorption effect.
- [NBT List / JSON Array] active_effects: The list of status effects on this mob. May not exist.
- [NBT Compound / JSON Object] Each item is a status effect
- [Boolean] ambient:
1or0(true/false) - iftrue, this effect is provided by a Beacon and therefore should be less intrusive on screen. - [Byte] amplifier: The status effect level.
0is level 1. - [Int] duration: The number of game ticks before the effect wears off.
-1means infinite duration. - [NBT Compound / JSON Object] hidden_effect: Lower amplifier effect of the same type, this replaces the above effect when it expires. (The duration of the effect still decreases in here too)
- [String] id: The effect name.
- [Boolean] show_icon:
1or0(true/false) - iftrue, effect icon is shown; iffalse, no icon is shown. - [Boolean] show_particles:
1or0(true/false) - iftrue, particles are shown (affected byambient); iffalse, no particles are shown.
- [Boolean] ambient:
- [NBT Compound / JSON Object] Each item is a status effect
- [NBT List / JSON Array] attributes: A list of Attributes for this mob. These are used for many purposes in internal calculations, and can be considered a mob's "statistics". Valid attributes for a given mob are listed in the main article.
- [NBT Compound / JSON Object] An individual attribute.
- [String] id: The name of this attribute.
- [Double] base: The base value of this attribute.
- [NBT List / JSON Array] modifiers: A list of Modifiers acting on this attribute. Modifiers alter the base value in internal calculations, without changing the original copy. Note that a modifier never modifies base to be higher than its maximum or lower than its minimum for a given attribute.
- [NBT Compound / JSON Object] An individual modifier.
- [Double] amount: The amount by which this modifier modifies the base value in calculations.
- [String] id: A Resource location unique to this modifier. Used to identify the modifier so that the correct modifier can be added or removed.
- [String] operation:
add_value,add_multiplied_base,add_multiplied_total. Defines the operation this modifier executes on the attribute's base value.add_value: IncrementXAmount.add_multiplied_base:YX * Amount.add_multiplied_total: SetY = Y * (1 + Amount)(equivalent to IncrementYY * Amount).
- The specified modifiers are applied to the attribute, probably whenever the attribute is modified.[more information needed] To compute the effective value of the attribute, the game:
- Sets
X = Base. - Executes all add_value modifiers.
- Sets
Y = X. - Executes all add_multiplied_base modifiers.
- Executes all add_multiplied_total modifiers.
- The value Y is the final effective value of the attribute.[more information needed]
- Sets
- [NBT Compound / JSON Object] An individual modifier.
- [NBT Compound / JSON Object] An individual attribute.
- [NBT Compound / JSON Object] Brain: Everything this mob has to keep in mind.
- [NBT Compound / JSON Object] memories: Used for complex behaviors.[more information needed] The only mobs that have this tag are described below.
Allay memories: see Template:Nbt inherit/allay_memories/template
Axolotl memories: see Template:Nbt inherit/axolotl_memories/template
Camel memories: see Template:Nbt inherit/camel_memories/template
Copper Golem memories: see Template:Nbt inherit/copper_golem_memories/template
Frog memories: see Template:Nbt inherit/frog_memories/template
Goat memories: see Template:Nbt inherit/goat_memories/template
Piglin memories: see Template:Nbt inherit/piglin_memories/template
Piglin Brute memories: see Template:Nbt inherit/piglin_brute_memories/template
Sniffer memories: see Template:Nbt inherit/sniffer_memories/template
Villager memories: see Template:Nbt inherit/villager_memories/template
Warden memories: see Template:Nbt inherit/warden_memories/template
- [NBT Compound / JSON Object] memories: Used for complex behaviors.[more information needed] The only mobs that have this tag are described below.
- [Boolean] CanPickUpLoot:
1or0(true/false) - iftrue, the mob can pick up loot (wear armor it picks up, use weapons it picks up). - [NBT List / JSON Array] current_explosion_impact_pos: Exists only if the mob is airborne after being hit by a wind charge explosion. Represents the explosion's position. Used for wind charge fall damage reduction.
- [Int] current_impulse_context_reset_grace_time: [more information needed]
- Tags common to all mobs with drops from loot tables see Template:Nbt inherit/death_lootable/template
- [Short] DeathTime: Number of ticks the mob has been dead for. Controls death animations. 0 when alive.
- [NBT Compound / JSON Object] drop_chances: A map between equipment slot type and chance value. Each entry specifies the chance that the item in that slot is dropped when the mob dies. If not specified or removed, chance is assumed as default (0.085f). A chance value between 0.0f and 1.0f applies a random damage value if dropped and it's only drops if the mob is killed by a player or a tamed wolf. For values higher than 1.0f, the item damage is preserved and it's always dropped. Equipment picked up by mobs is set to 2.0f. Each entry is also used to calculate the chance the item in dropped when swap for a more preferred one[1], but not directly. If the value is 0.0f or less, the drop chance is 0%, if the value is greater than 0.0f, the drop chance is the value +10% and the item damage is preserved.
- [Float] head : Chance value for the head item to drop.
- [Float] chest : Chance value for the chest item to drop.
- [Float] legs : Chance value for the legs item to drop.
- [Float] feet : Chance value for the feet item to drop.
- [Float] mainhand : Chance value for the mainhand item to drop.
- [Float] offhand : Chance value for the offhand item to drop.
- [Float] body : Chance value for the body item to drop.
- [Float] saddle : Chance value for the saddle item to drop.
- [NBT Compound / JSON Object] equipment: Map between equipment slot type and item stack. Does not exist if the inventory is empty.
- [NBT Compound / JSON Object] head: The item being held in mob's head slot.
- [NBT Compound / JSON Object] chest: The item being held in the mob's chest slot.
- [NBT Compound / JSON Object] legs: The item being held in the mob's legs slot.
- [NBT Compound / JSON Object] feet: The item being held in the mob's feet slot.
- [NBT Compound / JSON Object] mainhand: The item being held in the mob's main hand.
- [NBT Compound / JSON Object] offhand: The item being held in the mob's off hand.
- [NBT Compound / JSON Object] body: The item being held in the mob's body slot.
- [NBT Compound / JSON Object] saddle: The item being held in the mob's saddle slot.
- A single item stack see Template:Nbt inherit/itemnoslot/template
- [Byte] FallFlying: Setting to 1 for non-player entities causes the entity to glide as long as they are wearing elytra in the chest slot. Can be used to detect when the player is gliding without using scoreboard statistics.
- [Float] Health: The mob's health.
- [Int Array] home_pos: The mob's "home" position. Mobs will limit their pathfinding to stay within the indicated area. Some mobs, like bats, slimes, magma cubes, phantoms and ender dragons may ignore it. Interacting with leashes or riding may change the home position of the mob. For creakings, this is the position of their creaking heart.
- [Int] home_radius: Max radius of the data
home_pos. - [Short] HurtTime: Number of ticks the mob turns red for after being hit. 0 when not recently hit.
- [Int Array] last_hurt_by_mob: The UUID of the last mob that attacked this mob. Clears when the attacking mob dies or despawns.
- [Int] ticks_since_last_hurt_by_mob: (when [Int Array] last_hurt_by_mob exists and is valid) The number of game ticks since the last time the mob was attacked by the mob described by [Int Array] last_hurt_by_mob. Clears [Int Array] last_hurt_by_mob when the value reaches 100 game ticks (5 seconds).
- [Int Array] last_hurt_by_player: The UUID of the last player that attacked this mob.
- [Int] last_hurt_by_player_memory_time: (when [Int Array] last_hurt_by_player exists and is valid) Gets set to 100 game ticks (5 seconds) when attacked by a player, and decreases by 1 for every game tick. Clears [Int Array] last_hurt_by_player when the value reaches 0.
- [NBT Compound / JSON Object][Int Array] leash: Information about where this leash connects to. Does not exist if the entity is not leashed.
- The int array form ([Int Array]) represents the block location of the fence post that the leash is attached to (3 integers representing the X, Y, and Z coordinates respectively), or a compound containing information about the entity the leash is attached to.
- The compound form ([NBT Compound / JSON Object]) contains the UUID of the entity that the leash is attached to.
- [Int Array] UUID: This Universally Unique IDentifier of the entity that the leash is attached to.
- [Boolean] LeftHanded:
1or0(true/false) - iftrue, the mob renders the main hand as being left. - [NBT Compound / JSON Object] locator_bar_icon: The waypoint's icon visual data in the locator bar.
- [Int] color: The waypoint's color stored as 32-bit signed integer using two's complement, assuming the color is fully opaque.
- [String] style: The waypoint's style name from
waypoint_styledirectory in a resource pack.
- [Boolean] NoAI:
1or0(true/false) - Setting totruedisables the mob's AI. The mob does not and cannot move, to the extent of not falling when normally able. - [Boolean] PersistenceRequired:
1or0(true/false) - iftrue, the mob must not despawn naturally. - [Int Array] sleeping_pos: The coordinate of where the entity is sleeping, absent if not sleeping.
- [String] Team: This tag is actually not part of the NBT data of a mob, but instead used when spawning it, so it cannot be tested for. It makes the mob instantly join the team with that name.
- ↑ MC-279832 – resolved as "Works As Intended".
Sources
- Entity format/Mob — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3684089.