Skip to content

API reference / @jsprismarine/prismarine / FlatGenerator

Class: FlatGenerator ​

Defined in: prismarine/src/world/generators/factories/flat.ts:52

Java's superflat generator: the settings' layers stacked from the dimension's floor, every block of the chunk in the settings' biome.

A layer whose block the content does not know is left as air, so a typo leaves a gap rather than refusing the world. Layers past the dimension's ceiling are dropped, as Java drops them.

Extends ​

  • default

Constructors ​

Constructor ​

new FlatGenerator(options): FlatGenerator

Defined in: prismarine/src/world/generators/factories/flat.ts:62

Parameters ​

options ​

FlatGeneratorOptions

Returns ​

FlatGenerator

Overrides ​

BaseGenerator.constructor

Properties ​

seaLevel ​

readonly seaLevel: -63 = FLAT_SEA_LEVEL

Defined in: prismarine/src/world/generators/factories/flat.ts:54

Inherit Doc ​

Methods ​

generateChunk() ​

generateChunk(cx, cz): Promise<Chunk>

Defined in: prismarine/src/world/generators/factories/flat.ts:69

Parameters ​

cx ​

number

cz ​

number

Returns ​

Promise<Chunk>

Inherit Doc ​

Overrides ​

BaseGenerator.generateChunk


surfaceAt() ​

surfaceAt(): SurfaceProbe

Defined in: prismarine/src/world/generators/factories/flat.ts:92

Returns ​

SurfaceProbe

Inherit Doc ​