public class GroundCoverLayer extends Object
Constructor and Description |
---|
GroundCoverLayer(BlockState type)
Creates a new
GroundCoverLayer with the given BlockState and a
base depth of 1. |
GroundCoverLayer(BlockState type,
double depth)
Creates a new
GroundCoverLayer with the given BlockState and base
depth. |
GroundCoverLayer(BlockState type,
double depth,
double depthVariance)
Creates a new
GroundCoverLayer with the given BlockState and
depth. |
Modifier and Type | Method and Description |
---|---|
double |
getBaseDepth()
Gets the base depth of this layer.
|
double |
getDepthVariance()
Gets the possible variance of the depth of this layer.
|
BlockState |
getState()
Gets the
BlockState for this layer. |
void |
setBaseDepth(double depth)
Sets the base depth of this layer.
|
void |
setDepthVariance(double variance)
Sets the possible variance of the depth of this layer.
|
void |
setState(BlockState state)
Sets the
BlockState for this layer. |
public GroundCoverLayer(BlockState type)
GroundCoverLayer
with the given BlockState and a
base depth of 1.type
- The BlockState of the layerpublic GroundCoverLayer(BlockState type, double depth)
GroundCoverLayer
with the given BlockState and base
depth.type
- The BlockState of the layerdepth
- The layer depthpublic GroundCoverLayer(BlockState type, double depth, double depthVariance)
GroundCoverLayer
with the given BlockState and
depth. The final depth of the layer will vary randomly between
depth
and depth+depthVariance
(both inclusive).type
- The BlockState of the layerdepth
- The layer depthdepthVariance
- The depth variancepublic BlockState getState()
BlockState
for this layer.public void setState(BlockState state)
BlockState
for this layer.state
- The new statepublic double getBaseDepth()
public void setBaseDepth(double depth)
depth
- The new base depthpublic double getDepthVariance()
public void setDepthVariance(double variance)
variance
- The new depth variance