Package net.minestom.server.world.biomes
Class BiomeManager
java.lang.Object
net.minestom.server.world.biomes.BiomeManager
Allows servers to register custom dimensions. Also used during player joining to send the list of all existing dimensions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new biome.@Nullable Biome
getById
(int id) Gets a biome by its id.@Nullable Biome
@Nullable Biome
getByName
(@NotNull NamespaceID namespaceID) int
Gets the id of a biome.void
void
removeBiome
(@NotNull Biome biome) Removes a biome.@NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound
toNBT()
Returns an immutable copy of the biomes already registered.
-
Constructor Details
-
BiomeManager
public BiomeManager()
-
-
Method Details
-
loadVanillaBiomes
public void loadVanillaBiomes() -
addBiome
Adds a new biome. This does NOT send the new list to players.- Parameters:
biome
- the biome to add
-
removeBiome
Removes a biome. This does NOT send the new list to players.- Parameters:
biome
- the biome to remove
-
unmodifiableCollection
Returns an immutable copy of the biomes already registered.- Returns:
- an immutable copy of the biomes already registered
-
getById
Gets a biome by its id.- Parameters:
id
- the id of the biome- Returns:
- the
Biome
linked to this id
-
getByName
-
getByName
-
toNBT
@NotNull public @NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound toNBT() -
getId
Gets the id of a biome. `- Parameters:
biome
-- Returns:
- the id of the biome, or -1 if the biome is not registered
-