Mob variant definitions

This feature is exclusive to Java Edition.
 

Mob variants are variants of mobs. They define the assets and models used and define the conditions in which this variant spawns.

Definition

Mob variants can be defined in data packs, as part of the directory structure below.

  • File archive.png: Sprite image for archive in Minecraft data pack name.zip or File directory.png: Sprite image for directory in Minecraft data pack name
    • File file.png: Sprite image for file in Minecraft pack.mcmeta
    • File directory.png: Sprite image for directory in Minecraft data
      • File directory.png: Sprite image for directory in Minecraft namespace
        • File directory.png: Sprite image for directory in Minecraft cat_variant
          • File file.png: Sprite image for file in Minecraft <name>.json
        • File directory.png: Sprite image for directory in Minecraft chicken_variant
          • File file.png: Sprite image for file in Minecraft <name>.json
        • File directory.png: Sprite image for directory in Minecraft cow_variant
          • File file.png: Sprite image for file in Minecraft <name>.json
        • File directory.png: Sprite image for directory in Minecraft frog_variant
          • File file.png: Sprite image for file in Minecraft <name>.json
        • File directory.png: Sprite image for directory in Minecraft pig_variant
          • File file.png: Sprite image for file in Minecraft <name>.json
        • File directory.png: Sprite image for directory in Minecraft wolf_variant
          • File file.png: Sprite image for file in Minecraft <name>.json
        • File directory.png: Sprite image for directory in Minecraft wolf_sound_variant
          • File file.png: Sprite image for file in Minecraft <name>.json
        • File directory.png: Sprite image for directory in Minecraft zombie_nautilus_variant
          • File file.png: Sprite image for file in Minecraft <name>.json
        • More directories…

JSON Format

Cat

Cat variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.

Chicken

Chicken variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [String] asset_id: The resource location of the texture to use.
    • [String] baby_asset_id[upcoming JE 26.1]: The resource location of the baby texture to use.
    • [String] model: The chicken model to use. Has to be normal or cold.
    • [NBT List / JSON Array] spawn_conditions: The spawn conditions of this variant, see § Spawn condition

Cow

Cow variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [String] asset_id: The resource location of the texture to use.
    • [String] baby_asset_id[upcoming JE 26.1]: The resource location of the baby texture to use.
    • [String] model: The cow model to use. Has to be normal, cold or warm
    • [NBT List / JSON Array] spawn_conditions: The spawn conditions of this variant, see § Spawn condition

Frog

Frog variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.

Pig

Pig variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [String] asset_id: The resource location of the texture to use.
    • [String] baby_asset_id[upcoming JE 26.1]: The resource location of the baby texture to use.
    • [String] model: The pig model to use, has to be normal or cold. Defaults to normal
    • [NBT List / JSON Array] spawn_conditions: The spawn conditions of this variant, see § Spawn condition

Wolf

Wolf variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [NBT Compound / JSON Object] assets: The assets to use for this variant:
    • [NBT Compound / JSON Object] baby_assets[upcoming JE 26.1]: The assets to use for the baby of this variant:
    • [NBT List / JSON Array] spawn_conditions: The spawn conditions of this variant, see § Spawn condition

Wolf sounds

Wolf sound variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [String][NBT Compound / JSON Object] ambient_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
      • A sound event see Template:Nbt inherit/sound event/template
    • [String][NBT Compound / JSON Object] death_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
      • A sound event see Template:Nbt inherit/sound event/template
    • [String][NBT Compound / JSON Object] growl_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
      • A sound event see Template:Nbt inherit/sound event/template
    • [String][NBT Compound / JSON Object] hurt_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
      • A sound event see Template:Nbt inherit/sound event/template
    • [String][NBT Compound / JSON Object] pant_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
      • A sound event see Template:Nbt inherit/sound event/template
    • [String][NBT Compound / JSON Object] whine_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
      • A sound event see Template:Nbt inherit/sound event/template

‌In Java Edition 26.1[upcoming] wolf sound variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [NBT Compound / JSON Object] adult_sounds: Sounds to use for adult wolfs
      • [String][NBT Compound / JSON Object] ambient_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
        • A sound event see Template:Nbt inherit/sound event/template
      • [String][NBT Compound / JSON Object] death_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
        • A sound event see Template:Nbt inherit/sound event/template
      • [String][NBT Compound / JSON Object] growl_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
        • A sound event see Template:Nbt inherit/sound event/template
      • [String][NBT Compound / JSON Object] hurt_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
        • A sound event see Template:Nbt inherit/sound event/template
      • [String][NBT Compound / JSON Object] pant_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
        • A sound event see Template:Nbt inherit/sound event/template
      • [String][NBT Compound / JSON Object] whine_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
        • A sound event see Template:Nbt inherit/sound event/template
    • [NBT Compound / JSON Object] baby_sounds: Sounds to use for adult wolfs
      • Same fields as [NBT Compound / JSON Object] adult_sounds

Zombie Nautilus

Zombie nautilus variants are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [String] asset_id: The resource location of the texture to use.
    • [String] model: The nautilus model to use, has to be normal or warm. Defaults to normal
    • [NBT List / JSON Array] spawn_conditions: The spawn conditions of this variant, see § Spawn condition

Spawn condition

Spawn conditions are used to determine which variant to spawn. Each variant contains a list of conditions with attached priorities. The selection of a variant happens in 3 steps:

  1. Each condition is evaluated. The matching condition with the highest priority determines the priority of the variant. If no condition matches the variant is discarded.
  2. Of all remaining variants, all except those with the highest priority are discarded.
  3. Of the remaining variants, a random variant is chosen.

Spawn conditions are specified using the following format:

  • [NBT List / JSON Array] spawn_conditions: List of spawn conditions with priority
    • [NBT Compound / JSON Object]: A single spawn condition
      • [Int] priority: The priority of the variant if this spawn condition matches
      • [NBT Compound / JSON Object] condition: Condition to match. Always matches if omitted
        • [String] type: The type of the condition, see below for valid options
        • Additional fields based on [String] type, see below

biome

Tests if the spawn position is inside one of the specified biomes.

  • [NBT Compound / JSON Object] condition
    • [String] type: biome
    • [String][NBT List / JSON Array] biomes: Any number of biome(s) (an [String] ID, or a [String] tag with #, or an [NBT List / JSON Array] array containing [String] IDs) — The biomes to match

structure

Tests if the spawn position is inside at least one of the specified structures.

  • [NBT Compound / JSON Object] condition
    • [String] type: structure
    • [String][NBT List / JSON Array] structures: Any number of structure(s) (an [String] ID, or a [String] tag with #, or an [NBT List / JSON Array] array containing [String] IDs) — The structures to match

moon_brightness

Matches the moon brightness at the time of the spawn.

  • [NBT Compound / JSON Object] condition
    • [String] type: moon_brightness
    • [Double][NBT Compound / JSON Object] range: The moon brightness values to match — If specified as [Double]: matches a single moon brightness value
      • [Double] min: The minimum moon brightness to match
      • [Double] max: The maximum moon brightness to match

History

Java Edition
1.20.524w10aAdded wolf variants; including definitions in data packs.
1.21.525w03aAdded pig variants; including definitions in data packs.
25w04aCat and Frog variants can now be defined in data packs.
Added unified [NBT Compound / JSON Object] spawn_conditions field, replacing [String][NBT List / JSON Array] biomes field in wolf and pig variants.
Moved wolf variant [String] angry_texture‌, [String] wild_texture‌, and [String] tame_texture‌ field into [NBT Compound / JSON Object] assets and removed _texture suffix.
Renamed pig variant [String] texture field to [String] asset_id.
25w05aAdded cow variants; including definitions in data packs.
25w06aAdded chicken variants; including definitions in data packs.
1.21.1125w45aAdded zombie nautilus variants; including definitions in data packs.
Upcoming Java Edition
26.1snap2Wolf sound variants sound events in wolf_sound_variant has been moved into a new field adult_sounds and the field baby_sounds was added.
The textures for baby mobs can now be defined for cow, pig, chicken, wolf, and cat variants.

Navigation