Skip to content
Flint
Documentation

block

typePaper

A block in a world.

Properties 13

block.type: text
settablePaper

Block type, such as stone. Assign a type name to change the block.

block.x: number
read-onlyPaper

X coordinate.

block.y: number
read-onlyPaper

Y coordinate.

block.z: number
read-onlyPaper

Z coordinate.

Location of the block.

block.world: world
read-onlyPaper

The world.

block.light: number
read-onlyPaper

Light level at the block, 0 to 15.

block.power: number
read-onlyPaper

Redstone power reaching the block, 0 to 15.

block.is_air: bool
read-onlyPaper

True for air.

block.is_solid: bool
read-onlyPaper

True if entities cannot walk through it.

True for water and lava.

block.biome: text
read-onlyPaper

Biome at the block, such as plains.

block.data: text
settablePaper

Full block state, e.g. minecraft:oak_stairs[facing=north]. Assign to change it.

Methods 2

The block that many steps away, e.g. block.relative(0, 1, 0) is the one above.

Breaks the block and drops its items.