public class BrownMushroomTree extends GenericTree
Modifier and Type | Field and Description |
---|---|
protected org.bukkit.Material |
type |
delegate, height, leavesType, logType, overridables
PLANT_TYPES
Constructor and Description |
---|
BrownMushroomTree(Random random,
BlockStateDelegate delegate)
Initializes this mushroom with a random height, preparing it to attempt to generate.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canPlace(int baseX,
int baseY,
int baseZ,
org.bukkit.World world)
Checks whether this tree has enough space to grow.
|
boolean |
canPlaceOn(org.bukkit.block.BlockState soil)
Checks whether this tree can grow on top of the given block.
|
boolean |
generate(org.bukkit.World world,
Random random,
int blockX,
int blockY,
int blockZ)
Generates this feature.
|
blockTypeAt, canHeightFit, cannotGenerateAt, generate, replaceIfAirOrLeaves, setHeight, setOverridables, setTypes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
killPlantAbove
public BrownMushroomTree(Random random, BlockStateDelegate delegate)
random
- the PRNGdelegate
- the BlockStateDelegate used to check for space and to fill wood and leafpublic boolean canPlaceOn(org.bukkit.block.BlockState soil)
GenericTree
canPlaceOn
in class GenericTree
soil
- the block we're growing onpublic boolean canPlace(int baseX, int baseY, int baseZ, org.bukkit.World world)
GenericTree
canPlace
in class GenericTree
baseX
- the X coordinate of the base of the trunkbaseY
- the Y coordinate of the base of the trunkbaseZ
- the Z coordinate of the base of the trunkworld
- the world to grow inpublic boolean generate(org.bukkit.World world, Random random, int blockX, int blockY, int blockZ)
TerrainObject
generate
in interface TerrainObject
generate
in class GenericTree
world
- the world to generate inrandom
- the PRNG that will choose the size and a few details of the shapeblockX
- the base X coordinateblockY
- the base Y coordinateblockZ
- the base Z coordinateCopyright © 2021. All rights reserved.