Skip to main content

Mythicmob NPC Interact

When the player clicks on a MythicMob NPC

Fields

FieldTypeDefaultDescription
definitionRef<MythicMobNpcDefinition>—The MythicMob NPC definition whose instances trigger this event.
MythicMobNpcDefinition (11)
FieldTypeDefaultDescription
displayNameVar<String>——
soundVar<Sound>EMPTY—
mobTypeVar<String>—The MythicMob type to spawn.
showDisplayNameBooleantrueWhether to show the display name above the mob.
showDisplayNameInCinematicBooleantrueWhether to show the display name during cinematics.
showDisplayNameInNavigationBooleantrueWhether to show the display name during navigation.
nameOffsetDouble2.3Y offset for the name display above the mob.
dataList<Ref<EntityData<*>>>empty—
tickingBooleanfalseWhether 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.
clientSideRadiusDouble0.0Radius in which the mob can move (requires ticking=true). If 0, movement is disabled.
cancelInteractAnimationBooleanfalseWhether to cancel the interact animation when a player interacts with the NPC.
shiftTypeShiftTypeANYWhether the player must be sneaking (SHIFT), must not be (NO_SHIFT), or either (ANY).Values:ANYSHIFTNO_SHIFT
interactionTypeInteractionTypeALLWhich click triggers the event: RIGHT_CLICK, LEFT_CLICK, or ALL for both.Values:ALLLEFT_CLICKRIGHT_CLICK
Common TypeWriter fields (triggers)
FieldTypeDefaultDescription
triggersList<Ref<TriggerableEntry>>empty—

How to use it​

Link definition to the NPC definition and put the dialogue or sequence to start in triggers.

  • shiftType filters on sneaking: ANY, SHIFT (only while sneaking) or NO_SHIFT.
  • interactionType accepts ALL, LEFT_CLICK and RIGHT_CLICK, and LEFT_CLICK fires when the player attacks the NPC (Paper PrePlayerAttackEntityEvent).
  • The click is matched to a placed MythicMob NPC Instance of that definition. If the NPC has an available interaction, a 💬 marker shows above it.
  • When the model has an interact animation, it plays on every right-click (not on a left click) unless cancelInteractAnimation is on in the definition.