Minecraft基岩版开发Wiki:ICMod函式表/Dimensions.CustomGenerator

出自Minecraft基岩版开发Wiki

Dimensions.CustomGenerator is a class representing landscape generator used for the dimension.

Constructors[編輯]

constructor[編輯]

new CustomGenerator(baseType: number): CustomGenerator

Creates a new CustomGenerator instance using specified base type

Parameters[編輯]

baseType number
base generator type constant, can be from 0 to 4. 0 and 1 represent overworld generator, 2 represents flat world generator, 3 represents nether generator and 4 represents end generator

Returns[編輯]

CustomGenerator

Methods[編輯]

setBuildVanillaSurfaces[編輯]

setBuildVanillaSurfaces(value: boolean): CustomGenerator

Specifies whether to use vanilla biome surface cover blocks (grass, sand, podzol, etc.)

Parameters[編輯]

value boolean
if true, vanilla surface will be generated, default value is false

Returns[編輯]

CustomGenerator
reference to itself to be used in sequential calls

setGenerateModStructures[編輯]

setGenerateModStructures(value: boolean): CustomGenerator

Specifies whether to use mod's generation callbacks

Parameters[編輯]

value boolean
if true, mod generation will be used, default value is true

Returns[編輯]

CustomGenerator
reference to itself to be used in sequential calls

setGenerateVanillaStructures[編輯]

setGenerateVanillaStructures(value: boolean): CustomGenerator

Specifies whether to generate minecraft vanilla structures

Parameters[編輯]

value boolean
if true, vanilla structures will be generated, default value is false

Returns[編輯]

CustomGenerator
reference to itself to be used in sequential calls

setTerrainGenerator[編輯]

setTerrainGenerator(generator: AbstractTerrainGenerator | null): CustomGenerator

Sets terrain generator object used for the landscape generation

Parameters[編輯]

generator AbstractTerrainGenerator | null
terrain generator to be used with current landscape generator or removes terrain generator, if the value is null

Returns[編輯]

CustomGenerator
reference to itself to be used in sequential calls