English
EmakiMobs
What the EmakiMobs module does, where its configuration lives, and how it works with the other modules are described below. EmakiMobs is the custom mob system module. It lets you define custom mobs with YAML, configure spawn rules, loot tables, and skill behaviors, with deep integration into EmakiAttribute, EmakiSkills, and EmakiItem
Module facts
| Item | Value |
|---|---|
| Module version | 1.0.13 |
| Build artifact | EmakiMobs-1.0.13.jar |
| Maven coordinates (API) | emaki.jiuwu.craft:emaki-mobs-api:1.0.9 (provided only; never dropped into plugins/) |
| Main command | /emakimobs (alias /emobs) |
| Hard dependency | EmakiCoreLib (required: true) |
| Soft dependencies | EmakiAttribute, EmakiSkills, EmakiItem, PlaceholderAPI, ModelEngine, BetterModel (all required: false; the matching feature degrades when absent) |
| Permissions | emakimobs.use, emakimobs.spawn, emakimobs.reload, emakimobs.list, emakimobs.info, emakimobs.count, emakimobs.debug, emakimobs.admin |
Pages
| Page | Contents |
|---|---|
| Commands | Spawning, inspecting, managing mobs and reloading configuration |
| Definitions | Full field reference for mobs/*.yml, including components, attributes, skills, threat table, and boss bar |
| Components | All component fields supported by ComponentMapper |
| Spawn Rules | Full field reference for spawn_rules/*.yml, covering the natural and autonomous types |
| Loot Tables | Pool, entry, and function configuration in loot_tables/*.yml |
| Triggers | Mob trigger list and action context variables |
| Entity Models & Animations | ModelEngine / BetterModel mounting, standard actions, K-frames, and LOD configuration |
| API and Integration | The emaki-mobs-api facade, public events, and third-party extension entry points |
Core capabilities
| Capability | Description |
|---|---|
| Custom mob definitions | YAML-driven mob type, stats, appearance, and behavior; hot-reloaded |
| Type override | When id matches a vanilla EntityType name, the config is applied to all naturally spawned entities of that type |
| Two spawn strategies | natural intercepts vanilla spawn events; autonomous runs on its own scheduler (interval / player_follow / day_interval / cron triggers) |
| Loot table system | Multi-pool, weighted entries with count functions and looting enchant bonus |
| EmakiItem integration | Loot table entries drop EmakiItem items through the emaki_item key |
| EmakiAttribute integration | The ea_attributes section feeds EA contribution providers for mob attributes; health/mana-style RESOURCE attributes do not work on mobs |
| Skill triggers | Eleven trigger kinds (including five health-threshold tiers) fire CoreLib action pipelines |
| Target selectors | A mob definition points target_selector at target_selectors.yml to filter and score targets; EmakiMobs also registers a type: emakimobs identity with CoreLib's target selector so the select source can recognise managed mobs |
| Threat table | Sorts targets by accumulated threat; supports custom weights and decay |
| Boss bar | Shows mob health to players within range; configurable color and style |
Default runtime folder
text
plugins/EmakiMobs/
├── config.yml
├── target_selectors.yml ← target selectors and score snapshots (static file, released only when missing)
├── mobs/ ← mob definition files
├── loot_tables/ ← loot table files
├── spawn_rules/ ← spawn rule files
└── lang/mobs/ defines mobs, loot_tables/ defines drops, and spawn_rules/ defines when and where mobs appear. Any .yml file placed in these directories takes effect after /emakimobs reload
target_selectors.yml is referenced by a mob definition's target_selector field. It is a static file (never merged or overwritten by a version upgrade) and is released from the jar only when missing. See the "Target selectors" section of Definitions for its fields
Main configuration
The model: section of config.yml only needs editing when models are enabled; full behaviour is documented under Entity Models & Animations
| Field | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
version | string | No | current version (1.0.13) | — | Config structure marker maintained by the plugin's versioned merge; manual edits are discouraged |
language | string | No | zh_CN | a filename that exists under lang/ (shipped: zh_CN, en_US) | Language file ID, matching lang/<language>.yml; a missing file or key falls back to the fallback language zh_CN |
release_default_data | boolean | No | true | true / false | Whether to release the bundled example data on first start (mobs/example_zombie.yml, loot_tables/example_zombie.yml, spawn_rules/overworld_elites.yml); false skips the release and existing files are unaffected |
model.api | string | No | auto | auto / model_engine / better_model (aliases modelengine / bettermodel also accepted) | Model backend: auto prefers ModelEngine, then BetterModel. An invalid value raises a precheck WARN and falls back to auto; when the selected backend is absent, models are disabled with a startup log note |
model.view_distance | double | No | 48.0 | — (blocks) | Model view range; ModelEngine only, used for the NEAR/MID tiers. BetterModel ignores it |
model.lod.near | double | No | 16.0 | must be ≤ lod.mid | NEAR tier upper bound (blocks), based on the distance from the mob to the nearest player |
model.lod.mid | double | No | 32.0 | must be ≥ lod.near and ≤ lod.far | MID tier upper bound (blocks); anything beyond it is FAR, so this is the real hide boundary |
model.lod.far | double | No | 48.0 | must be ≥ lod.mid | Only bounds the "is any player nearby" search radius (far + 8) and the far-side early return — it is not the hide boundary; lowering it below lod.mid makes the MID tier unreachable |
model.movement_check_interval_ticks | int | No | 5 | ≥ 1 | Period (ticks) of the movement (idle/walk/run) and LOD check |
model.death_detach_delay_ticks | int | No | 40 | ≥ 0 | Ticks to wait after the death animation starts before detaching the model |
model.walk_speed_threshold | double | No | 0.12 | — (blocks/tick) | Horizontal speed at which the mob counts as walking |
model.run_speed_threshold | double | No | 0.28 | — (blocks/tick) | Horizontal speed at which the mob counts as running |
model.transitions.idle_fade_ticks | int | No | 5 | ≥ 0 | Blend-in length (ticks) when switching to the idle action |
model.transitions.walk_fade_ticks | int | No | 5 | ≥ 0 | Same for walk |
model.transitions.run_fade_ticks | int | No | 5 | ≥ 0 | Same for run |
model.transitions.death_fade_ticks | int | No | 0 | ≥ 0 | Same for death |
model.transitions.hurt_fade_ticks | int | No | 2 | ≥ 0 | Same for hurt |
model.transitions.attack_fade_ticks | int | No | 3 | ≥ 0 | Same for attack |
model.transitions.skill_fade_ticks | int | No | 3 | ≥ 0 | Same for skill |
model.transitions.interact_fade_ticks | int | No | 3 | ≥ 0 | Same for interact |
Shipped defaults (EmakiMobs/src/main/resources/config.yml, excerpt):
yaml
version: "1.0.13"
language: "zh_CN"
release_default_data: true
model:
api: "auto"
view_distance: 48.0
lod:
near: 16.0
mid: 32.0
far: 48.0
movement_check_interval_ticks: 5
death_detach_delay_ticks: 40
walk_speed_threshold: 0.12
run_speed_threshold: 0.28
transitions:
idle_fade_ticks: 5
walk_fade_ticks: 5
run_fade_ticks: 5
death_fade_ticks: 0
hurt_fade_ticks: 2
attack_fade_ticks: 3
skill_fade_ticks: 3
interact_fade_ticks: 3Force BetterModel and tighten the mid tier to 24 blocks:
yaml
language: "en_US"
model:
api: "better_model"
lod:
near: 12.0
mid: 24.0
far: 48.0Typical workflow
- Create a mob definition in
mobs/with an id, entity type, and component values - Create a matching loot table in
loot_tables/with amob_idmatching the mob id - (Optional) Add a
loot_tablekey tocomponentsto set a vanilla/datapack loot table; a YAML loot table does not need that key (a same-named file applies on its own — see the "Loot fields" section of Components) - Add a spawn rule in
spawn_rules/to link the mob to spawn conditions - Run
/emakimobs reloador restart the server - Use
/emakimobs spawn <mob_id>to test the mob at your current location
Relations with other modules
| Module | Integration |
|---|---|
| EmakiAttribute | The ea_attributes section feeds EA contribution providers for mob attributes |
| EmakiItem | Loot table entries name an EmakiItem item ID under the emaki_item key to drop custom items |
| EmakiSkills | Declared as an optional dependency (required: false) in paper-plugin.yml, but actions runs entirely on CoreLib action pipelines — installing EmakiSkills is not required |
| EmakiCoreLib | Provides the action pipeline for action lines and skills, the dispatchers, action registration, and lifecycle infrastructure; EmakiMobs also registers a type: emakimobs identity with CoreLib's target selector |
| ModelEngine / BetterModel | Optional backends selected through model.api in config.yml; models are disabled when neither is installed |