> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/api/net/minecraft/world/level/block/state/blockstate.md).

# BlockState

A block together with its properties, e.g. a slab that is the top half.

### Properties

#### block

> `readonly` **block**: `string`

The block id, e.g. "minecraft:stone".

**See**

[Block ids](https://minecraft.wiki/w/Java_Edition_data_values/Blocks)

***

#### blocksMotion

> `readonly` **blocksMotion**: `boolean`

Whether the block stops entities from walking through it.

***

#### canBeReplaced

> `readonly` **canBeReplaced**: `boolean`

Whether placing a block here replaces it, like grass or water.

***

#### fluid

> `readonly` **fluid**: [`FluidState`](/newgen/api/net/minecraft/world/level/material/fluidstate.md)

The fluid held by this block, e.g. water for a waterlogged block.

***

#### hasBlockEntity

> `readonly` **hasBlockEntity**: `boolean`

Whether the block has a block entity, e.g. chests and furnaces.

***

#### isAir

> `readonly` **isAir**: `boolean`

Whether this is air, including cave air and void air.

***

#### isLiquid

> `readonly` **isLiquid**: `boolean`

Whether the block is a fluid such as water or lava.

***

#### isRandomlyTicking

> `readonly` **isRandomlyTicking**: `boolean`

Whether the block receives random ticks, e.g. crops and leaves.

***

#### isSolid

> `readonly` **isSolid**: `boolean`

The game's solid flag: whether the block counts as a solid block for support and spawning.

***

#### lightEmission

> `readonly` **lightEmission**: `number`

The light level the block gives off, 0 to 15.

***

#### properties

> `readonly` **properties**: [`PropertyValue`](/newgen/api/net/minecraft/world/level/block/state/properties/propertyvalue.md)\[]

Every property of this state with its value.

***

#### requiresCorrectToolForDrops

> `readonly` **requiresCorrectToolForDrops**: `boolean`

Whether the block drops nothing unless broken with the right tool.

### Methods

#### getCollisionBoxes()

> **getCollisionBoxes**(`pos`): [`AABB`](/newgen/api/net/minecraft/world/phys/aabb.md)\[]

The collision boxes of the block in world coordinates.

**Parameters**

**pos**

[`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The position of the block.

**Returns**

[`AABB`](/newgen/api/net/minecraft/world/phys/aabb.md)\[]

***

#### getDestroyProgress()

> **getDestroyProgress**(`pos`): `number`

How much of the block the local player breaks per tick with the held item, where 1 is done.

**Parameters**

**pos**

[`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The position of the block.

**Returns**

`number`

***

#### getDestroySpeed()

> **getDestroySpeed**(`pos`): `number`

The block hardness; -1 means unbreakable.

**Parameters**

**pos**

[`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The position of the block.

**Returns**

`number`

***

#### getOutlineBoxes()

> **getOutlineBoxes**(`pos`): [`AABB`](/newgen/api/net/minecraft/world/phys/aabb.md)\[]

The outline (selection) boxes of the block in world coordinates.

**Parameters**

**pos**

[`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The position of the block.

**Returns**

[`AABB`](/newgen/api/net/minecraft/world/phys/aabb.md)\[]

***

#### getValue()

> **getValue**(`name`): `string`

The value of a property as text, or null if this block has no such property.

**Parameters**

**name**

`string`

The property name, e.g. "facing".

**Returns**

`string`

***

#### hasCollision()

> **hasCollision**(`pos`): `boolean`

Whether the block has any collision box at a position.

**Parameters**

**pos**

[`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The position of the block.

**Returns**

`boolean`

***

#### is()

> **is**(`idOrTag`): `boolean`

Whether this is a given block or belongs to a given tag.

**Parameters**

**idOrTag**

`string`

A block id like "minecraft:stone", or a tag with a leading #, like "#minecraft:logs".

**Returns**

`boolean`

**See**

[Block tags](https://minecraft.wiki/w/Block_tag_\(Java_Edition\))
