> 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/core/blockpos.md).

# BlockPos

The position of a block.

### Constructors

#### Constructor

> **new BlockPos**(`x`, `y`, `z`): `BlockPos`

Creates a new BlockPos.

**Parameters**

**x**

`number`

The X coordinate.

**y**

`number`

The Y coordinate.

**z**

`number`

The Z coordinate.

**Returns**

`BlockPos`

### Properties

#### x

> `readonly` **x**: `number`

The X coordinate.

***

#### y

> `readonly` **y**: `number`

The Y coordinate.

***

#### z

> `readonly` **z**: `number`

The Z coordinate.

### Methods

#### above()

> **above**(): `BlockPos`

The position one block up.

**Returns**

`BlockPos`

***

#### below()

> **below**(): `BlockPos`

The position one block down.

**Returns**

`BlockPos`

***

#### closerThan()

> **closerThan**(`other`, `distance`): `boolean`

Whether another position is closer than a distance.

**Parameters**

**other**

`BlockPos`

The other position.

**distance**

`number`

The distance in blocks.

**Returns**

`boolean`

***

#### distanceTo()

> **distanceTo**(`other`): `number`

The distance between the centers of two blocks.

**Parameters**

**other**

`BlockPos`

The other position.

**Returns**

`number`

***

#### distManhattan()

> **distManhattan**(`other`): `number`

The distance counting only axis-aligned steps, in blocks.

**Parameters**

**other**

`BlockPos`

The other position.

**Returns**

`number`

***

#### distSqr()

> **distSqr**(`other`): `number`

The squared distance between two block positions.

**Parameters**

**other**

`BlockPos`

The other position.

**Returns**

`number`

***

#### east()

> **east**(): `BlockPos`

The position one block east (positive X).

**Returns**

`BlockPos`

***

#### getCenter()

> **getCenter**(): [`Vec3`](/newgen/api/net/minecraft/world/phys/vec3.md)

The center of the block.

**Returns**

[`Vec3`](/newgen/api/net/minecraft/world/phys/vec3.md)

***

#### multiply()

> **multiply**(`scale`): `BlockPos`

Every coordinate multiplied by a factor.

**Parameters**

**scale**

`number`

The factor.

**Returns**

`BlockPos`

***

#### north()

> **north**(): `BlockPos`

The position one block north (negative Z).

**Returns**

`BlockPos`

***

#### offset()

> **offset**(`x`, `y`, `z`): `BlockPos`

This position moved by the given amounts.

**Parameters**

**x**

`number`

X offset.

**y**

`number`

Y offset.

**z**

`number`

Z offset.

**Returns**

`BlockPos`

***

#### relative()

> **relative**(`direction`): `BlockPos`

The neighbouring position in a direction.

**Parameters**

**direction**

[`Direction`](/newgen/api/enum_types/direction.md)

The direction.

**Returns**

`BlockPos`

***

#### south()

> **south**(): `BlockPos`

The position one block south (positive Z).

**Returns**

`BlockPos`

***

#### toAABB()

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

The unit box this block occupies.

**Returns**

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

***

#### west()

> **west**(): `BlockPos`

The position one block west (negative X).

**Returns**

`BlockPos`
