world
Contains functions to control the local world
remove()
Removes the given entity id from the world
remove(entity_id: int): void
Parameters
name | type | description |
---|---|---|
entity_id | int | The id of the entity to be removed |
get_block_at()
Returns the block at the given coordinates
get_block_at(x: double, y: double, z: double): block
Parameters
name | type | description |
---|---|---|
x | double | The x coordinate |
y | double | The y coordinate |
z | double | The z coordinate |
get_block_at_vec()
Returns the block at the given vector coordinates
get_block_at_vec(vec: vec3d): block
Parameters
name | type | description |
---|---|---|
vec | vec3d | The vector coordinates |
get_entities()
Returns an array of all loaded entity ids
get_entities(): int[]
This method does not have any parameters
get_players()
Returns an array of all loaded player ids
get_players(): int[]
This method does not have any parameters
get_name()
Returns the name of the given entity id
get_name(entity_id: int): string
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_display_name()
Returns the display name of the given entity id
get_display_name(entity_id: int): string
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_hurt_time()
Returns the current hurt-time of the given entity id
get_hurt_time(entity_id: int): int
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_hurt_resistant_time()
Returns the current hurt resistant time of the given entity id
get_hurt_resistant_time(entity_id: int): int
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_health()
Returns the current health of the given entity id
get_health(entity_id: int): double
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_max_health()
Returns the current max health of the given entity id
get_max_health(entity_id: int): double
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_sprinting()
Returns the current sprinting state of the given entity id
is_sprinting(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_sneaking()
Returns the current sneaking state of the given entity id
is_sneaking(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_invisible()
Returns the current invisibility state of the given entity id
is_invisible(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_burning()
Returns the current burning state of the given entity id
is_burning(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_riding()
Returns the current riding state of the given entity id
is_riding(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_facing()
Returns the current facing of the given entity id
get_facing(entity_id: int): facing
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_yaw()
Returns the current yaw of the given entity id
get_yaw(entity_id: int): float
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_pitch()
Returns the current pitch of the given entity id
get_pitch(entity_id: int): float
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_ticks_existed()
Returns the current ticks existed of the given entity id
get_ticks_existed(entity_id: int): int
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_player()
Returns if the given entity id is a player
is_player(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_bot()
Returns if the given entity id id is a bot
is_bot(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_target()
Returns if the given entity id is a target
is_target(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
is_friend()
Returns if the given entity id is a friend
is_friend(entity_id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
held_item()
Returns the item the entity is holding
held_item(entity_id: int): string
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_width()
Returns the current width of the given entity id
get_width(entity_id: int): float
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_height()
Returns the current height of the given entity id
get_height(entity_id: int): float
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_position_x()
Returns the current position x of the given entity id
get_position_x(entity_id: int): double
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_position_y()
Returns the current position y of the given entity id
get_position_y(entity_id: int): double
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_position_z()
Returns the current position z of the given entity id
get_position_z(entity_id: int): double
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_position()
Returns the current position of the given entity id
get_position(entity_id: int): vec3d
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_prev_position_x()
Returns the previous position x of the given entity id
get_prev_position_x(entity_id: int): double
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_prev_position_y()
Returns the previous position y of the given entity id
get_prev_position_y(entity_id: int): double
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_prev_position_z()
Returns the previous position z of the given entity id
get_prev_position_z(entity_id: int): double
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_prev_position()
Returns the current position of the given entity id
get_prev_position(entity_id: int): vec3d
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
get_active_effects()
Returns all current potion effects of the given entity id
get_active_effects(entity_id: int): potion[]
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
has_effect()
Returns if the given entity id has a given effect
has_effect(entity_id: int, id: int): boolean
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
id | int | The id of the potion |
get_effect()
Returns a specific potion effect if active otherwise returns nil of the given entity id
get_effect(entity_id: int, id: int): potion
Parameters
name | type | description |
---|---|---|
entity_id | int | The entity id |
id | int | The id of the potion |
get_biome()
Returns the biome of the current world
get_biome(): string
This method does not have any parameters