minecraft:genetics for you with a switch.Get GodCraftOverview
minecraft:genetics is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Gives the entity genes that babies inherit from both parents, like panda personalities or goat horns. Matching gene values fire events on the baby to show the trait.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
genes | List | none | List of genes, their possible values and the events tied to them. |
mutation_rate | Decimal | "0.03125" | Chance that a baby gets a random gene value instead of one from a parent. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:genetics": {
"genes": {},
"mutation_rate": "0.03125"
}
}