Class CustomBiome

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.

Constructors

Methods

  • 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.

    Use CustomBiome.setSurfaceBlock instead.

  • Defines the client-side biome params from given JSON string.

    Parameters

    • json: string

    Returns CustomBiome

    Reference to itself to be used in sequential calls.

    Java java.lang.IllegalArgumentException if the string cannot be parsed.

    Many thanks to DansZbar2 for the example!

    const CHERRY_BIOME = new CustomBiome("environmental_cherry");
    CHERRY_BIOME.setClientJson(JSON.stringify({
    "water_surface_color": "#d176e1",
    "water_fog_color": "#a35dc2",
    "water_surface_transparency": 0.7,
    "water_fog_distance": 11,
    // custom fog defined in the addon
    "fog_identifier": "environmental:environmental_cherry"
    }));

    2.2.0b1 pre-alpha

  • 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.

  • 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.

    2.2.0b1 pre-alpha

  • Sets the average depth of the sea 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.

    2.2.0b1 pre-alpha

  • Defines the server-side biome params from given JSON string.

    Parameters

    • json: string

    Returns CustomBiome

    Reference to itself to be used in sequential calls.

    Java java.lang.IllegalArgumentException if the string cannot be parsed.

    Many thanks to DansZbar2 for the example!

    const CHERRY_BIOME = new CustomBiome("environmental_cherry");
    CHERRY_BIOME.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 ]
    ]
    }
    }));

    2.2.0b1 pre-alpha

  • 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.

    2.4.0b120

  • 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.

  • 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.

  • Internal

    Called when server stopped to cleanup biome synced IDs.

    Returns void

    2.3.1b116

  • Internal

    Called when server detection packet received.

    Parameters

    Returns void

    2.3.1b116

Properties

id: number

custom biome numeric ID.

name: string

Custom biome name.

pointer: number

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

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.