Magical gene / no coat effect

Leader of the pack

Something follows this horse. Which something depends on the allele — there is one for every non-hostile mob in the game — and they trail it within sixteen blocks wherever it goes. Two copies of the same allele or nothing.

Built, and not yet seen in game

The gene, its inheritance and its founder table exist and are covered by the test suite; the translator that turns it into behaviour was written against the 26.1.2 sources and is flagged unverified in its own comments. Nothing on this page has been watched happening to a horse. What to look at, and what is most likely to be wrong, is on To be verified.

What it does

CombinationOutcome
two copies of one allelethat mob follows the horse within 16 blocks
two different allelesnothing — it settles on neither
anything with an nnothing

One allele per mob

The list is exactly lycan's: every vanilla mob in a non-hostile spawn category, minus the horse family. That is a mechanical rule rather than a taste, which is why it contains a pufferfish and a wandering trader without anyone having to defend either.

What you can catch

Carriers, and only carriers. No wild horse is ever homozygous here, so the first pack leader in a world is one somebody bred. Two carriers of different alleles produce nothing, which is most crosses.

Health

None — though a horse trailed by twelve chickens is a horse you can hear coming.

Gene key
horsegenetics.pack_leader
Alleles
one per non-hostile mob, plus n
Inheritance
homozygous recessive, and recessive to each other — a matched pair or nothing
Reaches the game as
a mob_aura effect in follow mode
Coat effect
none, ever
Continuous pathfinding for the followers is the real cost

Every follower recalculates a path on its own schedule, and pathfinding is the most expensive thing a mob does. A long interval and a low max_targets are not tuning, they are the design. Followers also drag chunks busy as they cross boundaries behind the horse.

Do not inject a goal into another mod’s mob

A goal added to an arbitrary mob has to be taken off again, and a horse that dies, despawns or stops expressing leaves it behind on every creature it ever met — the exact lifecycle failure mob aura already avoids by shoving rather than adding an avoidance goal. Nudge navigation per beat instead; it is stateless and it cannot leak.

The allele set is free

Lycan already derives this exact list from spawn categories, with mob ids as plain strings resolved against the live registry. Reuse the derivation rather than writing a second list that will drift from it.

The group filter must use entity type tags

Five genes share this filter. A hardcoded list makes every modded creature invisible to all five at once, and the failure is silent — the aura simply never fires on anything from another mod. Build it on tags in the change that introduces it.

A third mode, not a new verb

mob_aura already has repel and attract. Following is follow, on the same verb, with the same cap and the same beat. A summon verb was specified early in design and folded into this instead once it became clear that spawner was the only gene that genuinely needed one.

Why a matched pair

Same reasoning as lycan: a locus with dozens of alleles where any one showed would be a slot machine, and a locus where you must find the same allele twice is a search with a target.

One allele list, two genes

Lycan turns the horse into the mob; this makes the mob follow the horse. The same list serving two opposite ideas is a good sign the list was derived from the right rule — and it means adding a mob to the game adds an allele to both loci without anybody deciding to.

Planned source: common/genetics/genes/PackLeaderGene.java