Skip to content

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 ​

ItemValue
Module version1.0.13
Build artifactEmakiMobs-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 dependencyEmakiCoreLib (required: true)
Soft dependenciesEmakiAttribute, EmakiSkills, EmakiItem, PlaceholderAPI, ModelEngine, BetterModel (all required: false; the matching feature degrades when absent)
Permissionsemakimobs.use, emakimobs.spawn, emakimobs.reload, emakimobs.list, emakimobs.info, emakimobs.count, emakimobs.debug, emakimobs.admin

Pages ​

PageContents
CommandsSpawning, inspecting, managing mobs and reloading configuration
DefinitionsFull field reference for mobs/*.yml, including components, attributes, skills, threat table, and boss bar
ComponentsAll component fields supported by ComponentMapper
Spawn RulesFull field reference for spawn_rules/*.yml, covering the natural and autonomous types
Loot TablesPool, entry, and function configuration in loot_tables/*.yml
TriggersMob trigger list and action context variables
Entity Models & AnimationsModelEngine / BetterModel mounting, standard actions, K-frames, and LOD configuration
API and IntegrationThe emaki-mobs-api facade, public events, and third-party extension entry points

Core capabilities ​

CapabilityDescription
Custom mob definitionsYAML-driven mob type, stats, appearance, and behavior; hot-reloaded
Type overrideWhen id matches a vanilla EntityType name, the config is applied to all naturally spawned entities of that type
Two spawn strategiesnatural intercepts vanilla spawn events; autonomous runs on its own scheduler (interval / player_follow / day_interval / cron triggers)
Loot table systemMulti-pool, weighted entries with count functions and looting enchant bonus
EmakiItem integrationLoot table entries drop EmakiItem items through the emaki_item key
EmakiAttribute integrationThe ea_attributes section feeds EA contribution providers for mob attributes; health/mana-style RESOURCE attributes do not work on mobs
Skill triggersEleven trigger kinds (including five health-threshold tiers) fire CoreLib action pipelines
Target selectorsA 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 tableSorts targets by accumulated threat; supports custom weights and decay
Boss barShows 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

FieldTypeRequiredDefaultAccepted valuesDescription
versionstringNocurrent version (1.0.13)—Config structure marker maintained by the plugin's versioned merge; manual edits are discouraged
languagestringNozh_CNa 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_databooleanNotruetrue / falseWhether 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.apistringNoautoauto / 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_distancedoubleNo48.0— (blocks)Model view range; ModelEngine only, used for the NEAR/MID tiers. BetterModel ignores it
model.lod.neardoubleNo16.0must be ≤ lod.midNEAR tier upper bound (blocks), based on the distance from the mob to the nearest player
model.lod.middoubleNo32.0must be ≥ lod.near and ≤ lod.farMID tier upper bound (blocks); anything beyond it is FAR, so this is the real hide boundary
model.lod.fardoubleNo48.0must be ≥ lod.midOnly 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_ticksintNo5≥ 1Period (ticks) of the movement (idle/walk/run) and LOD check
model.death_detach_delay_ticksintNo40≥ 0Ticks to wait after the death animation starts before detaching the model
model.walk_speed_thresholddoubleNo0.12— (blocks/tick)Horizontal speed at which the mob counts as walking
model.run_speed_thresholddoubleNo0.28— (blocks/tick)Horizontal speed at which the mob counts as running
model.transitions.idle_fade_ticksintNo5≥ 0Blend-in length (ticks) when switching to the idle action
model.transitions.walk_fade_ticksintNo5≥ 0Same for walk
model.transitions.run_fade_ticksintNo5≥ 0Same for run
model.transitions.death_fade_ticksintNo0≥ 0Same for death
model.transitions.hurt_fade_ticksintNo2≥ 0Same for hurt
model.transitions.attack_fade_ticksintNo3≥ 0Same for attack
model.transitions.skill_fade_ticksintNo3≥ 0Same for skill
model.transitions.interact_fade_ticksintNo3≥ 0Same 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: 3

Force 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.0

Typical workflow ​

  1. Create a mob definition in mobs/ with an id, entity type, and component values
  2. Create a matching loot table in loot_tables/ with a mob_id matching the mob id
  3. (Optional) Add a loot_table key to components to 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)
  4. Add a spawn rule in spawn_rules/ to link the mob to spawn conditions
  5. Run /emakimobs reload or restart the server
  6. Use /emakimobs spawn <mob_id> to test the mob at your current location

Relations with other modules ​

ModuleIntegration
EmakiAttributeThe ea_attributes section feeds EA contribution providers for mob attributes
EmakiItemLoot table entries name an EmakiItem item ID under the emaki_item key to drop custom items
EmakiSkillsDeclared as an optional dependency (required: false) in paper-plugin.yml, but actions runs entirely on CoreLib action pipelines — installing EmakiSkills is not required
EmakiCoreLibProvides 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 / BetterModelOptional backends selected through model.api in config.yml; models are disabled when neither is installed