spawnEntity: Spawn an entity

Description Usage Arguments Value Note See Also Examples

View source: R/spawnEntity.R

Description

Spawn an entity of a given type at a given position.

Usage

1
spawnEntity(x, y, z, typeid)

Arguments

x

east/west position (east is positive)

y

up/down position (up is positive)

z

north/south position (south is positive)

typeid

Integer giving the type of entity. See the output of [etEntityTypes()] or use find_entity()' to search.

Value

A number giving the spawned entity's ID.

Note

Only works with RaspberryJuice version 1.11 or later.

See Also

getEntityTypes(), find_entity()

Examples

1
2
3
4
5
6
7
## Not run: 
mc_connect()
witch_typeid <- find_entity("witch")$id
witch_id <- spawnEntity(0, 20, 0, witch_typeid)
getPlayerName(witch_id)

## End(Not run)

kbroman/miner documentation built on Jan. 26, 2021, 8:14 p.m.