World

getBlock(x, y, z)

Gets information about a block by coordinates.

Parameters:

  • x (number) - X cordinate.

  • y (number) - Y cordinate.

  • z (number) - Z cordinate.

Returns:

Example Usage:

-- Example code showing how to use the function
local blockInfo = world.getBlock(1, 1, 1)

setBlock(x, y, z, id)

Sets the block to the desired coordinates.

Parameters:

  • x (number) - X cordinate.

  • y (number) - Y cordinate.

  • z (number) - Z cordinate.

  • id (number) - Raw block id.

Example Usage:

isBlockLoaded(x, y, z)

Sets the block to the desired coordinates.

Parameters:

  • x (number) - X cordinate.

  • y (number) - Y cordinate.

  • z (number) - Z cordinate.

Returns:

  • (boolean)

Example Usage:

getOutlineBoxes(x, y, z, blockState)

Sets the block to the desired coordinates.

Parameters:

  • x (number) - X cordinate.

  • y (number) - Y cordinate.

  • z (number) - Z cordinate.

  • blockState (Block data)

Returns:

Example Usage:

getCollisionBoxes(x, y, z, blockState)

Sets the block to the desired coordinates.

Parameters:

  • x (number) - X cordinate.

  • y (number) - Y cordinate.

  • z (number) - Z cordinate.

  • blockState (Block data)

Returns:

Example Usage:

getEntities()

Returns a list of entities.

Returns:

Example Usage:

getEntitiesInBox(entity, box)

Returns a list of entities.

Parameters:

  • entity (entity) - From entity.

  • box (box) - Search box.

Returns:

Example Usage:

getLivingEntities()

Returns a list of entities.

Returns:

Example Usage:

getEntityById(id)

Returns a list of entities.

Parameters:

  • id (number) - Entity id.

Returns:

Example Usage:

getRotation(x, y, z)

Get yaw and pitch for 3d cordinates.

Parameters:

  • x (number) - X cordinate.

  • y (number) - Y cordinate.

  • z (number) - Z cordinate.

Returns:

  • (table) Return table (yaw, pitch)

Example Usage:

raycast(obj)

Return raycast result.

Parameters:

  • obj (table).

Returns:

  • (table) Return table

Example Usage:

Last updated