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 net.minecraft.util.math.vector.Vector3d |
getRandomDirection()
Get a random direction to spread in.
|
OrganicSpread.IOrganicSpreadable |
getSpreadable() |
protected boolean |
isBigEnough(net.minecraft.util.math.vector.Vector3d direction) |
protected boolean |
isInArea(net.minecraft.util.math.BlockPos center,
net.minecraft.util.math.BlockPos location) |
void |
setDimensions(int dimensions) |
void |
setRadius(int radius) |
void |
setSpreadable(OrganicSpread.IOrganicSpreadable spreadable) |
void |
spreadTick(net.minecraft.util.math.BlockPos startLocation)
Perform one spreading tick so that one new blockState 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(net.minecraft.util.math.BlockPos startLocation)
startLocation - The location to start spreading from.protected boolean isInArea(net.minecraft.util.math.BlockPos center,
net.minecraft.util.math.BlockPos location)
protected boolean isBigEnough(net.minecraft.util.math.vector.Vector3d direction)
protected net.minecraft.util.math.vector.Vector3d getRandomDirection()