FluxWareScripting
Back to site

world

The loaded world. Every function returns nil when there is none.

Functions

7 functions. Signatures are generated from the client, so they describe the build you are running.

world.getBlock(x:number, y:number, z:number) -> string

Registry id, e.g. 'minecraft:obsidian'.

world.isAir(x:number, y:number, z:number) -> boolean
world.isSolid(x:number, y:number, z:number) -> boolean

Whether the block has a full collision box.

world.blockHardness(x:number, y:number, z:number) -> number

-1 for unbreakable blocks such as bedrock.

world.getTime() -> number

World time in ticks.

world.getDimension() -> string
world.raycast(distance:number) -> table|nil

Casts from the player's eye along their look vector. Returns {x, y, z, side, block} for a block hit, or nil for a miss. Blocks only in v1; entity hits report as a miss.