How to edit an animal

In this guide we'll cover how to:

  • Add skins to an animal
  • Add hunt targets to an animal
  • Add herd targets to an animal
  • Add scared targets to an animal

Folder Structure

You could use a plain datapack + resource-pack, but for simplicity we'll use a JS-addon.

[addon_name]/
addon_data/
data/
data/
[addon_name]/
pack.mcmeta
resources/
assets/
[addon_name]/
pack.mcmeta

We'll not use the addon_data/ folder, but it needs to be there for the parser

Inside the data folder we'll start adding the necessary folders.

[addon_name]/
addon_data/
data/
data/
[addon_name]/
animal_modifiers/
[animal_you_want_to_edit].json
resources/

Fields

FieldTypeRequiredDescription
animalstringRequiredResource key of the animal to edit
add_genesstring[]OptionalList of skin gene resource keys to add to the animal
gendered_variantsstring[]OptionalList of skin genes that have gendered variants
herd_targetsstring[]OptionalList of animal resource keys to add as herd targets
hunt_targetsstring[]OptionalList of animal resource keys to add as hunt targets
scared_offstring[]OptionalList of entity resource keys to add as scared targets
{
"animal": [String],
"add_genes": [String[]],
"gendered_variants": [String[]],
"herd_targets": [String[]],
"hunt_targets": [String[]],
"scared_off": [String[]]
}

That's how you modify an animal, pretty simple right?

Let's now make sure the textures work.

Let's go back to the start

So the way this works is, you've edited an animal with an identifier, which is namespace:path.

We'll have to remember both, we'll also have to look ingame which version the animal is from, which is usually mentioned on the spawn egg under the item title if you hover over it.

[addon_name]/
addon_data/
data/
resources/
assets/
[namespace]/
textures/
geo/
animal/
[version]/
[path]/
variants/

That might seem a bit complex, but it's pretty easy if you look at it!

Let's now see what gene(s) we've added.

Depending on if we have added the same gene in gendered_variants, the texture file should be named appropriately:

(This also applies if you've made an existing gene gendered)

gendered_variants:

2 files:

  • Male -> [path]_adult_[gene_name]_male.png
  • Female -> [path]_adult_[gene_name]_female.png

Otherwise, just one file -> [path]_adult_[gene_name].png

...
[version]/
[path]/
variants/
[files]

That's actually all it takes!