> 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/client/multiplayer/clientlevel.md).

# ClientLevel

The world you are in, as the client knows it.

### Properties

#### dayTime

> `readonly` **dayTime**: `number`

Ticks on this dimension's default world clock; a day is 24000 ticks and 0 is sunrise.

**Remarks**

On the overworld take dayTime % 24000 for the time of day.

***

#### difficulty

> `readonly` **difficulty**: [`Difficulty`](/newgen/api/enum_types/difficulty.md)

The world difficulty.

***

#### dimension

> `readonly` **dimension**: `string`

The id of this world, e.g. "minecraft:overworld", "minecraft:the\_nether" or "minecraft:the\_end".

***

#### dimensionType

> `readonly` **dimensionType**: `string`

The id of this world's dimension type, which sets height, ceiling and day cycle. Usually matches the dimension.

**See**

[Dimension ids](https://minecraft.wiki/w/Java_Edition_data_values#Dimensions)

***

#### entities

> `readonly` **entities**: [`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)\[]

Every loaded entity, including the local player.

***

#### gameTime

> `readonly` **gameTime**: `number`

Ticks since the world was created.

***

#### height

> `readonly` **height**: `number`

The number of blocks from the bottom to the top of this world.

***

#### maxY

> `readonly` **maxY**: `number`

The highest Y of this world.

***

#### minY

> `readonly` **minY**: `number`

The lowest Y of this world.

***

#### players

> `readonly` **players**: [`Player`](/newgen/api/net/minecraft/world/entity/player/player.md)\[]

Every loaded player, including the local player.

***

#### raining

> `readonly` **raining**: `boolean`

Whether it is raining or snowing in this world.

***

#### rainLevel

> `readonly` **rainLevel**: `number`

How hard it is raining, 0 to 1.

***

#### seaLevel

> `readonly` **seaLevel**: `number`

The Y of the sea surface.

***

#### thundering

> `readonly` **thundering**: `boolean`

Whether there is a thunderstorm.

***

#### thunderLevel

> `readonly` **thunderLevel**: `number`

How strong the thunder is, 0 to 1.

***

#### worldBorder

> `readonly` **worldBorder**: [`WorldBorder`](/newgen/api/net/minecraft/world/level/border/worldborder.md)

The world border.

### Methods

#### canSeeSky()

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

Whether the sky is directly above a position.

**Parameters**

**pos**

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

The position.

**Returns**

`boolean`

***

#### clip()

> **clip**(`from`, `to`): [`BlockHitResult`](/newgen/api/net/minecraft/world/phys/blockhitresult.md)

Casts a ray between two points against block outlines.

**Parameters**

**from**

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

The start.

**to**

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

The end.

**Returns**

[`BlockHitResult`](/newgen/api/net/minecraft/world/phys/blockhitresult.md)

***

#### clipMode()

> **clipMode**(`from`, `to`, `block`, `fluid`): [`BlockHitResult`](/newgen/api/net/minecraft/world/phys/blockhitresult.md)

Casts a ray between two points with chosen block and fluid collision modes.

**Parameters**

**from**

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

The start.

**to**

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

The end.

**block**

[`ClipBlockMode`](/newgen/api/enum_types/clipblockmode.md)

Which block shapes the ray hits.

**fluid**

[`ClipFluidMode`](/newgen/api/enum_types/clipfluidmode.md)

Which fluids the ray hits.

**Returns**

[`BlockHitResult`](/newgen/api/net/minecraft/world/phys/blockhitresult.md)

***

#### getBiome()

> **getBiome**(`pos`): `string`

The biome id at a position, e.g. "minecraft:plains".

**Parameters**

**pos**

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

The position.

**Returns**

`string`

**See**

[Biome ids](https://minecraft.wiki/w/Java_Edition_data_values/Biomes)

***

#### getBlock()

> **getBlock**(`pos`): `string`

The block id at a position, e.g. "minecraft:stone".

**Parameters**

**pos**

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

The position.

**Returns**

`string`

***

#### getBlockEntityType()

> **getBlockEntityType**(`pos`): `string`

The block entity type id at a position, e.g. "minecraft:chest", or null if there is none.

**Parameters**

**pos**

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

The position.

**Returns**

`string`

***

#### getBlockLight()

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

The block light level at a position, 0 to 15.

**Parameters**

**pos**

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

The position.

**Returns**

`number`

***

#### getBlockState()

> **getBlockState**(`pos`): [`BlockState`](/newgen/api/net/minecraft/world/level/block/state/blockstate.md)

The block state at a position.

**Parameters**

**pos**

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

The position.

**Returns**

[`BlockState`](/newgen/api/net/minecraft/world/level/block/state/blockstate.md)

***

#### getEntitiesIn()

> **getEntitiesIn**(`box`): [`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)\[]

Every entity whose bounding box overlaps a box, including the local player.

**Parameters**

**box**

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

The box.

**Returns**

[`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)\[]

***

#### getEntitiesOfType()

> **getEntitiesOfType**(`entityType`, `box`): [`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)\[]

Every entity of one type whose bounding box overlaps a box.

**Parameters**

**entityType**

`string`

The entity type id, e.g. "minecraft:zombie".

**box**

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

The box.

**Returns**

[`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)\[]

**See**

[Entity ids](https://minecraft.wiki/w/Java_Edition_data_values/Entities)

***

#### getEntity()

> **getEntity**(`id`): [`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)

The entity with a network id, or null.

**Parameters**

**id**

`number`

The entity id.

**Returns**

[`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)

***

#### getFluidState()

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

The fluid at a position, empty if none.

**Parameters**

**pos**

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

The position.

**Returns**

[`FluidState`](/newgen/api/net/minecraft/world/level/material/fluidstate.md)

***

#### getHeight()

> **getHeight**(`type`, `x`, `z`): `number`

The Y of the first free block above the top block of a column, by the chosen heightmap.

**Parameters**

**type**

[`HeightmapType`](/newgen/api/enum_types/heightmaptype.md)

Which blocks count.

**x**

`number`

X coordinate.

**z**

`number`

Z coordinate.

**Returns**

`number`

***

#### getNearestPlayer()

> **getNearestPlayer**(`pos`, `range`): [`Player`](/newgen/api/net/minecraft/world/entity/player/player.md)

The closest player to a point, ignoring spectators, or null.

**Parameters**

**pos**

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

The point.

**range**

`number`

The maximum distance in blocks, or negative for no limit.

**Returns**

[`Player`](/newgen/api/net/minecraft/world/entity/player/player.md)

***

#### getRawBrightness()

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

The effective light level at a position, 0 to 15, counting the time of day.

**Parameters**

**pos**

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

The position.

**Returns**

`number`

***

#### getSkyLight()

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

The sky light level at a position, 0 to 15, ignoring the time of day.

**Parameters**

**pos**

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

The position.

**Returns**

`number`

***

#### isAir()

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

Whether a position holds no block.

**Parameters**

**pos**

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

The position.

**Returns**

`boolean`

***

#### isEmptyBlock()

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

Whether a position is air.

**Parameters**

**pos**

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

The position.

**Returns**

`boolean`

***

#### isLoaded()

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

Whether the chunk containing a position is loaded.

**Parameters**

**pos**

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

The position.

**Returns**

`boolean`

***

#### isSolid()

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

Whether a position holds a block you can't walk through.

**Parameters**

**pos**

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

The position.

**Returns**

`boolean`

***

#### noCollision()

> **noCollision**(`box`): `boolean`

Whether a box is free of blocks and the world border.

**Parameters**

**box**

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

The box.

**Returns**

`boolean`

***

#### noCollisionFor()

> **noCollisionFor**(`entity`, `box`): `boolean`

Whether a box is free of blocks, the world border and the entity's own collisions.

**Parameters**

**entity**

[`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)

The entity moving.

**box**

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

The box.

**Returns**

`boolean`
