Add files via upload

This commit is contained in:
loosewheel
2021-11-21 02:10:31 +10:00
committed by GitHub
parent 92138ff625
commit f728c4d246
4 changed files with 78 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ lwcomponents.register_spawner (itemname, spawn_func)
spawn_func:
The function to call to spawn the mob of the form -
spawn_func (spawn_pos, itemstack, owner, spawner_pos, spawner_dir)
spawn_func (spawn_pos, itemstack, owner, spawner_pos, spawner_dir, force)
spawn_pos:
The position the entity should be spawned at.
@@ -32,6 +32,10 @@ lwcomponents.register_spawner (itemname, spawn_func)
A single unit vector of the direction the spawner block is facing.
eg. { x = -1, y = 0, z = 0 }
force:
Recommended force (for velocity) of spawned entity.
Can use vector.multiply (spawner_dir, force).
This function should return the ObjectRef of the spawned entity or
nil. If this function returns nil for ObjectRef a second boolean
value should be returned for whether to cancel the action.