MythicMobs NPC
The MythicMobs NPC Extension integrates MythicMobs entities into the TypeWriter NPC system, allowing for complex, animated, and interactive characters with full 3D model support.
Features
- MythicMobs Integration — Use any MythicMob as a persistent NPC with full configuration support.
- 3D Model Support — Native support for BetterModel and ModelEngine with automatic model visibility management.
- Audience Groups — Show NPCs to specific player groups using TypeWriter's audience system. Supports
PlayerGroupfor per-player NPCs. - Visibility Control — Fine-grained visibility control per player with automatic handling for joining players.
- Interactions — Trigger quests and dialogues on NPC interaction with customizable click types.
- Animations — Control animations, stances, and movement states through ModelEngine/BetterModel API.
Architecture
Model Integration
The extension supports both BetterModel and ModelEngine for 3D model rendering:
- BetterModel
- ModelEngine
BetterModel is the preferred model provider. The extension uses the native EntityTrackerRegistry API for optimal visibility control:
- Uses
registry.spawnIfNotSpawned(player)for showing models - Uses
registry.remove(player)for hiding models - Full support for per-player model visibility
ModelEngine is also supported through the compatibility API:
- Uses
setForceViewing/setForceHiddenon base entity data - Automatic fallback when BetterModel is not available
Note: The model must be configured in your MythicMob YAML file. TypeWriter will automatically manage visibility but does not apply models to entities.
Audience Groups
The extension supports TypeWriter's audience system for controlling NPC visibility:
# Using PlayerGroup - each player sees their own NPC instance
group: player_group_entry_id
When using PlayerGroup:
- Each player has their own dedicated NPC entity
- NPCs are invisible to players outside their audience
- Automatic handling for players joining/changing worlds
Entries
- Entity Definitions — MythicMob NPC Definition: Define a MythicMob-based NPC. MythicMob NPC Instance: Place an NPC in the world.
- Actions — Show NPC: Reveal NPC to player. Hide NPC: Hide NPC from player.
- Facts & Variables — Check NPC health, presence, and distance with facts. Use variables to access level, power, and state data.
- Events & Cinematics — NPC Interact Event: Trigger on click. NPC Cinematic: Use NPCs in scenes.
Quick Start
- 1. Trigger Actions — Use action entries to interact with the extension: show_npc, hide_npc. Trigger them from commands, NPCs, events, or other entries. → show_npc → hide_npc
Configuration Options
NPC Definition
| Option | Description |
|---|---|
mobType | The MythicMob internal name to use |
ticking | true for server-side (real entity), false for client-side (packet-based) |
showDisplayName | Whether to show a nametag above the NPC |
cancelInteractAnimation | Disable the arm swing animation on interaction |
NPC Instance
| Option | Description |
|---|---|
spawnLocation | Where to spawn the NPC (supports dynamic positions) |
group | Audience group for visibility control |
activity | Entity activity entry for NPC behavior |
Dependencies
| Extension | Required | Usage |
|---|---|---|
| QuestExtension | Required | Core quest engine. |
| BasicExtension | Required | Core extension utilities. |
| EntityExtension | Required | Entity management framework. |
| RoadNetworkExtension | Required | NPC pathfinding and road network. |
| PlaceholderAPI | Optional | For @Placeholder fields. |