Buy Me a Coffee at ko-fi.com

A global API dedicated to reading information from the Minecraft world
Accessed using the name "world"

Returns a table containing variables stored from all loaded Avatars "avatar:store()" function
The table will be indexed by the avatar's owner UUID

overload 1:
WorldAPI.avatarVars(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Checks whether or not a world currently exists
This will almost always be true, but might be false on some occasions such as while traveling between dimensions

overload 1:
WorldAPI.exists(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the Biome located at the given position

overload 1:
WorldAPI.getBiome(pos: Vector3): Biome
typings.2002444080typings.64190592
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.getBiome(x: Number, y: Number, z: Number): Biome
typings.-1950496919typings.-1950496919typings.-1950496919typings.64190592
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Gets the block light level of the block at the given position

overload 1:
WorldAPI.getBlockLightLevel(pos: Vector3): Integer
typings.2002444080typings.-672261858
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.getBlockLightLevel(x: Number, y: Number, z: Number): Integer
typings.-1950496919typings.-1950496919typings.-1950496919typings.-672261858
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Gets the BlockState of the block at the given position
If it is not loaded, returns void_air

overload 1:
WorldAPI.getBlockState(pos: Vector3): BlockState
typings.2002444080typings.-1026048988
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.getBlockState(x: Number, y: Number, z: Number): BlockState
typings.-1950496919typings.-1950496919typings.-1950496919typings.-1026048988
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Gets a list of all BlockStates in the specified area
The maximum area size is 8 x 8 x 8

overload 1:
WorldAPI.getBlocks(min: Vector3, max: Vector3): Table
typings.2002444080typings.2002444080typings.80563118
Method PropertyFluent DescriptionRepresentation
min accepts
max accepts
Return Value
overload 2:
WorldAPI.getBlocks(minX: Number, minY: Number, minZ: Number, max: Vector3): Table
typings.-1950496919typings.-1950496919typings.-1950496919typings.2002444080typings.80563118
Method PropertyFluent DescriptionRepresentation
minX accepts
minY accepts
minZ accepts
max accepts
Return Value
overload 3:
WorldAPI.getBlocks(min: Vector3, maxX: Number, maxY: Number, maxZ: Number): Table
typings.2002444080typings.-1950496919typings.-1950496919typings.-1950496919typings.80563118
Method PropertyFluent DescriptionRepresentation
min accepts
maxX accepts
maxY accepts
maxZ accepts
Return Value
overload 4:
WorldAPI.getBlocks(minX: Number, minY: Number, minZ: Number, maxX: Number, maxY: Number, maxZ: Number): Table
typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.80563118
Method PropertyFluent DescriptionRepresentation
minX accepts
minY accepts
minZ accepts
maxX accepts
maxY accepts
maxZ accepts
Return Value

Returns the minimum and maximum build height of the world, as multiple results

overload 1:
WorldAPI.getBuildHeight(): Varargs
typings.1901216868
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the current day
If delta is passed in, then it adds delta to the time
The default value of delta is zero

overload 1:
WorldAPI.getDay(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
WorldAPI.getDay(delta: Number): Number
typings.-1950496919typings.-1950496919
Method PropertyFluent DescriptionRepresentation
delta accepts
Return Value

Gets the time of the current day between 0 and 24000
If delta is passed in, then it adds delta to the time
The default value of delta is zero

overload 1:
WorldAPI.getDayTime(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
WorldAPI.getDayTime(delta: Number): Number
typings.-1950496919typings.-1950496919
Method PropertyFluent DescriptionRepresentation
delta accepts
Return Value

Gets the dimension name of this world

overload 1:
WorldAPI.getDimension(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Returns a list of entities within the bounding box formed by the two given positions

overload 1:
WorldAPI.getEntities(pos1: Vector3, pos2: Vector3): Table
typings.2002444080typings.2002444080typings.80563118
Method PropertyFluent DescriptionRepresentation
pos1 accepts
pos2 accepts
Return Value
overload 2:
WorldAPI.getEntities(x1: Number, y1: Number, z1: Number, x2: Number, y2: Number, z2: Number): Table
typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.-1950496919typings.80563118
Method PropertyFluent DescriptionRepresentation
x1 accepts
y1 accepts
z1 accepts
x2 accepts
y2 accepts
z2 accepts
Return Value

Returns an EntityAPI object from this UUID's entity, or nil if no entity was found

overload 1:
WorldAPI.getEntity(UUID: String): EntityAPI | nil
typings.-1808118735typings.-572044764
Method PropertyFluent DescriptionRepresentation
UUID accepts
Return Value

Returns the highest point at the given position according to the provided heightmap
Defaults to MOTION_BLOCKING if no heightmap is provided

overload 1:
WorldAPI.getHeight(pos: Vector2, heightmap: String): Integer
typings.2002444079typings.-1808118735typings.-672261858
Method PropertyFluent DescriptionRepresentation
pos accepts
heightmap accepts
Return Value
overload 2:
WorldAPI.getHeight(x: Number, z: Number, heightmap: String): Integer
typings.-1950496919typings.-1950496919typings.-1808118735typings.-672261858
Method PropertyFluent DescriptionRepresentation
x accepts
z accepts
heightmap accepts
Return Value

Gets the overall light level of the block at the given position

overload 1:
WorldAPI.getLightLevel(pos: Vector3): Integer
typings.2002444080typings.-672261858
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.getLightLevel(x: Number, y: Number, z: Number): Integer
typings.-1950496919typings.-1950496919typings.-1950496919typings.-672261858
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Takes a string, e.g., `map_3`, and returns a table of data if the map exists.
Map data may be unsynced, and will only update when holding the map

overload 1:
WorldAPI.getMapData(id: String): Table
typings.-1808118735typings.80563118
Method PropertyFluent DescriptionRepresentation
id accepts
Return Value

Gets the current moon phase of the world, stored as an integer

overload 1:
WorldAPI.getMoonPhase(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Returns a table containing instances of Player for all players in the world
The players are indexed by their names

overload 1:
WorldAPI.getPlayers(): Table<String, PlayerAPI>
typings.-1327521288
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the current rain gradient in the world, interpolated from the previous tick to the current one
The default value of delta is 1, which is the current tick

overload 1:
WorldAPI.getRainGradient(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
WorldAPI.getRainGradient(delta: Number): Number
typings.-1950496919typings.-1950496919
Method PropertyFluent DescriptionRepresentation
delta accepts
Return Value

Gets the redstone power level of the block at the given position

overload 1:
WorldAPI.getRedstonePower(pos: Vector3): Integer
typings.2002444080typings.-672261858
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.getRedstonePower(x: Number, y: Number, z: Number): Integer
typings.-1950496919typings.-1950496919typings.-1950496919typings.-672261858
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Gets the skylight level of the block at the given position

overload 1:
WorldAPI.getSkyLightLevel(pos: Vector3): Integer
typings.2002444080typings.-672261858
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.getSkyLightLevel(x: Number, y: Number, z: Number): Integer
typings.-1950496919typings.-1950496919typings.-1950496919typings.-672261858
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Returns a vector with the coordinates of the world spawn

overload 1:
WorldAPI.getSpawnPoint(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the direct redstone power level of the block at the given position

overload 1:
WorldAPI.getStrongRedstonePower(pos: Vector3): Integer
typings.2002444080typings.-672261858
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.getStrongRedstonePower(x: Number, y: Number, z: Number): Integer
typings.-1950496919typings.-1950496919typings.-1950496919typings.-672261858
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Gets the current game time of the world
If delta is passed in, then it adds delta to the time
The default value of delta is zero

overload 1:
WorldAPI.getTime(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
WorldAPI.getTime(delta: Number): Number
typings.-1950496919typings.-1950496919
Method PropertyFluent DescriptionRepresentation
delta accepts
Return Value

Gets the current day time of the world
If delta is passed in, then it adds delta to the time
The default value of delta is zero

overload 1:
WorldAPI.getTimeOfDay(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
WorldAPI.getTimeOfDay(delta: Number): Number
typings.-1950496919typings.-1950496919
Method PropertyFluent DescriptionRepresentation
delta accepts
Return Value

No description available
figura.docs.world.is_chunk_loaded

overload 1:
WorldAPI.isChunkLoaded(pos: Vector3): Boolean
typings.2002444080typings.1729365000
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.isChunkLoaded(x: Number, y: Number, z: Number): Boolean
typings.-1950496919typings.-1950496919typings.-1950496919typings.1729365000
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Gets whether or not the sky is open at the given position

overload 1:
WorldAPI.isOpenSky(pos: Vector3): Boolean
typings.2002444080typings.1729365000
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
WorldAPI.isOpenSky(x: Number, y: Number, z: Number): Boolean
typings.-1950496919typings.-1950496919typings.-1950496919typings.1729365000
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Gets whether or not there is currently thunder/lightning happening in the world

overload 1:
WorldAPI.isThundering(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Parses and creates a new BlockState from the given string
A world position can be optionally given for the blockstate functions that rely on its position

overload 1:
WorldAPI.newBlock(block: String): BlockState
typings.-1808118735typings.-1026048988
Method PropertyFluent DescriptionRepresentation
block accepts
Return Value
overload 2:
WorldAPI.newBlock(block: String, pos: Vector3): BlockState
typings.-1808118735typings.2002444080typings.-1026048988
Method PropertyFluent DescriptionRepresentation
block accepts
pos accepts
Return Value
overload 3:
WorldAPI.newBlock(block: String, x: Number, y: Number, z: Number): BlockState
typings.-1808118735typings.-1950496919typings.-1950496919typings.-1950496919typings.-1026048988
Method PropertyFluent DescriptionRepresentation
block accepts
x accepts
y accepts
z accepts
Return Value

Parses and creates a new ItemStack from the given string
A count and damage can be given, to be applied on this itemstack

overload 1:
WorldAPI.newItem(item: String): ItemStack
typings.-1808118735typings.-148280555
Method PropertyFluent DescriptionRepresentation
item accepts
Return Value
overload 2:
WorldAPI.newItem(item: String, count: Integer): ItemStack
typings.-1808118735typings.-672261858typings.-148280555
Method PropertyFluent DescriptionRepresentation
item accepts
count accepts
Return Value
overload 3:
WorldAPI.newItem(item: String, count: Integer, damage: Integer): ItemStack
typings.-1808118735typings.-672261858typings.-672261858typings.-148280555
Method PropertyFluent DescriptionRepresentation
item accepts
count accepts
damage accepts
Return Value