Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to create custom biomes. Note that Minecraft has a limit of 256 biomes and there are already more than 100 vanilla biomes, so do not overuse this functionality. See {@page Biomes}

Hierarchy

  • CustomBiome

Index

Constructors

  • Crates a new custom biome with specified string identifier

    Parameters

    • name: string

      string identifier of the biome

    Returns CustomBiome

Properties

id: number

custom biome numeric id

name: string

Custom biome name

pointer: number

Pointer to biome's native object, represented as long number

Methods

  • isInvalid(): boolean
  • setAdditionalBlock(id: number, data: number): CustomBiome
  • This method is mapped on native parameter with the same name and its effect is currently not known

    deprecated

    use CustomBiome.setSeaFloorBlock instead

    Parameters

    • id: number

      block's tile id

    • data: number

      block data

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • Defines the client-side biome params from given JSON string. Throws [[java.lang.IllegalArgumentException]] if the string cannot be parsed.

    Parameters

    • json: string

    Returns CustomBiome

    reference to itself to be used in sequential calls

    // many thanks to DansZbar2 for the example
    var cherry = new CustomBiome("environmental_cherry");
    cherry.setClientJson(JSON.stringify({
    "water_surface_color": "#d176e1",
    "water_fog_color": "#a35dc2",
    "water_surface_transparency": 0.7,
    "water_fog_distance": 11,
    "fog_identifier": "environmental:environmental_cherry" // custom fog defined in the addon
    }));
  • Specifies the block that will cover the biome. E.g. most of the biomes use grass as cover block, though some of the biomes use other blocks (sand, ice, etc.)

    Parameters

    • id: number

      block's tile id

    • data: number

      block data

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • Sets the block that fills the terrain. Vanilla biomes use stone filling

    Parameters

    • id: number

      block's tile id

    • data: number

      block data

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • Sets biome's foliage color

    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 CustomBiome

    reference to itself to be used in sequential calls

  • Sets biome's foliage color

    Parameters

    • color: number

      integer color value (you can specify it using hex value)

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • Sets biome's grass color. Grass color is interpolated on the bounds of the biome

    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 CustomBiome

    reference to itself to be used in sequential calls

  • Sets biome's grass color. Grass color is interpolated on the bounds of the biome

    Parameters

    • color: number

      integer color value (you can specify it using hex value)

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • setSeaFloorBlock(id: number, data: number): CustomBiome
  • Sets the block that fills the floor at the bottom of the sea or the ocean. Vanilla biomes use gravel or stone filling

    Parameters

    • id: number

      block's tile id

    • data: number

      block data

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • Sets the average depth of the see floor in this biome.

    Parameters

    • depth: number

      depth of the see floor by Y-axis

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • Defines the server-side biome params from given JSON string. Throws [[java.lang.IllegalArgumentException]] if the string cannot be parsed.

    Parameters

    • json: string

    Returns CustomBiome

    reference to itself to be used in sequential calls

    // many thanks to DansZbar2 for the example
    var cherry = new CustomBiome("environmental_cherry");
    cherry.setServerJson(JSON.stringify({
    "minecraft:climate": {
    "downfall": 0.0,
    "snow_accumulation": [ 0.0, 0.0 ],
    "temperature": 2.0,
    "blue_spores": 0,
    "red_spores": 0,
    "white_ash": 0,
    "ash": 0
    },
    "minecraft:overworld_height": {
    "noise_type": "default"
    },
    "animal": {},
    "monster": {},
    "overworld": {},
    "environmental_cherry": {},
    "minecraft:surface_parameters": {
    "top_material": "minecraft:grass",
    "mid_material": "minecraft:dirt",
    "foundation_material": "minecraft:stone",
    "sea_floor_material": "minecraft:clay",
    "sea_material": "minecraft:water",
    "sea_floor_depth": 7
    },
    "minecraft:overworld_generation_rules": {
    "hills_transformation": "jungle_hills",
    "generate_for_climates": [
    [ "cold", 5 ],
    [ "medium", 20 ],
    [ "warm", 35 ],
    ]
    }
    }));
  • Sets biome's sky color

    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 CustomBiome

    reference to itself to be used in sequential calls

  • Sets biome's sky color

    Parameters

    • color: number

      integer color value (you can specify it using hex value)

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • Specifies the block that will be under the covering block of the biome. E.g. most of the biomes use dirt as cover block, though some of the biomes use other blocks

    Parameters

    • id: number

      block's tile id

    • data: number

      block data

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • This method is mapped on native parameter with the same name and its effect is currently not known

    deprecated

    use CustomBiome.setSeaFloorDepth

    Parameters

    • param: number

      some integer parameter. Default value is 7

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • setTemperatureAndDownfall(temperature: number, downfall: number): CustomBiome
  • Sets biome's temperature and downfall

    Parameters

    • temperature: number

      temperature value, from 0 to 1

    • downfall: number

      downfall value, from 0 to 1

    Returns CustomBiome

    reference to itself to be used in sequential calls

  • Sets biome's water color

    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 CustomBiome

    reference to itself to be used in sequential calls

  • Sets biome's water color

    Parameters

    • color: number

      integer color value (you can specify it using hex value)

    Returns CustomBiome

    reference to itself to be used in sequential calls

Generated using TypeDoc