Package net.glowstone.generator.objects
Class BlockPatch
java.lang.Object
net.glowstone.generator.objects.BlockPatch
- All Implemented Interfaces:
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
ConstructorDescriptionBlockPatch
(org.bukkit.Material type, int horizRadius, int vertRadius, org.bukkit.Material... overridables) Creates a patch. -
Method Summary
-
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 typehorizRadius
- the maximum radius on the horizontal planevertRadius
- the depth above and below the centeroverridables
- 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 interfaceTerrainObject
- Parameters:
world
- the world to generate inrandom
- the PRNG that will choose the size and a few details of the shapesourceX
- the base X coordinatesourceY
- the base Y coordinatesourceZ
- the base Z coordinate- Returns:
- true if successfully generated
-