Skip to content

Gene Nodes

Pheno-backed gene nodes are Roots gene types whose runtime behaviour is implemented through Pheno systems. They still live in data/<namespace>/gene/<path>.json and use the shared Roots gene fields from Gene Files.

Use this page for the Pheno-backed fields. Use Gene Type Reference for the Roots-native townstead_roots:* gene types.

Some names also exist in other Pheno domains. For example, pheno:resource can declare a gene-backed meter in a gene file, while pheno:resource as a condition reads that meter, and pheno:change_resource changes it from an action. pheno:collection is similar: the gene declares the store, while selector, condition, and action nodes read or mutate that store from other systems.

TypeFieldsBehaviour
pheno:active_abilityaction, condition, cooldown, slot, ai_trigger, resource_costAdds an activated ability. The holder triggers action from a Root Ability key slot; villagers can use it when ai_trigger allows it: never (default), always, when_hurt, when_threatened, when_flying (mid-glide, only while extra lift would help reach the travel target), or when_hurt_nearby (a hurt villager, player, or animal within a few blocks).
pheno:triggertrigger, target, action, condition, damage_condition, keyRuns action when a supported event fires.
pheno:action_over_timeaction, interval, conditionRuns action repeatedly while the gene is expressed and the condition passes.
pheno:auraradius, interval, action, condition, include_self, target, resource_costRuns action on every living entity in range each interval. target filters recipients: all (default), hostile (monsters only), or non_hostile (villagers, players, animals), so a healing aura never mends a raider. resource_cost makes each pulse that reaches someone spend a resource meter; an unaffordable pulse is skipped.

Action fields use Pheno Actions. Conditions use Pheno Conditions.

TypeFieldsBehaviour
pheno:resourcemin, max, start, regen, regen_interval, color, on_reachDefines a meter such as mana, charge, or stamina.
pheno:collectioncollection configDefines persistent collection state used by collection conditions and actions.
pheno:inventoryinventory configAdds inventory behaviour or storage hooks.
pheno:toggleslot, ai_triggerAdds a toggleable state used by other genes or conditions, flipped from a Root Ability key. With an ai_trigger (same values as active_ability), villagers manage it themselves: held ON while the trigger is true, released when it stops.
pheno:modifiertarget, operation, value, condition fieldsModifies a Pheno capability or runtime value.

Resource genes can be standalone gene files or companion resources inside another gene’s resources block. See Gene Files.

TypeFieldsBehaviour
pheno:body_metrictarget, min, maxRolls a normalized MCA body metric for founders.
pheno:proportionsbody metric ranges and part scale fieldsRolls several body metrics and free-form render proportions from one gene. A part scale is a number for all axes, a [x, y, z] array to stylize per axis (thick arms that are not longer, a barrel torso that is deep but not tall), or {"lean": ..., "stout": ...} to spread the race between two builds: each individual’s rolled width gene picks their spot, mapped through the gene’s own width range, so bulk varies per villager and inherits through MCA’s width blending.
pheno:scaled_partpart id, scale fieldsScales a named render part.
pheno:hide_featurefeature idHides a named render feature.
pheno:overlaytexture/material fieldsAdds a render overlay.
pheno:glowconditionMakes the holder glow, optionally only while a condition passes.
pheno:particleparticle, count, spread, speed, y_offset, conditionEmits ambient simple particles around the holder.

pheno:particle uses simple particle ids such as minecraft:flame or minecraft:end_rod. It is an ambient gene effect, not the same as the one-shot Pheno action pheno:spawn_particles.

{
"schema": "townstead:gene/v2",
"type": "pheno:particle",
"display_name": "Ember Trail",
"particle": "minecraft:flame",
"count": 2,
"spread": 0.4,
"speed": 0,
"y_offset": 0.6
}
TypeBehaviour
pheno:abilityGrants a movement ability by id, such as elytra_flight, creative_flight, slow_fall, or hover. mode is passive (always on) or toggle; a toggle takes a Root Ability key slot the holder flips it with.
pheno:attributeAdds or multiplies a Minecraft attribute, optionally gated by a condition.
pheno:step_heightChanges step height under configured gates.
pheno:buoyancyChanges how the holder floats or sinks.
pheno:wadeAlters movement through configured fluids or blocks.
pheno:entity_groupMakes the holder count as groups such as undead, arthropod, illager, or aquatic.
pheno:effect_immunityPrevents configured status effects.
pheno:stuck_immunityPrevents configured stuck or slowdown effects.
pheno:disable_regenDisables natural regeneration while active.
pheno:custom_soundAdds or overrides sound behaviour.
pheno:damage_modifierChanges incoming or outgoing damage.
pheno:edibleMakes configured items edible or changes eating behaviour.
pheno:keep_inventoryKeeps inventory on death while active.
pheno:mobs_ignoreCauses configured mobs to ignore the holder.
pheno:modify_harvestChanges harvesting results.
pheno:preventPrevents configured behaviours.
pheno:prevent_game_eventPrevents the holder from emitting configured vanilla game events.
pheno:prevent_soundPrevents configured sounds.
pheno:recipeGrants or gates recipe behaviour.
pheno:restrict_equipmentRestricts equipment use.
pheno:scare_mobCauses configured mobs (mobs ids or # tags, within radius) to avoid the holder, optionally gated by a condition.
pheno:stacking_effectApplies stacking status-style behaviour.
pheno:starting_equipmentGives starting equipment.

pheno:prevent_game_event accepts either event for one game event id or events for a list. It only suppresses game events emitted by the gene holder itself, such as minecraft:step; it does not cancel unrelated world events from other entities or blocks. Use the action pheno:emit_game_event when you want to emit a game event from an action.

{
"schema": "townstead:gene/v2",
"type": "pheno:prevent_game_event",
"display_name": "Silent Steps",
"event": "minecraft:step"
}