Trees class abstract final

Tree shapes drawn on a TreeCanvas at the stump (x, y, z), where y is the first air cell above the ground. hsh is the tree's own roll (a scatter grid's spot hash), so the same tree is drawn in every chunk.

Every shape joins its blocks by faces: a diagonal step is taken one axis at a time, because two blocks that meet at an edge hold nothing and the canvas's flood fill would drop the far one.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

bigOak(TreeCanvas c, int x, int y, int z, int trunk, int hsh, TreeBlocks b) → void
The forest giant: a 2 x 2 trunk, four limbs and a crown five blocks wide.
crown(TreeCanvas c, int x, int y, int z, int r, int leaves) → void
A rounded crown: a ball of leaves r wide, squashed in y and frayed at the rim so no two look stamped from the same mould. Its centre block is always laid, which is what hangs the ball on the trunk it surrounds.
frond(TreeCanvas c, int x, int y, int z, int dx, int dz, int len, int leaves) → void
One frond of a palm: leaves stepping out a face at a time from the crown's heart, drooping by one block at the tip.
jungle(TreeCanvas c, int x, int y, int z, int trunk, int hsh, TreeBlocks b) → void
The jungle giant: a 2 x 2 trunk, a crown at the top, a second halfway up, and vines falling from both rims.
limb(TreeCanvas c, int x, int y, int z, int dx, int dz, int len, int log, int leaves) → void
A limb: len steps out along (dx, dz), rising every other one, with a small crown on its end.
oak(TreeCanvas c, int x, int y, int z, int trunk, int hsh, TreeBlocks b) → void
The oak: a bare trunk trunk blocks tall, two limbs near the top and a rounded crown over them; nothing of it hangs at head height.
palm(TreeCanvas c, int x, int y, int z, int trunk, int hsh, TreeBlocks b) → void
The palm: a bare leaning trunk under a star of fronds. The lean steps one axis at a time, so the trunk climbs by faces.
spruce(TreeCanvas c, int x, int y, int z, int trunk, TreeBlocks b) → void
The spruce: a tall bare trunk under tiers that widen downward.
vineFall(TreeCanvas c, int x, int y, int z, int r, int hsh, int vines) → void
Vines falling 2-6 blocks from the rim of a crown r wide, only where the canvas already holds a leaf to hang them on.
willow(TreeCanvas c, int x, int y, int z, int trunk, int hsh, TreeBlocks b) → void
The willow: a wide flat canopy whose rim droops in hanging leaf columns.

Constants

compass → const List<(int, int)>
The eight directions a limb or a frond can take.