Class CoveredBiome

java.lang.Object
cn.nukkit.level.biome.Biome
cn.nukkit.level.biome.type.CoveredBiome
All Implemented Interfaces:
BlockID
Direct Known Subclasses:
GrassyBiome, MesaBiome, SandyBiome, StoneBeachBiome, WateryBiome

public abstract class CoveredBiome extends Biome
Author:
DaPorkchop_ (Nukkit Project), joserobjr

A biome with ground covering

  • Field Details

  • Constructor Details

    • CoveredBiome

      public CoveredBiome()
  • Method Details

    • getCoverId

      public int getCoverId(int x, int z)
      A single block placed on top of the surface blocks
      Returns:
      cover block
    • getCoverBlock

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int getCoverBlock()
      A single block placed on top of the surface blocks
      Returns:
      cover block
    • getCoverState

      @PowerNukkitOnly @Since("1.4.0.0-PN") @NotNull public BlockState getCoverState(int x, int z)
      A single block placed on top of the surface blocks
      Returns:
      cover block
    • getSurfaceDepth

      public int getSurfaceDepth(int x, int y, int z)
    • getSurfaceDepth

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int getSurfaceDepth(int y)
      The amount of times the surface block should be used

      If < 0 bad things will happen!

      Parameters:
      y - y
      Returns:
      surface depth
    • getSurfaceId

      public int getSurfaceId(int x, int y, int z)
    • getSurfaceBlock

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int getSurfaceBlock(int y)
      Between cover and ground
      Parameters:
      y - y
      Returns:
      surface block
    • getSurfaceMeta

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int getSurfaceMeta(int y)
      The metadata of the surface block
      Parameters:
      y - y
      Returns:
      surface meta
    • getSurfaceState

      @PowerNukkitOnly @Since("1.4.0.0-PN") public BlockState getSurfaceState(int x, int y, int z)
    • getGroundDepth

      public int getGroundDepth(int x, int y, int z)
    • getGroundDepth

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int getGroundDepth(int y)
      The amount of times the ground block should be used

      If < 0 bad things will happen!

      Parameters:
      y - y
      Returns:
      ground depth
    • getGroundId

      public int getGroundId(int x, int y, int z)
    • getGroundBlock

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int getGroundBlock(int y)
      Between surface and stone
      Parameters:
      y - y
      Returns:
      ground block
    • getGroundMeta

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int getGroundMeta(int y)
      The metadata of the ground block
      Parameters:
      y - y
      Returns:
      ground meta
    • getGroundState

      @PowerNukkitOnly @Since("1.4.0.0-PN") public BlockState getGroundState(int x, int y, int z)
    • getStoneBlock

      @PowerNukkitOnly @Since("1.4.0.0-PN") public int getStoneBlock()
      The block used as stone/below all other surface blocks
      Returns:
      stone block
    • preCover

      @PowerNukkitOnly @Since("1.4.0.0-PN") public void preCover(int x, int z)
      Called before a new block column is covered. Biomes can update any relevant variables here before covering.

      Biome covering is synchronized on the biome, so thread safety isn't an issue.

      Parameters:
      x - x
      z - z
    • doCover

      public void doCover(int x, int z, @NotNull FullChunk chunk)
    • useNewRakNetCover

      @PowerNukkitOnly @Since("1.4.0.0-PN") protected boolean useNewRakNetCover()
    • useNewRakNetSurfaceDepth

      @PowerNukkitOnly @Since("1.4.0.0-PN") protected boolean useNewRakNetSurfaceDepth()
    • useNewRakNetSurface

      @PowerNukkitOnly @Since("1.4.0.0-PN") protected boolean useNewRakNetSurface()
    • useNewRakNetGroundDepth

      @PowerNukkitOnly @Since("1.4.0.0-PN") protected boolean useNewRakNetGroundDepth()
    • useNewRakNetGround

      @PowerNukkitOnly @Since("1.4.0.0-PN") protected boolean useNewRakNetGround()
    • attemptToUseNewRakNet

      @PowerNukkitOnly @Since("1.4.0.0-PN") protected boolean attemptToUseNewRakNet(Runnable method, Supplier<Boolean> flagGetter, Consumer<Boolean> flagSetter)