Seed Packets & Trees

Alternate behaviour for shrub placement, allows to plant shrubs on blocks, or the need of waiting for trees to grow.

Usually, you put the shrub on a palceable blocka nd you're done, it generates fruit. Using seed packets, you insteda plant the shrub on an already-palced block, buit using tree leaf density, you plant it as a sapling and wait for it to grow, scattering fruit-producing leaves throughout its folliage.


YML Format:

In a shrub type:

SeedPacket: '[Seed Packet Name]'

TreeLeafDensity: [Num]


In plugins/MMOItem_Shrubs/seed-packets.yml:

[Seed Packet Name]:

- DISPLAY &aTall Plants

- TALL_GRASS

- SUNFLOWER

- LARGE_FERN

- LILAC

- ROSE_BUSH

- PEONY

- [... Vanilla Material]

*Note that the DISPLAY line is how it will display in MMOItems lore if the stat is included in lore-format.yml

Seed Packet (none)

Specify a list of strings from seed-packets.yml config, to choose which blocks your shrub can be planted on.


Tree Leaf Density (0.0)

The percent of folliage that, when the sapling grows into a tree, will produce fruit.

Example

A shrub as a Tree Leaf Density of 0.1 (10%):

  • If put on a block that is not a sapling, it will behave normally and ignore the tree leaf density value.

  • If put on a sapling, it will produce nothing until it has grown:

    1. Upon growing, each of its leaves will check to be on the ouside = having at least one face exposed to air.

    2. Each of the outside leaves rolls for being fruit producing, with 10% success chance.

    3. If at least 10% of leaves did not succeed, they roll again until 10% have succeeded.

More Technical

When you make a consumable a seed packet, it will consume one unit every time a player successfuly plants it. Any other MMOItem type can be used indefinetely.

In the Seed Packet, you may specify one entry that is not vanilla material, marked by the display keyword.

If you integrate lore of shrubs into your MMOItems lore, it will use this line to tell players where to plant their shrub.