Class BiomeManager

java.lang.Object
net.minestom.server.world.biomes.BiomeManager

public final class BiomeManager
extends java.lang.Object
Allows servers to register custom dimensions. Also used during player joining to send the list of all existing dimensions.

Contains Biome.PLAINS by default but can be removed.

  • Constructor Summary

    Constructors 
    Constructor Description
    BiomeManager()  
  • Method Summary

    Modifier and Type Method Description
    void addBiome​(Biome biome)
    Adds a new biome.
    Biome getById​(int id)
    Gets a biome by its id.
    Biome getByName​(NamespaceID namespaceID)  
    void removeBiome​(Biome biome)
    Removes a biome.
    org.jglrxavpok.hephaistos.nbt.NBTCompound toNBT()  
    java.util.Collection<Biome> unmodifiableCollection()
    Returns an immutable copy of the biomes already registered.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • addBiome

      public void addBiome​(Biome biome)
      Adds a new biome. This does NOT send the new list to players.
      Parameters:
      biome - the biome to add
    • removeBiome

      public void removeBiome​(Biome biome)
      Removes a biome. This does NOT send the new list to players.
      Parameters:
      biome - the biome to remove
    • unmodifiableCollection

      public java.util.Collection<Biome> unmodifiableCollection()
      Returns an immutable copy of the biomes already registered.
      Returns:
      an immutable copy of the biomes already registered
    • getById

      public Biome getById​(int id)
      Gets a biome by its id.
      Parameters:
      id - the id of the biome
      Returns:
      the Biome linked to this id
    • getByName

      public Biome getByName​(NamespaceID namespaceID)
    • toNBT

      public org.jglrxavpok.hephaistos.nbt.NBTCompound toNBT()