World
getBlock(x, y, z)
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:
(Block data) Return block information
Example Usage:
-- Example code showing how to use the function
local blockInfo = world.getBlock(1, 1, 1)setBlock(x, y, z, id)
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)
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)
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:
table (boxes)
Example Usage:
getCollisionBoxes(x, y, z, blockState)
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:
table (boxes)
Example Usage:
getEntities()
getEntities()Returns a list of entities.
Returns:
(List of entititesEntity) Return table (list) of entities
Example Usage:
getEntitiesInBox(entity, box)
getEntitiesInBox(entity, box)Returns a list of entities.
Parameters:
Returns:
(List of entititesEntity) Return table (list) of entities
Example Usage:
getLivingEntities()
getLivingEntities()Returns a list of entities.
Returns:
(List of entititesEntity) Return table (list) of entities
Example Usage:
getEntityById(id)
getEntityById(id)Returns a list of entities.
Parameters:
id(number) - Entity id.
Returns:
(Entity) Return entity
Example Usage:
getRotation(x, y, z)
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)
raycast(obj)Return raycast result.
Parameters:
obj(table).
Returns:
(table) Return table
Example Usage:
Last updated