Mob Variants
Type: Data | Location: data/<namespace>/unified/mob_variants
A powerful mob variant system that lets you create variants of almost any vanilla or modded mob. For example, creating a new fox or zombie variant.
There are a couple minor limitations compared to vanilla mob-specific variants
- no custom models, only textures
- custom sounds work on most mobs, but some modded ones require manual in-code support
- no support for custom particles
However, there are a ton of additional features that vanilla mob variants do not possess. Many of the features documented here are also present in the entity registry
{
// format code goes here
}Format
"target": <entity identifier>The target entity the variant should be created from.
"texture_replacements": [
{
"type": <string>, // optional, accepts "replace_adult_texture", "replace_baby_texture" or "replace_texture". Defaults to "replace_texture"
"original": <texture identifier>, // used only by "replace_texture"
"replacement": <texture identifier>
}
] // optionalThe texture replacements to be used by the mob variant.
You can specify a target texture, and the texture the variant replaces it with. Supports both base entity textures and most outer layers. The adult & baby-specific replacements are for convenience, so that you don't have to look up vanilla texture identifiers for most mob variants you create.
"sounds": { // optional
"ambient_sound": <sound identifier>, // optional
"hurt_sound": <sound identifier>, // optional
"eat_sound": <sound identifier>, // optional
"death_sound": <sound identifier>, // optional
"step_sound": <sound identifier> // optional
}Used to change mob sounds.
"spawn_conditions": [<spawn conditions>] // optional, https://minecraft.wiki/w/Mob_variant_definitions#Spawn_conditionUnder which conditions the mob variant should spawn instead of the original mob. Uses the vanilla mob variant spawn conditions
"spawn_chance": <float> // optional, defaults to 1.0, must not be negativeThe chance of the mob variant replacing the base mob if spawn conditions are met. 1.0 = 100%. Set a lower decimal value if you want to have rare mob variants that only sometimes replace their base mob.
"attributes": [ // optional
{
"attribute": <attribute identifier>,
"id": <attribute modifier identifier>,
"amount": <double>,
"operation": <string> // https://minecraft.wiki/w/Attribute#Operations
}
]Attributes to add to the entity. You specify a target attribute and then an attribute modifier.
The identifier of an attribute modifier can be any base vanilla one documented on the wiki, any modded one, or any unique one you make up yourself.
"attack_effects": [ // optional
{
"id": <effect identifier>, // https://minecraft.wiki/w/Effect#List_of_effects
"amplifier": <int>, // optional, defaults to 0
"duration": <int>, // optional, defaults to 0
"ambient": <boolean>, // optional, defaults to false
"show_particles": <boolean>, // optional, defaults to true
"show_icon": <boolean>, // optional, defaults to true
"hidden_effect": <boolean> // optional
}
]A list of effects that the mob should apply to entities it damages.
"burn_in_daylight": <boolean> // optionalOverrides whether the mob should burn in sunlight.
"loot_table": <loot table identifier> // optionalOverrides the loot table used by the variant.