Class BiomeManager

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

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

  • Constructor Details

    • BiomeManager

      public BiomeManager()
  • Method Details

    • loadVanillaBiomes

      public void loadVanillaBiomes()
    • addBiome

      public void addBiome(@NotNull @NotNull 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(@NotNull @NotNull Biome biome)
      Removes a biome. This does NOT send the new list to players.
      Parameters:
      biome - the biome to remove
    • unmodifiableCollection

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

      @Nullable public @Nullable 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

      @Nullable public @Nullable Biome getByName(@NotNull @NotNull NamespaceID namespaceID)
    • getByName

      @Nullable public @Nullable Biome getByName(@NotNull @NotNull String namespaceID)
    • toNBT

      @NotNull public @NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound toNBT()
    • getId

      public int getId(Biome biome)
      Gets the id of a biome. `
      Parameters:
      biome -
      Returns:
      the id of the biome, or -1 if the biome is not registered