world

The global instance of the WorldAPI and its subtypes
field signature:
world
Method Property Fluent Description Representation
Field Type a WorldAPI

WorldAPI.exists

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:
world.exists()
Method Property Fluent Description Representation
Return Value a Boolean

WorldAPI.getTime

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:
world.getTime()
Method Property Fluent Description Representation
Return Value a Number
overload 2:
world.getTime(delta)
Method Property Fluent Description Representation
delta accepts a Number
Return Value a Number

WorldAPI.getTimeOfDay

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:
world.getTimeOfDay()
Method Property Fluent Description Representation
Return Value a Number
overload 2:
world.getTimeOfDay(delta)
Method Property Fluent Description Representation
delta accepts a Number
Return Value a Number

WorldAPI.getStrongRedstonePower

Gets the direct redstone power level of the block at the given position
overload 1:
world.getStrongRedstonePower(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value an Integer
overload 2:
world.getStrongRedstonePower(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value an Integer

WorldAPI.getBiome

Gets the Biome located at the given position
overload 1:
world.getBiome(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value a Biome
overload 2:
world.getBiome(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a Biome

WorldAPI.getBlockState

figura.docs.world.get_blockstate
overload 1:
world.getBlockState(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value a BlockState
overload 2:
world.getBlockState(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a BlockState

WorldAPI.getMoonPhase

Gets the current moon phase of the world, stored as an integer
overload 1:
world.getMoonPhase()
Method Property Fluent Description Representation
Return Value an Integer

WorldAPI.isThundering

Gets whether or not there is currently thunder/lightning happening in the world
overload 1:
world.isThundering()
Method Property Fluent Description Representation
Return Value a Boolean

WorldAPI.getSkyLightLevel

Gets the skylight level of the block at the given position
overload 1:
world.getSkyLightLevel(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value an Integer
overload 2:
world.getSkyLightLevel(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value an Integer

WorldAPI.isOpenSky

Gets whether or not the sky is open at the given position
overload 1:
world.isOpenSky(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value a Boolean
overload 2:
world.isOpenSky(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a Boolean

WorldAPI.getBlockLightLevel

Gets the block light level of the block at the given position
overload 1:
world.getBlockLightLevel(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value an Integer
overload 2:
world.getBlockLightLevel(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value an Integer

WorldAPI.playerVars

figura.docs.world.player_vars
overload 1:
world.playerVars()
Method Property Fluent Description Representation
Return Value a table

WorldAPI.getRainGradient

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:
world.getRainGradient()
Method Property Fluent Description Representation
Return Value a Number
overload 2:
world.getRainGradient(delta)
Method Property Fluent Description Representation
delta accepts a Number
Return Value a Number

WorldAPI.getPlayers

Returns a table containing instances of Player for all players in the world
The players are indexed by their names
overload 1:
world.getPlayers()
Method Property Fluent Description Representation
Return Value a table mapping a String to a PlayerAPI

WorldAPI.getRedstonePower

Gets the redstone power level of the block at the given position
overload 1:
world.getRedstonePower(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value an Integer
overload 2:
world.getRedstonePower(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value an Integer

WorldAPI.getLightLevel

Gets the overall light level of the block at the given position
overload 1:
world.getLightLevel(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value an Integer
overload 2:
world.getLightLevel(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value an Integer
a a