Dimensions
Index
Classes
Interfaces
Type Aliases
Functions
Type Aliases
MaterialBlockData
NoiseConversionParams
NoiseOctaveStringType
Vec2Data
Vec3Data
Functions
getAllRegisteredCustomBiomes
- since: 2.2.1b93
Returns {}
JS object instance, containing all registered custom biomes.
[key string]: CustomBiome
getDimensionById
Parameters
id: number
dimension ID
Returns CustomDimension
Custom dimension by it's numeric ID.
getDimensionByName
Parameters
name: string
dimension name
Returns CustomDimension
Dimension by it's string name specified in CustomDimension constructor.
getMoonBrightness
- since: 3.1.0b126
Returns floating number in range [0, 1], which represents chance to spawn slimes, equipped mobs, etc. (see https://minecraft.wiki/w/Moon)
Parameters
dimensionId: number
numeric id of the dimension
Returns number
getMoonPhase
- since: 3.1.0b126
Returns number between 0 and 7 (inclusive), which represents chance to spawn slimes, equipped mobs, etc. (see https://minecraft.wiki/w/Moon)
Parameters
dimensionId: number
numeric id of the dimension
Returns number
isLimboId
Parameters
id: number
dimension ID
Returns boolean
true, if dimension is a limbo dimension; limbo dimension is created by Horizon automatically if you try to teleport the player to non-existing dimension
newGenerator
Function used to simplify the creation of terrain generator by passing a json-like structure as a single generator parameter.
Parameters
description: { base?: string | number; biome?: number; buildVanillaSurfaces?: boolean; generateVanillaStructures?: boolean; layers?: TerrainLayerParams[]; modWorldgenDimension?: string | number; type?: string }
object containing all the required generator information
optionalbase: string | number
Specifies base generator, see CustomGenerator constructor for details.
optionalbiome: number
Sets base biome for the current terrain, applicable only to "mono".
optionalbuildVanillaSurfaces: boolean
Specifies whether to use vanilla biome surface cover blocks (grass, sand, podzol, etc.).
See setBuildVanillaSurfaces for details.
optionalgenerateVanillaStructures: boolean
Specifies whether to generate minecraft vanilla structures.
See setGenerateVanillaStructures for details.
optionallayers: TerrainLayerParams[]
An array of terrain layers descriptions, each one representing it's own terrain layer.
See MonoBiomeTerrainGenerator.addTerrainLayer for details.
optionalmodWorldgenDimension: string | number
Can be either string for an existing dimensions ("overworld", "nether", "end") or -1 to disable mods generation.
See setModGenerationBaseDimension for details.
optionaltype: string
Specifies what generator type to use. Default and the only currently available option is "mono", that is equivalent to creating a MonoBiomeTerrainGenerator.
Returns CustomGenerator
overrideGeneratorForVanillaDimension
Overrides default generator of vanilla dimension.
Parameters
id: number
vanilla dimension ID, one of the EDimension values
generator: CustomGenerator
custom landscape generator used for vanilla dimension
Returns void
setEvaporatesLiquids
Function to set, can liquid evaporate or not.
Parameters
dimensionId: number
numeric id of the dimension
evaporates: boolean
if true water will evaporate just like nether
Returns void
setHasSkyLight
Function specifies whether the sky produces light (like in overworld) or not (like in the End or Nether).
Parameters
dimensionId: number
numeric id of the dimension
hasSkyLight: boolean
if true, the sky produces light in the dimension
Returns void
setShouldRenderClouds
Function to enable or disable clouds.
Parameters
dimensionId: number
numeric id of the dimension
enabled: boolean
Returns void
setShouldRenderMoon
Function to enable or disable moon by nights.
Parameters
dimensionId: number
numeric id of the dimension
enabled: boolean
Returns void
setShouldRenderStars
Function to enable or disable stars by nights.
Parameters
dimensionId: number
numeric id of the dimension
enabled: boolean
Returns void
setShouldRenderSun
Function to enable or disable sun by days.
Parameters
dimensionId: number
numeric id of the dimension
enabled: boolean
Returns void
setWeatherSeasons
Function to set, has world tick of weather seasons or not.
Parameters
dimensionId: number
numeric id of the dimension
seasons: boolean
if true weather will work
Returns void
transfer
Transfers specified entity to the dimension with specified ID.
Parameters
entity: number
numeric ID of the
dimensionId: number
numeric ID of the dimension to transfer the entity to
Returns void
Namespace used to create and manipulate custom dimensions.