Mob Origins
Mob origins are to mobs what player origins are to players: a JSON-defined bundle of powers attached to a LivingEntity, with weighted spawn rules and per-origin drops.
Authored at data/<ns>/origins/mob_origins/<id>.json; loaded by MobOriginDataManager after the player-origin / layer reload pipeline. NeoOrigins-native concept: no Origins-mod legacy format.
📖 See
POWER_TYPES.mdfor the power list shared with player origins. Theneoorigins:mob_behaviorpower (configurable aggression) is mob-only.
ℹ️ Status: this doc is a Phase-5 outline. Full field tables + examples land alongside Phase 6 and the v2.1.0 release.
File shape
{
"name": {"text": "Brutal Zombie"},
"description": {"text": "A hostile zombie variant"},
"icon": "minecraft:zombie_head",
"target": {"entity_type": "minecraft:zombie"},
"powers": ["neoorigins_custom:brutal_zombie_buffs"],
"spawn_rules": { },
"drops": { },
"hidden": false
}
id is injected from the file path; do not write it in the JSON. (Same convention as player origins.)
Top-level fields
target: exactly one ofentity_type(single id),entity_tag(tag id), orentity_types(array of ids). [TODO: examples + validation rules]nameis required;descriptionandiconare optional.powers: list of resolved power ids; unknown ids and powers that aren’t mob-applicable are skipped silently (no log line).spawn_rules: optional. When absent the origin is never rolled at natural spawn (weight0); it can still be attached with a spawn egg or/neoorigins mob apply. Fields:weight(default0): chance from0to1that the origin attaches when every other rule passes;1or more always attaches,0or less opts out.spawn_reasons: lowercase vanilla spawn-reason names (EntitySpawnReason); empty or absent means any reason.y_range,light_range:{"min": .., "max": ..}or a single int. Light is the block-light level at the spawn position.time_of_day:any(default),dayornight.location:dimension,biome,biome_tag,biomes,structure,structure_tag. The other location fields (min_y,max_y,can_see_sky,allow_water_surface,allow_ocean_floor) are parsed but ignored here; usey_rangefor height.mutex_group: recorded on the mob when the origin attaches, and a candidate is skipped if its group is already recorded. Because the roll stops at the first origin that attaches, this has no visible effect today.replace(defaultfalse): parsed, but the spawn roll does not read it.
Candidates whose
targetmatches are tried in id order and the first one that passes attaches; a mob gets at most one origin.drops: optional. Drop table layered onto vanilla loot by theneoorigins:mob_origin_dropsglobal loot modifier.mode:additive(default) orreplace(vanilla drops cleared).strategy:independent_chance(default: each entry rollsrollstimes, default1, atchance, default1.0) orweighted_pool(pool_rollspicks, default0, weighted by each entry’sweight, default1).entries:[{item, count, chance, rolls, weight}], whereitemis required andcount(default1) takes the same int-or-range form asy_range. The modifier only runs when its carrier files are present in a loaded datapack; the Mob Origin Creator writes them into the world’sneoorigins_custompack on save, and on server start they are written there if any loaded mob origin has drops (active after the next reload).hidden(defaultfalse): parsed and stored, but nothing reads it yet.
The neoorigins:mob_behavior power
Configurable, piglin-style aggression. Three modes: NEUTRAL (no targeting), HOSTILE (always targets), CONDITIONAL (targets only while every hostile_when condition holds for the candidate player).
Config fields: aggression, hostile_when, retaliate, anger_linger_ticks, aggro_range, target_type, call_for_help. [TODO: full field table + examples; condition DSL reuses the existing entity-condition surface verbatim.]
Spawn-egg minting (Phase 4d)
Both surfaces target the saved origin id. Save the draft first if it’s new.
Other /neoorigins mob subcommands (permission level 2): apply <targets> <origin> attaches an origin to non-player living entities (without checking target), clear <targets> removes it, get <targets> reports it, and editor opens the Mob Origin Creator.
/neoorigins mob egg <origin> [entity_type] [count]: mints a vanilla<type>_spawn_eggItemStack with the origin marker baked intoENTITY_DATA.- “Give Spawn Egg” button in the Mob Origin Creator’s Identity tab: same path, prompts for an entity type when the origin’s target is a tag or list.
Right-clicking the egg on the ground spawns the mob with the origin pre-attached. Right-clicking it on a Spawner reconfigures the spawner’s next-spawn data so its natural firings also carry the origin.
Live Mode (Phase 6: pending)
[TODO: looked-at apply / spawn here / active template. Section drafted when Phase 6 lands.]
Power compatibility
Not every power type works on mobs (HUD / keybind / food / starting-equipment / edible-item / orb-related types are player-only). Powers a mob origin lists are filtered through PowerType.appliesToMobs(config); ineligible powers are skipped without a log line and the rest are applied via MobOriginService.applyMobOriginPowers.
[TODO: full appliesToMobs() table, which power types fire on mobs and which are filtered out.]