public class OrganicSpread
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
OrganicSpread.IOrganicSpreadable
Interface for organically spreadable things.
|
| Constructor and Description |
|---|
OrganicSpread(net.minecraft.world.World world,
int dimensions,
int radius,
OrganicSpread.IOrganicSpreadable spreadable)
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDimensions() |
int |
getRadius() |
protected float[] |
getRandomDirection()
Get a random direction to spread in.
|
OrganicSpread.IOrganicSpreadable |
getSpreadable() |
protected boolean |
isBigEnough(float[] direction) |
protected boolean |
isInArea(ILocation center,
float[] location) |
void |
setDimensions(int dimensions) |
void |
setRadius(int radius) |
void |
setSpreadable(OrganicSpread.IOrganicSpreadable spreadable) |
void |
spreadTick(ILocation startLocation)
Perform one spreading tick so that one new block will be spread to.
|
public OrganicSpread(net.minecraft.world.World world,
int dimensions,
int radius,
OrganicSpread.IOrganicSpreadable spreadable)
world - The world.dimensions - The amount of dimensions in which this spreading should happen.radius - The radius in which the spreading should happen.spreadable - The spreadable object.public int getRadius()
public void setRadius(int radius)
radius - the radius to setpublic int getDimensions()
public void setDimensions(int dimensions)
dimensions - the dimensions to set.public OrganicSpread.IOrganicSpreadable getSpreadable()
public void setSpreadable(OrganicSpread.IOrganicSpreadable spreadable)
spreadable - the spreadable to setpublic void spreadTick(ILocation startLocation)
startLocation - The location to start spreading from.protected boolean isInArea(ILocation center, float[] location)
protected boolean isBigEnough(float[] direction)
protected float[] getRandomDirection()