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

Minecraft:Mob variant definitions: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Sync: new page from Minecraft
 
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
Line 2: Line 2:


'''Mob variants''' are variants of [[Minecraft:mob]]s. They define the assets and models used and define the conditions in which this variant spawns.
'''Mob variants''' are variants of [[Minecraft:mob]]s. They define the assets and models used and define the conditions in which this variant spawns.
'''Mob sound variants''' are sound variants distinct from regular variants. They define sounds used by this sound variant.


== Definition ==
== Definition ==
Mob variants can be defined in [[Minecraft:data pack]]s, as part of the directory structure below.
Mob variants can be defined in [[Minecraft:data pack]]s, as part of the directory structure below.


Line 13: Line 14:
***{{File|directory|''namespace''}}
***{{File|directory|''namespace''}}
****{{File|directory|'''cat_variant'''}}
****{{File|directory|'''cat_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''cat_sound_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''chicken_variant'''}}
****{{File|directory|'''chicken_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''chicken_sound_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''cow_variant'''}}
****{{File|directory|'''cow_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''cow_sound_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''frog_variant'''}}
****{{File|directory|'''frog_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''pig_variant'''}}
****{{File|directory|'''pig_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''pig_sound_variant'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
*****{{File|file|'''{{ph|name}}.json'''}}
****{{File|directory|'''wolf_variant'''}}
****{{File|directory|'''wolf_variant'''}}
Line 40: Line 49:
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
</div>
</div>
=== Cat sounds ===
'''[[Minecraft:Cat]] sound variants''' are defined using the following format:
<div class="treeview">
* {{nbt|compound}} The root object.
** {{nbt|compound|adult_sounds}}: Sounds to use for adult cats.
*** {{nbt|string}}{{nbt|compound|ambient_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|beg_for_food_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|death_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|eat_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|hiss_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|hurt_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|purr_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|purreow_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|stray_ambient_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
** {{nbt|compound|baby_sounds}}: Sounds to use for baby cats.
*** Same fields as {{nbt|compound|adult_sounds}}
</div>
=== Chicken ===
=== Chicken ===
'''[[Minecraft:Chicken]] variants''' are defined using the following format:
'''[[Minecraft:Chicken]] variants''' are defined using the following format:
Line 49: Line 86:
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
</div>
</div>
=== Chicken sounds ===
'''[[Minecraft:Chicken]] sound variants''' are defined using the following format:
<div class="treeview">
* {{nbt|compound}} The root object.
** {{nbt|compound|adult_sounds}}: Sounds to use for adult chickens.
*** {{nbt|string}}{{nbt|compound|ambient_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|death_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|hurt_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|step_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
** {{nbt|compound|baby_sounds}}: Sounds to use for baby chickens.
*** Same fields as {{nbt|compound|adult_sounds}}
</div>
=== Cow ===
=== Cow ===
'''[[Minecraft:Cow]] variants''' are defined using the following format:
'''[[Minecraft:Cow]] variants''' are defined using the following format:
Line 58: Line 113:
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
</div>
</div>
=== Cow sounds ===
'''[[Minecraft:Cow]] sound variants''' are defined using the following format:
<div class="treeview">
* {{nbt|compound}} The root object.
** {{nbt|string}}{{nbt|compound|ambient_sound}}: {{json_ref|server-side sound event|inline=1}}
*** {{nbt inherit/sound event}}
** {{nbt|string}}{{nbt|compound|death_sound}}: {{json_ref|server-side sound event|inline=1}}
*** {{nbt inherit/sound event}}
** {{nbt|string}}{{nbt|compound|hurt_sound}}: {{json_ref|server-side sound event|inline=1}}
*** {{nbt inherit/sound event}}
** {{nbt|string}}{{nbt|compound|step_sound}}: {{json_ref|server-side sound event|inline=1}}
*** {{nbt inherit/sound event}}
</div>
=== Frog ===
=== Frog ===
'''[[Minecraft:Frog]] variants''' are defined using the following format:
'''[[Minecraft:Frog]] variants''' are defined using the following format:
Line 65: Line 135:
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
</div>
</div>
=== Pig ===
=== Pig ===
'''[[Minecraft:Pig]] variants''' are defined using the following format:
'''[[Minecraft:Pig]] variants''' are defined using the following format:
Line 74: Line 145:
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
</div>
</div>
=== Pig sounds ===
'''[[Minecraft:Pig]] sound variants''' are defined using the following format:
<div class="treeview">
* {{nbt|compound}} The root object.
** {{nbt|compound|adult_sounds}}: Sounds to use for adult pigs.
*** {{nbt|string}}{{nbt|compound|ambient_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|death_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|eat_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|hurt_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
*** {{nbt|string}}{{nbt|compound|step_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
** {{nbt|compound|baby_sounds}}: Sounds to use for baby pigs.
*** Same fields as {{nbt|compound|adult_sounds}}
</div>
=== Wolf ===
=== Wolf ===
'''[[Minecraft:Wolf]] variants''' are defined using the following format:
'''[[Minecraft:Wolf]] variants''' are defined using the following format:
Line 88: Line 179:
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
** {{nbt|list|spawn_conditions}}: The spawn conditions of this variant, see {{slink||Spawn condition}}
</div>
</div>
=== Wolf sounds ===
=== Wolf sounds ===
'''[[Minecraft:Wolf]] sound variants''' are defined using the following format:
'''[[Minecraft:Wolf]] sound variants''' are defined using the following format:
<div class="treeview">
<div class="treeview">
* {{nbt|compound}} The root object.
* {{nbt|compound}} The root object.
** {{nbt|compound|adult_sounds}}: Sounds to use for adult wolfs
** {{nbt|compound|adult_sounds}}: Sounds to use for adult wolves.
*** {{nbt|string}}{{nbt|compound|ambient_sound}}: {{json_ref|server-side sound event|inline=1}}
*** {{nbt|string}}{{nbt|compound|ambient_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
**** {{nbt inherit/sound event}}
Line 105: Line 197:
*** {{nbt|string}}{{nbt|compound|whine_sound}}: {{json_ref|server-side sound event|inline=1}}
*** {{nbt|string}}{{nbt|compound|whine_sound}}: {{json_ref|server-side sound event|inline=1}}
**** {{nbt inherit/sound event}}
**** {{nbt inherit/sound event}}
** {{nbt|compound|baby_sounds}}: Sounds to use for adult wolfs
** {{nbt|compound|baby_sounds}}: Sounds to use for baby wolves.
*** Same fields as {{nbt|compound|adult_sounds}}
*** Same fields as {{nbt|compound|adult_sounds}}
</div>
</div>
Line 167: Line 259:
|{{HistoryLine||1.21.5|dev=25w03a|Added pig variants; including definitions in data packs.}}
|{{HistoryLine||1.21.5|dev=25w03a|Added pig variants; including definitions in data packs.}}
|{{HistoryLine|||dev=25w04a
|{{HistoryLine|||dev=25w04a
|Cat and Frog variants can now be defined in data packs.
|Cat and frog variants can now be defined in data packs.
|Added unified {{nbt|compound|spawn_conditions}} field, replacing {{nbt|string}}{{nbt|list|biomes}} field in wolf and pig variants.
|Added unified {{nbt|compound|spawn_conditions}} field, replacing {{nbt|string}}{{nbt|list|biomes}} field in wolf and pig variants.
|Moved wolf variant {{nbt|string|angry_texture‌}}, {{nbt|string|wild_texture‌}}, and {{nbt|string|tame_texture‌}} field into {{nbt|compound|assets}} and removed {{cd|_texture}} suffix.
|Moved wolf variant {{nbt|string|angry_texture‌}}, {{nbt|string|wild_texture‌}}, and {{nbt|string|tame_texture‌}} field into {{nbt|compound|assets}} and removed {{cd|_texture}} suffix.
Line 174: Line 266:
|{{HistoryLine|||dev=25w05a|Added cow variants; including definitions in data packs.}}
|{{HistoryLine|||dev=25w05a|Added cow variants; including definitions in data packs.}}
|{{HistoryLine|||dev=25w06a|Added chicken variants; including definitions in data packs.}}
|{{HistoryLine|||dev=25w06a|Added chicken variants; including definitions in data packs.}}
|{{HistoryLine|||dev=25w08a|Added wolf sound variants; including definitions in data packs.}}
|{{HistoryLine||1.21.11|dev=25w45a|Added zombie nautilus variants; including definitions in data packs.}}
|{{HistoryLine||1.21.11|dev=25w45a|Added zombie nautilus variants; including definitions in data packs.}}
|{{HistoryLine||26.1|dev=snap2|Wolf sound variants sound events in {{cd|wolf_sound_variant}} has been moved into a new field {{cd|adult_sounds}} and the field {{cd|baby_sounds}} was added.
|{{HistoryLine||26.1|dev=snap2|Wolf sound variants sound events in {{cd|wolf_sound_variant}} has been moved into a new field {{cd|adult_sounds}} and the field {{cd|baby_sounds}} was added.
|The textures for baby mobs can now be defined for cow, pig, chicken, wolf, and cat variants.}}
|The textures for baby mobs can now be defined for cow, pig, chicken, wolf, and cat variants.}}
|{{HistoryLine|||dev=snap7|Added cat, pig, cow and chicken sounds variants; including definitions in data packs.}}
}}
}}



Latest revision as of 11:18, 22 July 2026

Template:Exclusive

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

Mob sound variants are sound variants distinct from regular variants. They define sounds used by this sound variant.

Definition

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

JSON Format

Cat

Minecraft:Cat variants are defined using the following format:

Cat sounds

Minecraft:Cat sound variants are defined using the following format:

Chicken

Minecraft:Chicken variants are defined using the following format:

Chicken sounds

Minecraft:Chicken sound variants are defined using the following format:

Cow

Minecraft:Cow variants are defined using the following format:

Cow sounds

Minecraft:Cow sound variants are defined using the following format:

Frog

Minecraft:Frog variants are defined using the following format:

Pig

Minecraft:Pig variants are defined using the following format:

Pig sounds

Minecraft:Pig sound variants are defined using the following format:

Wolf

Minecraft:Wolf variants are defined using the following format:

Wolf sounds

Minecraft:Wolf sound variants are defined using the following format:

Zombie Nautilus

Minecraft:Zombie nautilus variants are defined using the following format:

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:

biome

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

structure

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

moon_brightness

Matches the Minecraft:moon brightness at the time of the spawn.

History

Template:HistoryTable

Navigation

Template:Navbox Java Edition technical

Minecraft:de:Kreaturvariantendefinition Minecraft:fr:Définition de variante de créature Minecraft:ja:エンティティの亜種のカスタマイズ Minecraft:pt:Definição de variantes de criatura