Dimensions
Index
Classes
Interfaces
Type Aliases
Functions
Classes
CustomDimension
Class representing custom dimension.
constructor
Constructs a new dimension with specified name and preferred ID.
Parameters
name: string
dimension name, can be used to get dimension via Dimensions.getDimensionByName call
preferredId: number
preferred dimension ID. If ID is already occupied by some another dimension, constructor will look for the next empty dimension ID and assign it to the current dimension
Returns CustomDimension
id
Custom dimension ID.
hasSkyLight
Returns boolean
Whether the sky produces light in the current dimension.
resetCloudColor
Resets clouds color to the default value.
Returns CustomDimension
Reference to itself to be used in sequential calls.
resetFogColor
Resets fog color to the default value.
Returns CustomDimension
Reference to itself to be used in sequential calls.
resetFogDistance
Resets fog displaying distance.
Returns CustomDimension
Reference to itself to be used in sequential calls.
resetSkyColor
Resets sky color to the default value.
Returns CustomDimension
Reference to itself to be used in sequential calls.
resetSunsetColor
Resets sunset sky color to the default value.
Returns CustomDimension
Reference to itself to be used in sequential calls.
setCloudColor
Sets clouds color for the dimension in the RGB format. Default color is as in the Overworld.
Parameters
r: number
red color component, value from 0 to 1
g: number
green color component, value from 0 to 1
b: number
blue color component, value from 0 to 1
Returns CustomDimension
Reference to itself to be used in sequential calls.
setFogColor
Sets fog color for the dimension in the RGB format. Default color is as in the Overworld.
Parameters
r: number
red color component, value from 0 to 1
g: number
green color component, value from 0 to 1
b: number
blue color component, value from 0 to 1
Returns CustomDimension
Reference to itself to be used in sequential calls.
setFogDistance
Sets fog displaying distance.
Parameters
start: number
nearest fog distance
end: number
farthest fog distance
Returns CustomDimension
Reference to itself to be used in sequential calls.
setGenerator
Sets custom landscape generator.
Parameters
generator: CustomGenerator
custom landscape generator used for current dimension
Returns CustomDimension
Reference to itself to be used in sequential calls.
setHasSkyLight
Specifies whether the sky produces light (like in overworld) or not (like in the End or Nether).
Parameters
hasSkyLight: boolean
if true, the sky produces light in the dimension
Returns CustomDimension
Reference to itself to be used in sequential calls.
setSkyColor
Sets sky color for the dimension in the RGB format. Default color is as in the Overworld.
Parameters
r: number
red color component, value from 0 to 1
g: number
green color component, value from 0 to 1
b: number
blue color component, value from 0 to 1
Returns CustomDimension
Reference to itself to be used in sequential calls.
setSunsetColor
Sets sunset sky color for the dimension in the RGB format. Default color is as in the Overworld.
Parameters
r: number
red color component, value from 0 to 1
g: number
green color component, value from 0 to 1
b: number
blue color component, value from 0 to 1
Returns CustomDimension
Reference to itself to be used in sequential calls.
CustomGenerator
Class representing landscape generator used for the dimension.
constructor
Creates a new Dimensions.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
removeModGenerationBaseDimension
Disables mods generation in current generator.
Returns CustomGenerator
Reference to itself to be used in sequential calls.
setBuildVanillaSurfaces
Specifies whether to use vanilla biome surface cover blocks (grass, sand, podzol, etc.).
Parameters
value: boolean
if
true
, vanilla surface will be generated
Returns CustomGenerator
Reference to itself to be used in sequential calls.
setGenerateCaves
Determines whether the generator should generate underground and/or underwater caves as part of its result. Wworks only with the "overworld"1" and "flat" base types.
Parameters
caves: boolean
generate caves
optionalunderwaterCaves: boolean
generate large caves and canyons
Returns CustomDimension
setGenerateModStructures
Specifies whether to use mod's generation callbacks.
Parameters
value: boolean
if
true
, mod generation will be used
Returns CustomGenerator
Reference to itself to be used in sequential calls.
setGenerateVanillaStructures
Specifies whether to generate minecraft vanilla structures.
Parameters
value: boolean
if
true
, vanilla structures will be generated
Returns CustomGenerator
Reference to itself to be used in sequential calls.
setModGenerationBaseDimension
Specifies which of the generation Callbacks to call,
-1
to call no mods generation,0
to call overworld generation callback,1
for nether,2
for end generation callbacks.Parameters
id: number
generation callback to call
Returns CustomGenerator
Reference to itself to be used in sequential calls.
setTerrainGenerator
Sets terrain generator object used for the landscape generation.
Parameters
generator: AbstractTerrainGenerator
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.
MonoBiomeTerrainGenerator
Class representing terrain that consists of single biome.
constructor
Constructs new MonoBiomeTerrainGenerator instance with no terrain layers.
Returns MonoBiomeTerrainGenerator
addTerrainLayer
Parameters
minY: number
maxY: number
Returns TerrainLayer
setBaseBiome
Sets base biome for the current terrain.
Parameters
id: number
ID of the biome to be used as a single biome of the terrain layer
Returns MonoBiomeTerrainGenerator
NoiseConversion
Class representing noise conversion function. Used to define "density" of the landscape at a given height. Values between nodes are interpolated linearly.
constructor
Returns NoiseConversion
addNode
Adds a new node to the noise conversion function.
Parameters
x: number
value from 0 to 1 representing the height of the block in the terrain layer
y: number
landscape density at a given height, generally can be between -0.5 and 0.5. Values between nodes are interpolated linearly
Returns NoiseConversion
NoiseGenerator
Class representing multi-layer noise generator.
constructor
Returns NoiseGenerator
addLayer
Parameters
layer: NoiseLayer
Returns NoiseGenerator
setConversion
Parameters
conversion: NoiseConversion
Returns NoiseGenerator
NoiseLayer
Class representing single noise layer.
constructor
Returns NoiseLayer
addOctave
Parameters
octave: NoiseOctave
Returns NoiseLayer
setConversion
Parameters
conversion: NoiseConversion
Returns NoiseLayer
NoiseOctave
Class representing noise octave. Each noise layer consists of multiple noise octaves of different scale and weight.
constructor
Creates a new noise octave of specified type.
Parameters
optionaltype: number | NoiseOctaveStringType
numeric type constant or one of the following strings:
"perlin" (0) is a general-purpose noise generator.
Used to generate noise of completely random nature "gray" (1) "chess" (2)
The following sine noises are used to generate sinusoidal noise. Generally they should be used with some noise octaves of other types to avoid too mathematical landscapes "sine_x" (10) "sine_y" (11) "sine_z" (12) "sine_xy" (13) "sine_yz" (14) "sine_xz" (15) "sine_xyz" (16)
Returns NoiseOctave
setConversion
Parameters
conversion: NoiseConversion
Returns NoiseOctave
setScale
Parameters
x: number
y: number
z: number
Returns NoiseOctave
setSeed
Parameters
x: number
y: number
z: number
Returns NoiseOctave
setTranslate
Parameters
x: number
y: number
z: number
Returns NoiseOctave
setWeight
Parameters
weight: number
Returns NoiseOctave
Interfaces
AbstractTerrainGenerator
Interface representing terrain generator. All terrain generators found in Inner Core API implement this interface.
NoiseGeneratorParams
optionalconversion
layers
NoiseLayerParams
optionalconversion
octaves
NoiseOctaveParams
optionalconversion
optionalscale
optionalseed
optionaltype
Noise octave type, see Dimensions.NoiseOctave for details.
optionalweight
TerrainLayer
Class representing single terrain layer that may consist of several noise layers.
addNewMaterial
Parameters
generator: NoiseGenerator
priority: number
Returns TerrainMaterial
getMainMaterial
Returns TerrainMaterial
setHeightmapNoise
Parameters
generator: NoiseGenerator
Returns TerrainLayer
setMainNoise
Parameters
generator: NoiseGenerator
Returns TerrainLayer
setYConversion
Parameters
conversion: NoiseConversion
Returns TerrainLayer
TerrainLayerParams
optionalheightmap
optionalmaterial
optionalmaterials
maxY
minY
optionalnoise
optionalyConversion
TerrainMaterial
Class representing material that is used to generate terrain layer.
setBase
Parameters
id: number
data: number
Returns TerrainMaterial
setCover
Parameters
id: number
data: number
Returns TerrainMaterial
setDiffuse
Parameters
value: number
Returns TerrainMaterial
setFilling
Parameters
width: number
id: number
data: number
Returns TerrainMaterial
setSurface
Parameters
width: number
id: number
data: number
Returns TerrainMaterial
TerrainMaterialParams
optionalbase
optionalcover
optionaldiffuse
optionalfilling
optionalnoise
optionalsurface
Type Aliases
MaterialBlockData
NoiseConversionParams
NoiseOctaveStringType
Vec2Data
Vec3Data
Functions
getAllRegisteredCustomBiomes
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.
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
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.