Skip to main content

Mythicmob NPC Hit

When a MythicMob NPC is hit or hits a player

Fields

FieldTypeDefaultDescription
definitionRef<MythicMobNpcDefinition>——
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.
triggerOnNpcHitBooleantrueTrigger when the player hits the NPC
triggerOnPlayerHitBooleanfalseTrigger when the NPC hits the player
Common TypeWriter fields (triggers)
FieldTypeDefaultDescription
triggersList<Ref<TriggerableEntry>>empty—

How to use it​

Use triggerOnNpcHit (default on) to react when a player, or a projectile shot by a player, hits the NPC. Use triggerOnPlayerHit (default off) to react when the NPC, or one of its projectiles, hits a player. The NPC is matched by its instance tag, or by being within 3 blocks of an instance spawn point. The triggers run for the player involved.