Item group / creative

The spawn eggs

Three eggs: one opens a full genome editor, one gives you a foundation horse of a chosen breed, and one holds an exact horse you built earlier.

The custom horse spawn egg

Right-click it to open a horse editor: every gene down the left, a 3D horse in the middle you can spin, and controls on the right. Spawning the horse is creative only, but the editor itself opens in any game mode, so you can use it to look things up.

  • Click a gene to add it to the horse; click again to cycle its versions. Genes with lots of versions get a dropdown. Extension, agouti and shade are always on the horse and have no x: every horse has versions of all three, and between them they decide whether it is black, bay or chestnut.
  • The search box above the list finds a gene by name or by one of its allele codes — type Frp and you get fireproof. Beside it, the family menu narrows the list to one kind of gene — the natural dilutions, the whites, the health genes, or any one family of magic. The two work together, so you can search inside a family.
  • Point at a gene and it tells you what it is. A panel opens beside the list with the gene's name and a sentence or three on what the locus does — the same summary the gene browser uses, not a description of the particular combination this horse has. Every gene has one. For the full account of any of them, its own gene-*.html page is the authority; this is the glanceable version.
  • The padlock beside each gene holds it. A locked gene is kept exactly as it is by every randomize, alleles and variations both — which is how you roll another horse while keeping this tobiano.
  • Breed rolls a real founder of a breed you pick.
  • Randomize rolls within that breed, or from everything if no breed is chosen — and the arrow beside it changes what it does. See the list below. Whatever you pick sticks, and the button says so.
  • Add random puts one gene the horse is not already carrying onto it, at a version that shows. Its arrow narrows that to the natural genes or to the magic.
  • Rnd health is off to begin with. Off, a randomize leaves alone every gene that changes nothing you can see — the disorders, the stat genes, the ability genes — so rolling for a coat cannot quietly roll you a lethal. Turn it on and it rolls those too.
  • Copy horse / Paste move the whole horse through your clipboard: genes, variations, name, sex, age and breed. It is the same text the horse designer’s Export writes, so a horse crosses between them intact.
  • Make egg saves what is on screen into a preset egg instead of spawning it.

What the Randomize arrow offers

Eleven ways to roll, and the useful ones are the narrow ones: most of the time you are not asking for a different horse, you are asking for a different something on the horse you already have. A narrow roll leaves everything outside it untouched.

  • Randomize — a wild horse: every gene drawn at the rate it actually turns up. What the button has always done.
  • True random — every gene picks two of its versions with equal weight, ignoring how rare they are. This is how you meet a homozygous dominant white without rolling for a week. A combination the gene forbids snaps back to plain rather than being redrawn: an impossible horse is not a rare one.
  • Random natural / random magical — re-roll one half of the horse and leave the other exactly as it is.
  • Random natural dilution / random natural white — re-roll one family. Same horse, different colour; same horse, different markings.
  • Randomize breed — pick a breed at random and roll a real founder of it.
  • Random +1 / +2 / +3 magical — an ordinary roll, then magical genes added until at least that many are showing. Genes the roll already turned up count.
  • Randomize epigenetics — the small per-horse variations, leg heights, dapples and splash edges, and nothing else. This is where the old Reroll epi. button went.

A randomize that rolls the whole horse rolls its sex first, before any gene. That is not cosmetic: a stallion carries one copy of an X-linked gene and a mare two, so rolling the genes first would mean immediately undoing half of them.

The same editor is on the wiki as the horse designer, if you want to play with it without opening the game.

Breed spawn eggs

One right-click, one foundation horse of one breed — a clean place to start a line from, with no pedigree behind it. There is no recipe: they come out of dungeon chests, and the horseman sells them (22 emeralds for a common breed, 38 for an uncommon, 58 for a rare).

Every breed uses the same egg item and the same vanilla-looking texture — the tooltip is what tells you the breed, whether it is natural or magical, and how common it is. A few breeds have no egg at all, Feral Mixed among them, because vanilla’s own horse egg already gives you a horse of no particular breeding.

Preset horse spawn eggs

The exact horse the editor was showing when you pressed Make egg: genes, variations, sex, age and breed label. Right-click and it appears exactly as previewed. Making one is creative only; using one is not, which is the point — you can hand one to somebody else.

An old egg can stop working

A saved horse only makes sense against the gene list that saved it, so an egg made before a gene pack was added or removed will refuse and say so, in chat and in red on its tooltip, rather than spawning something wrong.

The custom horse spawn egg

Spawning is creative only — the editor itself opens in any game mode. A reskin of the vanilla horse spawn egg: same icon, and it shows in the vanilla Spawn Eggs tab as well as this mod’s. It has no recipe and it does not spawn anything directly: right-clicking it opens client/CustomHorseSpawnScreen, a full genome editor.

All four right-click gestures open it. A right-click reaches exactly one of RightClickBlock, RightClickItem, EntityInteractSpecific or EntityInteract, and CustomHorseSpawnEggClient used to handle only the first two. Aiming at a horse fell through to vanilla, which on a tamed horse means you mount it.

Nothing about the egg is gated on the environment. There is no isProduction() check anywhere in the path; it behaves identically under runClient and in a built jar. The only gate is creative mode on the Spawn button, and every server-side refusal (refuseSpawn) writes a chat line and a log line. See gap 69.

One screen in two places

CustomHorseSpawnScreen and wiki/horse-designer/ are the same screen built twice — change both. The designer’s model is web/HorseEditor.java, mirroring the screen’s applyGenome / stamp / randomizable / topUpMagical / addRandom / enforceSexLinkage under the same names.

The rules that are identical rather than merely parallel have stopped being mirrored at all and live in common/: genetics/EditorRules (which combination a gene is added at, which three loci are always carried, the uniform roll), genetics/RandomizeMode (the eleven modes, their scope, and which of them roll the sex) and genetics/GeneFamily (the groups the filter and the family rolls use). Two copies of a rule kept in step by hand was workable at two methods and is not at eleven modes.

  • Every registered gene is a row, alphabetically by display name. A gene starts off the horse; clicking the row adds it, homozygous for the first allele that does something. Genes with more than three alleles get a dropdown instead of a cycle button.
  • Make egg writes what is on screen into a preset horse spawn egg instead of spawning it. Same packet, same server-side validation, one flag different — so the egg and the button cannot drift into spawning different horses.
  • The epigenome travels with the genotype to the server. The server re-checks creative mode and that you are holding the egg.
  • Copy horse / Paste write and read common/horse/HorseFile — a small JSON carrying both code strings plus the name, sex, age and breed label. They replaced Copy code / Paste code, which moved a genotype code alone: paste one of those back and the horse returned with fresh epigenetics, no name and no breed, which on a mod whose premise is that one genotype makes many horses is a lossy copy pretending to be an exact one. The browser designer’s Export / Import are the same format against a file rather than a clipboard.
  • The hover panel reads Gene.description() — built-ins from the GeneDescriptions table, data-driven genes from their file's blurb. That accessor is documented as possibly empty and the panel honours it by drawing nothing, but every registered gene has one and GeneDescriptionCoverageTest fails by name if a new one does not. It is drawn with fills and text rather than as a vanilla Tooltip, because a list row is not a widget here and because the browser twin has to draw the same panel with no vanilla tooltip to mirror.
  • The gene list is filtered by GeneFamily.of, which asks the gene rather than keeping a table beside it: magical genes band on their paint priority (the bands were laid out as families in the first place), naturals that change nothing visible are health genes, and the handful whose slot in the paint order fights their family are named in one short override table with the reason.
  • The search is EditorRules.matchesSearch in common/: case-insensitive, over the display name, the key without its namespace (underscores read as spaces), and every allele's token and label. The screen calls it directly; the browser twin asks for the matches through DesignerApi.searchMatchesJson, so the two cannot disagree about what a query finds. The screen keeps one EditBox across rebuildWidgets and re-focuses it after each keystroke, because a rebuild clears focus; the browser draws its box on the canvas and takes keys in the window's capture phase so typing does not also walk the horse.

Breed spawn eggs

An ordinary BreedFounder roll off that breed’s own pool, the same way a wild herd member is made. They come out of dungeon chests (AddBreedSpawnEggModifier, ~7% into simple dungeons, mineshafts, strongholds, temples, mansions, outposts, ocean ruins and bastions) and off the horseman. Both draw weighted by the breed’s own commonness.

One item, not forty-nine

The breed is a breed data component, so there is a single registered item and every breed is a stack of it. That is not a shortcut — it is what makes the feature work for player-added breeds. A breed dropped into .minecraft/phc/breeds/ after the jar was built has no registry entry, no model file and no lang key, and could never have an item of its own; with the breed on the component it gets an egg on exactly the same terms as a built-in one.

A breed opts out by leaving spawn_egg out of its source checklist: no egg exists, none can drop, and the horseman never stocks one.

Preset horse spawn eggs

Genotype, epigenome, sex, age and breed label kept in an item. A genotype code is only readable against the gene list that wrote it, so an egg made before a gene pack was added or removed says so in chat and refuses, rather than crashing.

The creative tab

item/ModCreativeTabs registers one Horse Genetics tab holding every item in ModItems.TAB_ITEMS, plus one filled breed spawn egg per breed that has one. The blank breed egg is not listed anywhere: its whole content is the breed component, and one without a breed is a puzzle rather than an item. In a dev build, the Spawn Test Horse World button’s starting inventory contains one of every item.

client/CustomHorseSpawnScreen, data/loot/AddBreedSpawnEggModifier, item/ModCreativeTabs.