public class OreVein extends Object implements TerrainObject
PLANT_TYPES
Constructor and Description |
---|
OreVein(OreType oreType)
Creates the instance for a given ore type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
generate(org.bukkit.World world,
Random random,
int sourceX,
int sourceY,
int sourceZ)
Generates this feature.
|
protected static double |
normalizedSquaredCoordinate(double origin,
double radius,
int x)
The square of the percentage of the radius that is the distance between the given block's
center and the center of an orthogonal ellipsoid.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
killPlantAbove
public OreVein(OreType oreType)
oreType
- the ore typepublic boolean generate(org.bukkit.World world, Random random, int sourceX, int sourceY, int sourceZ)
TerrainObject
generate
in interface TerrainObject
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 coordinateprotected static double normalizedSquaredCoordinate(double origin, double radius, int x)
origin
- the center of the spheroidradius
- the spheroid's radius on this axisx
- the raw coordinateCopyright © 2021. All rights reserved.