Magical gene / no coat effect

Magic swim speed

How fast the horse moves in water, and nothing else. It is unrelated to magic speed — not related-but-separate, unrelated — so a horse can be the slowest thing in the paddock and still cross a river faster than a boat.

Crossing two of them

What it does

A horse with the otterlike allele swims faster than it has any business doing. A horse with the stonelike allele crosses water at a crawl. Neither is any different on dry land, which is the entire point of the locus: the thing you bred for is invisible until the horse is in a river.

Both copies count, and they add. One otterlike copy is worth about a quarter more; two are worth about half again, and rather more when both copies happened to roll well. One of each very nearly cancels — the horse swims at about the usual pace while carrying, and passing on, both extremes.

What you can catch

About a quarter of wild horses carry one copy, split evenly between the two alleles. No wild horse carries two of anything, so every genuinely remarkable swimmer in a world is one somebody bred.

Health

None. This locus has no bearing on how long the horse survives underwater — that is magic water breathing, and the two are independent. A horse that crosses a lake quickly and one that can stay at the bottom of it are two different breeding projects.

Its gene carrot

Gene key
horsegenetics.magic_swim_speed
Alleles
Otr otterlike, Stne stonelike, n
Priority
144 — the magical body-stat band
Reaches the game as
an attribute effect on water_movement_efficiency
Coat effect
none, ever
Newly built, not yet play-tested

Nothing on this page has been seen in game. The translator was written against the 26.1.2 sources and is flagged as unverified in its own comments. Checklist on To be verified.

Not a body stat, and deliberately so

The four magical body-stat genes push their sum into TraitBuilder, and end up as one of the four numbers on Traits. This gene does not, and neither does water breathing.

Traits is a pure function of the genotype — four numbers and a list of conditions, re-derived wherever they are needed, stored nowhere, and meant to survive a version port unchanged. Swimming speed is not among those four and should not become the fifth: it means nothing without a running game, which is precisely the line GeneAbility exists on. Adding a field to Traits for every magical knob would drag Minecraft-shaped concepts into the one record that is supposed to be portable.

So the genetics are shared and the sink is not. AbstractMagicFactorGene is AbstractMagicStatGene with the last step replaced: the same three alleles, the same per-copy percentage on its own epigenetic seed, the same signed sum — and then a GeneAbility rather than a number.

common/genetics/genes/MagicSwimSpeedGene.java
@Override
protected List<GeneAbility> abilitiesFor(double factor) {
    return List.of(new GeneAbility.AttributeMod(ATTRIBUTE, "multiply_total", factor - 1.0,
            GeneAbility.Condition.ALWAYS, 1));
}

There is no swim_speed attribute

However much the name suggests itself, vanilla has no such attribute. What it has is water_movement_efficiency — the share of its land speed a mob keeps in water, which is Depth Strider’s attribute and is exactly what “how fast does this horse swim” means.

The effect format used to offer swim_speed in its attribute list. It was never translated to anything, because there was nothing to translate it to; the list now names the attributes that exist, and the translator’s table is the same set. That table is closed on purpose, so a gene naming something this build has never heard of gets one log line rather than a silent no-op.

Taking the modifier off again

The modifier is transient and its id is derived from the gene and the attribute, so re-applying it every tick is idempotent. The removal half is the interesting one: when an ability’s condition goes false it is skipped before it reaches the apply path, so nothing would ever take the modifier off. GeneAbilityHandler.clearAttributes therefore runs unconditionally after the ability loop and strips every modifier in the mod’s namespace that the horse is not currently asking for.

Why land speed and swimming are two loci

Because they compose differently, and folding them together would have made one of the two wrong.

Land speed has three natural loci under itMSTN, PDK4 and CKM — and the magical version multiplies whatever they settled on, so a magically fast pony stays slower than a magically fast draught horse. That is the right behaviour and it depends entirely on there being something underneath to scale.

Swimming has nothing underneath it. No natural locus in the mod makes one horse a better swimmer than another, so this gene is not scaling anything; it is the whole of the fact. Its percentages are correspondingly larger (mean 25% rather than 10%) because a quarter of nothing-in-particular is a smaller claim than a quarter of a bred racehorse.

What it does to breeding

It adds an axis that nothing else in the mod is correlated with. A breeder who wants a horse that is fast on land and in water has to select for two independent loci at once, and neither one is visible — which is the same shape as the body-stat genes and, like them, is meant to make a finished animal an achievement rather than a catch.

Source: common/genetics/genes/MagicSwimSpeedGene.java, common/genetics/genes/AbstractMagicFactorGene.java