Cow Variants
This content applies only to Java Edition.
Cow variant definition files define cow variants and their spawn rules.
Definition format
Cow variants use the COW_VARIANT registry; the datapack path is cow_variant (definitions in data/<namespace>/cow_variant).
Definition files use JSON with the following structure:
- JSON file root object
asset_id(string, required): (namespace ID) cow texture; resolved toassets/<namespace>/textures/<path>.png.baby_asset_id(string, required): (namespace ID) baby cow texture.model(string, defaultnormal):normal,cold, orwarm(temperate/cold/tropical cows).spawn_conditions(list, required): variant spawn selectors.- One selector (compound):
condition(compound):type(string, required):biome(biomesstring/list: tag#, ID, or list),moon_brightness(rangemin-max bounds; full moon 1, new moon 0), orstructure(structuresstring/list: tag#, ID, or list).priority(int, required): selection priority; ties resolved randomly.
- One selector (compound):
Definition behavior
Cow variant data is loaded only once at server startup; /reload does not reload it — a server restart is required. The COW_VARIANT registry must have at least one element, or the game errors during sync and blocks world loading.
When spawning a cow, the game evaluates all variant selectors and spawns the variant of a highest-priority valid selector (random among ties).