Class Biome

java.lang.Object
cn.nukkit.level.biome.Biome
All Implemented Interfaces:
BlockID
Direct Known Subclasses:
CoveredBiome, HellBiome, 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

      public void populateChunk(ChunkManager level, 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()
    • setBaseHeight

      public void setBaseHeight(float baseHeight)
    • setHeightVariation

      public void setHeightVariation(float heightVariation)
    • getBaseHeight

      public float getBaseHeight()
    • getHeightVariation

      public float getHeightVariation()
    • 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()