public abstract class FractalTree extends Object
Constructor and Description |
---|
FractalTree(org.bukkit.Location origin,
Random random)
Instantiates a TreeGrower at an origin location.
|
Modifier and Type | Method and Description |
---|---|
org.bukkit.Material |
getMaterial(org.bukkit.Location l)
Gets the material at the specified block.
|
org.bukkit.Location |
getOrigin()
Fetches the origin location.
|
Random |
getRandom()
Fetches the Random object used to generate the tree.
|
Map<org.bukkit.Location,org.bukkit.block.data.BlockData> |
getTree()
Gets the raw tree map.
|
abstract void |
grow()
Grows the tree in memory.
|
void |
plant()
Pastes the tree in the world.
|
void |
setBlock(org.bukkit.Location l,
org.bukkit.Material m)
Sets a block in the tree's storage map to a material.
|
void |
spawnEntity(org.bukkit.Location spawn,
Class clazz,
org.bukkit.util.Consumer<org.bukkit.entity.Entity> consumer) |
public FractalTree(org.bukkit.Location origin, Random random)
origin
- - The origin location.random
- - The random object to use whilst generating the tree.public Map<org.bukkit.Location,org.bukkit.block.data.BlockData> getTree()
public Random getRandom()
public org.bukkit.Location getOrigin()
public void setBlock(org.bukkit.Location l, org.bukkit.Material m)
l
- - The location to set.m
- - The material to which it will be set.public abstract void grow()
public void plant()
public void spawnEntity(org.bukkit.Location spawn, Class clazz, org.bukkit.util.Consumer<org.bukkit.entity.Entity> consumer)
public org.bukkit.Material getMaterial(org.bukkit.Location l)
l
- - The location at which to check.Copyright © 2020. All rights reserved.