Magical gene / no coat effect

Egg layer

The horse lays. An egg, at first — but the locus is built to take an allele for any item in the game, and the egg is only the one everybody thinks of first. It drops on the ground where the horse is standing, on a timer.

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 item, dropped on an interval
two different allelesnothing
anything with an nnothing

The third way a horse gives you something

Item drop is what it leaves when it dies. Milk and potion milk are what it gives when you ask. This is what it produces while you are not watching, and it is the only one of the three that needs nothing from you at all.

Health

None. It lays whether or not it is well, tamed, or paying attention.

Gene key
horsegenetics.egg_layer
Alleles
one per item, plus n
Inheritance
homozygous recessive, matched pair
Reaches the game as
a produce effect on an interval
Epigenetic
interval
Coat effect
none, ever
Item entities accumulate, and that is a real server cost

A timer that drops an item and never checks is the classic way to fill a chunk with entities. Skip the drop when enough of that item is already lying nearby, and never extend the despawn timer on what it produces. A pasture of layers left running overnight is the case to design for, not a single horse.

Open item ids mean a diamond-laying horse is expressible

The locus deliberately accepts any item id. That is the right call for expressiveness and it puts the balance burden entirely on the founder table: high-value alleles must never be rollable in the wild, and should be reachable only through the splice layer.

Unknown ids do nothing, loudly once

Following lycan: an item id this game version has never heard of simply never lays. Resolve against the live registry, warn once through warnUntranslated, and never log per firing.

The new verb, and why it is shaped like this

produce completes a pattern that was already two thirds built: item drop produces on death, yield produces on interaction, and this produces on a clock. That symmetry is the argument that it is a real verb rather than a special case — it is the missing corner of a table, not a new table.

On the ground, not into a chest

Laying into the horse’s inventory was considered. It is tidier and it makes the accumulation hazard disappear, and it was rejected because it silently does nothing on a horse with no chest — and a gene you cannot see working is the failure mode this mod already tracks.

Opening the vocabulary

Every other effect that names a thing — item_drop, spread — uses a closed vocabulary, deliberately, so the judgement about what a word means stays with the translator that knows the game. This locus is the first to take raw ids instead, and the precedent that made it safe is lycan, which has stored mob ids as plain strings since it shipped. The rule that makes it work is the same one: an id the game does not know does nothing, quietly.

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