Mob variants are variants of mobs. They define the assets and models used and define the conditions in which this variant spawns.
Mob variants can be defined in data packs, as part of the directory structure below.
Cat variants are defined using the following format:
- [NBT Compound / JSON Object] The root object.
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: 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 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: 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 variants are defined using the following format:
- [NBT Compound / JSON Object] The root object.
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: 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 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: 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 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)
- [String][NBT Compound / JSON Object] death_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
- [String][NBT Compound / JSON Object] growl_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
- [String][NBT Compound / JSON Object] hurt_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
- [String][NBT Compound / JSON Object] pant_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
- [String][NBT Compound / JSON Object] whine_sound: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition)
- [NBT Compound / JSON Object] baby_sounds: Sounds to use for adult wolfs
- Same fields as [NBT Compound / JSON Object] adult_sounds
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 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:
- 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.
- Of all remaining variants, all except those with the highest priority are discarded.
- 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
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
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
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
| Java Edition |
|---|
| 1.20.5 | 24w10a | Added wolf variants; including definitions in data packs. |
|---|
| 1.21.5 | 25w03a | Added pig variants; including definitions in data packs. |
|---|
| 25w04a | Cat 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.
|
| 25w05a | Added cow variants; including definitions in data packs. |
|---|
| 25w06a | Added chicken variants; including definitions in data packs. |
|---|
| 1.21.11 | 25w45a | Added zombie nautilus variants; including definitions in data packs. |
|---|
| 26.1 | snap2 | Wolf 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. |