Mythicmob NPC Instance
An instance of a MythicMob NPC
Fields
| Field | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
definition | Ref<MythicMobNpcDefinition> | — | —
|
| Field | Type | Default | Description |
|---|---|---|---|
displayName | Var<String> | — | — |
sound | Var<Sound> | EMPTY | — |
mobType | Var<String> | — | The MythicMob type to spawn. |
showDisplayName | Boolean | true | Whether to show the display name above the mob. |
showDisplayNameInCinematic | Boolean | true | Whether to show the display name during cinematics. |
showDisplayNameInNavigation | Boolean | true | Whether to show the display name during navigation. |
nameOffset | Double | 2.3 | Y offset for the name display above the mob. |
data | List<Ref<EntityData<*>>> | empty | — |
ticking | Boolean | false | Whether to tick the NPC for movement and updates. Off (the supported setting): a model carrier without AI, driven by Typewriter. On: a living mob with AI. Keep it off when another extension's instance, such as a dungeon NPC instance, displays this NPC: each viewer then gets a mob of their own, visible to them alone, that no instance manages. Either way a server mob exists; it is only hidden from the other players. |
clientSideRadius | Double | 0.0 | Radius in which the mob can move (requires ticking=true). If 0, movement is disabled. |
cancelInteractAnimation | Boolean | false | Whether to cancel the interact animation when a player interacts with the NPC. |
spawnLocationVar<Position>ORIGINdataList<Ref<EntityData<*>>>emptyactivityRef<out EntityActivityEntry>groupRef<out GroupEntry>secondaryOffsetVector{"x":0.0,"y":0.0,"z":0.0}How to use it
Place one instance per spot where you want the NPC.
definitionis the MythicMob NPC Definition to place.spawnLocationis the position and rotation. A fixed position gives one NPC position for everybody; a variable resolves a position per player.activitysets the behaviour, for example a path from the Road Network. Without one, the NPC stays idle.groupshares the NPC between the members of a group, such as a party. With a client-side definition (tickingoff) and nogroup, each player gets an individual NPC.dataadds entity data on top of the definition's data. Instance data wins over definition data.secondaryOffsetis an invisible focus point, relative tospawnLocation. The Camera Cinematic and the Camera Bound look at it. Leave it at0, 0, 0to look at the middle of the mob.
Facts, variables, actions and cinematics that need an NPC all ask for an instance, not a definition.