Class RedwoodTree
java.lang.Object
net.glowstone.generator.objects.trees.GenericTree
net.glowstone.generator.objects.trees.RedwoodTree
- All Implemented Interfaces:
TerrainObject
- Direct Known Subclasses:
TallRedwoodTree
-
Field Summary
Fields inherited from class net.glowstone.generator.objects.trees.GenericTree
delegate, height, LEAF_TYPES, leavesType, logType, overridables
Fields inherited from interface net.glowstone.generator.objects.TerrainObject
PLANT_TYPES
-
Constructor Summary
ConstructorDescriptionRedwoodTree
(Random random, BlockStateDelegate delegate) Initializes this tree with a random height, preparing it to attempt to generate. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlace
(int baseX, int baseY, int baseZ, org.bukkit.World world) Checks whether this tree has enough space to grow.boolean
Generates this feature.protected final void
setLeavesHeight
(int leavesHeight) protected final void
setMaxRadius
(int maxRadius) Methods inherited from class net.glowstone.generator.objects.trees.GenericTree
blockTypeAt, canHeightFit, cannotGenerateAt, canPlaceOn, generate, replaceIfAirOrLeaves, setHeight, setOverridables, setTypes
-
Field Details
-
maxRadius
protected int maxRadius -
leavesHeight
protected int leavesHeight
-
-
Constructor Details
-
RedwoodTree
Initializes this tree with a random height, preparing it to attempt to generate.- Parameters:
random
- the PRNGdelegate
- the BlockStateDelegate used to check for space and to fill wood and
-
-
Method Details
-
setMaxRadius
protected final void setMaxRadius(int maxRadius) -
setLeavesHeight
protected final void setLeavesHeight(int leavesHeight) -
canPlace
public boolean canPlace(int baseX, int baseY, int baseZ, org.bukkit.World world) Description copied from class:GenericTree
Checks whether this tree has enough space to grow.- Overrides:
canPlace
in classGenericTree
- Parameters:
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 in- Returns:
- true if this tree has space to grow; false otherwise
-
generate
Description copied from interface:TerrainObject
Generates this feature.- Specified by:
generate
in interfaceTerrainObject
- Overrides:
generate
in classGenericTree
- Parameters:
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 coordinate- Returns:
- true if successfully generated
-