Class ArbitraryBiomeShape

java.lang.Object
com.sk89q.worldedit.regions.shape.ArbitraryBiomeShape

public abstract class ArbitraryBiomeShape extends Object
Generates solid and hollow shapes according to materials returned by the getBiome(int, int, int, com.sk89q.worldedit.world.biome.BiomeType) method.
  • Constructor Details

    • ArbitraryBiomeShape

      public ArbitraryBiomeShape(Region extent)
  • Method Details

    • getExtent

      protected Iterable<BlockVector3> getExtent()
    • getBiome

      protected abstract BiomeType getBiome(int x, int y, int z, BiomeType defaultBaseBiome)
      Override this function to specify the shape to generate.
      Parameters:
      x - X coordinate to be queried
      z - Z coordinate to be queried
      defaultBaseBiome - The default biome for the current column.
      Returns:
      material to place or null to not place anything.
    • generate

      public int generate(EditSession editSession, BiomeType baseBiome, boolean hollow)
      Generates the shape.
      Parameters:
      editSession - The EditSession to use.
      baseBiome - The default biome type.
      hollow - Specifies whether to generate a hollow shape.
      Returns:
      number of affected blocks.