Appearance
twine / MobModuleRef
Interface: MobModuleRef โ
Defined in: twine/src/mob/types.ts:18
A mob module plus handles to its generated functions. Read them after registration.
Extends โ
Properties โ
__configured โ
readonly__configured:true
Defined in: twine/src/core/module.interface.ts:109
Inherited from โ
gestures โ
readonlygestures:Record<string,FunctionRef>
Defined in: twine/src/mob/types.ts:26
Each gesture's raise function, by name - call it as the mob.
instance โ
readonlyinstance:DatapackModule
Defined in: twine/src/core/module.interface.ts:111
Inherited from โ
menu โ
readonlymenu:Pick<MobModuleOpts,"group"|"tags"|"menu">
Defined in: twine/src/mob/types.ts:30
Where it shows in the admin mob menu.
metadata โ
readonlymetadata:ModuleMetadata
Defined in: twine/src/core/module.interface.ts:110
Inherited from โ
onTickFn โ
readonlyonTickFn:FunctionRef
Defined in: twine/src/mob/types.ts:24
<name>/on_tick, the onTick body. Throws if there isn't one.
spawn โ
readonlyspawn:FunctionRef
Defined in: twine/src/mob/types.ts:22
<name>/spawn: summons one at the nearest player.
states โ
readonlystates:Record<string,FunctionRef>
Defined in: twine/src/mob/types.ts:28
Each state's enter function, by name - call it as the mob.
summon โ
readonlysummon:FunctionRef
Defined in: twine/src/mob/types.ts:20
Summons the mob wherever it is run - ctx.execute().at(...).run(b => b.call(mob.summon)).
Methods โ
preview() โ
preview():
MobPreview
Defined in: twine/src/mob/types.ts:32
The model and gesture timelines as plain data - what writeMobPreview renders.