Magical gene / no coat effect
Magic night temper
What the horse becomes after dark. Eight variants in two families: one hunts and the other runs, and each names who it feels that about — riders, passive animals, monsters, or everything. By day every one of them is an ordinary horse.
Crossing two of them
The eight
| Combination | After dark |
|---|---|
Agp/Agp | goes for riders |
Agc/Agc | goes for passive animals |
Agh/Agh | goes for monsters |
Aga/Aga | goes for everything |
Flp/Flp | flees riders |
Flc/Flc | flees passive animals |
Flh/Flh | flees monsters |
Fla/Fla | flees everything |
| anything else | an ordinary horse |
It takes a matched pair. A horse carrying two different variants shows neither, because “hunt everything” and “run from everything” cannot both be what an animal does.
Which ones are worth having
Agh is the only one most people would keep on purpose: a horse that goes
for the monsters is a horse worth leaving in a yard, though it will get itself killed
doing it unless it was bred for the fight and
the health as well. Flh is the
sensible one — it runs from monsters instead of standing to be hit, and it is the
variant that most reliably keeps the animal alive.
The rest are problems. Flp is the cruel one: perfectly catchable, tamable
and rideable by day, and after dark it will not let you near it.
Every feral horse carries one, and none of them shows it
The founder table is entirely heterozygous. The variants split the whole wild population between them and there is no wild-type row at all, so a horse you catch always carries exactly one of them and never expresses it. The plainest outcome the locus has — an ordinary horse, day and night — is the one that cannot be caught. It turns up a generation later, in a quarter of the foals of two carriers.
That is unlike every other locus in the mod and it is the owner’s design rather than a consequence of one. The other genes with invisible carriers put wild horses on the combinations that show, so that what you catch is what you watched it do. Here nothing is meant to be watchable: the point is that any horse in the world might be hiding one of these, and the only way to find out which is to breed it and wait for dark.
Health
No disorder, but three of these will get a horse killed — anything that picks
fights after dark, and Fla, which will not be where you left it. The
server’s health switch does not govern any of it: this is the rule of the gene
rather than a defect.
Its gene carrot
- Gene key
horsegenetics.magic_night_temper- Alleles
- eight variants in two families of four, plus
n - Priority
- 136 — the magical behaviour band
- Reaches the game as
- a
night_tempereffect - Coat effect
- none, ever
Nothing on this page has been seen in a game. The AI goals and the sound suppression were written against the 26.1.2 sources and are flagged as unverified in their own comments. Checklist on To be verified.
Night is in the verb, not in a condition
The effect format has a when clause and a night flag, so this
could have been eight alleles each carrying "when": {"flag": "night"}. It
is not, and the reason is that the gate would then be written fourteen times across two
genes and be wrong the first time somebody forgot it. The verb says it once: a
night_temper is night-only by definition, and the check is a single
isBrightOutside in the translator.
It talks over the watching locus
Magic night watch makes a horse follow and stare at a player. This gene supersedes it whenever it actually has something to act on — a horse that both stalks you and flees from you is not two behaviours, it is a bug.
The rule lives in the translator and could not live anywhere else: whether there is a
cow within sixteen blocks is a question only the running game can answer.
NightBehaviourHandler resolves the temper first and, if it found a target,
withholds the watch ability for the next scan — so the watch goal reports
canUse() == false and stands down cleanly instead of fighting it for the
navigation.
boolean temperActing = temper != null && applyTemper(temper, horse, level);
// THE SUPERSEDE RULE: the watch only runs when the temper found nothing.
if (temperActing || watch == null) {
WATCHING.remove(id);
} else {
WATCHING.put(id, watch);
}
Hunting is three lines, because the machinery was already there
Horses in this mod already have an ATTACK_DAMAGE attribute and a melee
goal — the fighter locus and
HorseAggroHandler put them there so a wild horse could kick back. So
“goes for it” is horse.setTarget(nearest) and nothing else.
Fleeing needed its own path, because there is no vanilla avoid-goal to borrow.
Why eight and not two
“Aggressive at night” and “skittish at night” would have been two alleles and a much duller locus. Naming the target is what makes it a breeding problem rather than a switch: a horse that hunts monsters and a horse that hunts you are the same gene, one allele apart, and they look identical in daylight.
It also gives the locus a real internal geography. The four aggressive variants nest — players, animals, monsters, all — so “all” is not a fifth thing but the union of the other three, and a breeder who wants a monster-hunter has to avoid throwing the one that includes them.
Why the change is total rather than gradual
Nothing here ramps at dusk. The horse is one animal and then it is another, and it stops at dawn with no memory of it. That is deliberate: a gradual version would read as a mood, and the thing this locus is for is the discovery that the animal you have been riding all week is not the animal in your yard at night.
common/genetics/genes/MagicNightTemperGene.java,
neoforge/server/NightBehaviourHandler.java