Class BlockPatch

java.lang.Object
net.glowstone.generator.objects.BlockPatch
All Implemented Interfaces:
TerrainObject

public class BlockPatch extends Object implements TerrainObject
A patch replaces specified blocks within a cylinder. It will delete flowers, tall grass and mushrooms (but not crops, trees or desert vegetation) above it.
  • Field Summary

    Fields inherited from interface net.glowstone.generator.objects.TerrainObject

    PLANT_TYPES
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockPatch(org.bukkit.Material type, int horizRadius, int vertRadius, org.bukkit.Material... overridables)
    Creates a patch.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    generate(org.bukkit.World world, Random random, int sourceX, int sourceY, int sourceZ)
    Generates this feature.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BlockPatch

      public BlockPatch(org.bukkit.Material type, int horizRadius, int vertRadius, org.bukkit.Material... overridables)
      Creates a patch.
      Parameters:
      type - the ground cover block type
      horizRadius - the maximum radius on the horizontal plane
      vertRadius - the depth above and below the center
      overridables - the blocks that can be replaced
  • Method Details

    • generate

      public boolean generate(org.bukkit.World world, Random random, int sourceX, int sourceY, int sourceZ)
      Description copied from interface: TerrainObject
      Generates this feature.
      Specified by:
      generate in interface TerrainObject
      Parameters:
      world - the world to generate in
      random - the PRNG that will choose the size and a few details of the shape
      sourceX - the base X coordinate
      sourceY - the base Y coordinate
      sourceZ - the base Z coordinate
      Returns:
      true if successfully generated