Plugin to RANDOMLY replant saplings/sugercane/pumpkins/flowers automatically

Discussion in 'Archived: Plugin Requests' started by Jonathan Bloom, Jan 16, 2011.

  1. Offline

    Jonathan Bloom

    I'd like to see a plugin to take the existing map and RANDOMLY replant saplings, sugercane, pumpkins, and flowers automatically. Otherwise these will become hard to find resources.

    This would also create the sense that the server is an ecosystem and a natural world.
     
  2. Offline

    feverdream

    Doing this purely randomly however would be a problem. You really need to look at an area - scanning it - then sort of fill in the statistical growth holes and plant only where it makes sense.. just randomly planting them would not work.

    I don't even think you can plant a pumpkin... unless somebody would be kind enough to prove otherwise so I could learn something.
     
  3. Offline

    Jonathan Bloom

    Yeah, true. Is there some way to make this easier?

    I just don't like the idea of sugarcanes, flowers, and trees going away after you pick them. I'd like someway to regrow stuff.
     
  4. Offline

    MarkusNemesis

    i had this idea, but then i felt it may cause the server to be over run with flowers :|

    e.g. over time, one random flower in the world will multiply. leave the server running for a while and you'l have a lot of flowers :| so this means, in order to create a proper ecological model, you'l need to also let flowers die out over time, perhaps having a birth and death rate of even proportions helps out too, so the world is somewhat more dynamic in that front.
     
  5. Offline

    Raphfrk

    Adding flowers as they are picked could lead to infinite flowers :).

    For each column, there is a "highest block" value stored for light calculations. This is the highest block that isn't glass or air.

    You would only need to check one block per column to check if there are already (natural) flowers in the chunk.

    A block is a valid block for flower placement if
    - it is the highest block (and isn't glass)
    - it has a dirt/grass block below it

    You could have the rule be that if a player enters a chunk and no flower check has been performed for that chunk within a certain time, then a new flower is added.

    You could also scan the chunk (highest blocks) for flowers and set a max. For example, no spawn happens if there is more than 3 flowers of a particular type detected in the chunk.
     

Share This Page