Class Biome

java.lang.Object
cn.nukkit.level.biome.Biome
All Implemented Interfaces:
BlockID
Direct Known Subclasses:
CaveBiome, CoveredBiome, HellBiome, JaggedPeaksBiome, MangroveSwampBiome, NetherBiome, TheEndBiome

public abstract class Biome extends Object implements BlockID
Author:
MagicDroidX (Nukkit Project)
  • Field Details

    • MAX_BIOMES

      public static final int MAX_BIOMES
      See Also:
    • biomes

      public static final Biome[] biomes
    • unorderedBiomes

      public static final List<Biome> unorderedBiomes
  • Constructor Details

    • Biome

      public Biome()
  • Method Details

    • getBiomeNameFromId

      public static String getBiomeNameFromId(int biomeId)
    • getBiomeIdOrCorrect

      public static int getBiomeIdOrCorrect(int biomeId)
    • register

      protected static void register(int id, Biome biome)
    • getBiome

      public static Biome getBiome(int id)
    • getBiome

      public static Biome getBiome(String name)
      Get Biome by name.
      Parameters:
      name - Name of biome. Name could contain symbol "_" instead of space
      Returns:
      Biome. Null - when biome was not found
    • clearPopulators

      public void clearPopulators()
    • addPopulator

      public void addPopulator(Populator populator)
    • populateChunk

      @Deprecated @DeprecationDetails(since="1.19.50-r3", reason="populators will be modified by plugins in event calls.", replaceWith="populateChunk(ChunkManager, List<Populator>, int, int, NukkitRandom)") public void populateChunk(@NotNull ChunkManager level, int chunkX, int chunkZ, NukkitRandom random)
      Deprecated.
    • populateChunk

      public void populateChunk(@NotNull ChunkManager level, @NotNull List<Populator> usedPopulators, int chunkX, int chunkZ, NukkitRandom random)
    • getPopulators

      public ArrayList<Populator> getPopulators()
    • getId

      public int getId()
    • setId

      public void setId(int id)
    • getName

      public abstract String getName()
    • getBaseHeight

      public float getBaseHeight()
    • setBaseHeight

      public void setBaseHeight(float baseHeight)
    • getHeightVariation

      public float getHeightVariation()
    • setHeightVariation

      public void setHeightVariation(float heightVariation)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • isFreezing

      public boolean isFreezing()
    • doesOverhang

      public boolean doesOverhang()
      Whether or not overhangs should generate in this biome (places where solid blocks generate over air)

      This should probably be used with a custom max elevation or things can look stupid

      Returns:
      overhang
    • getHeightOffset

      public int getHeightOffset(int x, int z)
      How much offset should be added to the min/max heights at this position
      Parameters:
      x - x
      z - z
      Returns:
      height offset
    • canRain

      public boolean canRain()
    • isDry

      @PowerNukkitOnly @Since("1.4.0.0-PN") public boolean isDry()