Growtree

Discussion in 'Plugin Requests' started by CryoCrafter, Jan 1, 2019.

Thread Status:
Not open for further replies.
  1. Plugin name: Growtree

    Supported Versions: Any (Would appreciate if 1.12.2)

    Plugin requires: Worldedit

    Main Feature: If a sapling reaches its last age, it wont instantely grow, but for every age level it reaches, more and more parts of the tree are being generated from the bottom up, meaning that at step one, there is like 1 log and 5 leaves, step 2 has 3 logs and 10 leaves and so on, and when it reaches the maximum age, there is the normal tree.

    How I think it would work: There is a treestages folder in the plugin, which has the different log types and sizes in it. When it detects the sapling, it grabs one random file of the log type, and goes through the stages. There are between 3-10 different tree grow files per log type. People also have the ability to change or add new of these files. The folders look somehow like this:

    Server\plugins\BetterTrees\Oak
    Spruce
    Birch
    Jungle
    Acacia
    Dark_Oak

    Each of these folders has different files with the names like this:
    Oak_1
    Oak_2
    Oak_3
    Oak_4

    In these files, the different stages are written down, for example, one tree file could look like this:

    Oak_1: # Number of the stage (0 is the sapling)
    enabled: true
    stage1:
    oaktree1_stage1 #name of the schematic which should be pasted at the saplings location (excluding air)
    time: 5 (The time in minutes, it takes to reach this stage after the stage before. Might be a 0. time, too, to make fast growing trees)
    stage2:
    oaktree1_stage2
    time: 5
    stage3:
    oaktree1_stage3
    time: 5
    stage4: # the last is the finished tree, can be after unlimited stages
    oaktree1_stage4
    time: 5
    (End of the file)

    When you want to add a new schematic to the standart existing ones, you will have to select the tree with worldedit, stand UNDER the block, where the sapling should be (which should be under a log), do the commands:

    - //copy

    - //schem save (name) # for example saved as oaktree1_stage1

    The you do the commands which come with the plugin:

    - /growtree create (logtype) #Creates a new file in the log type category with the next number after the largest existing one within the folder (Oak_4 comes after Oak_3)

    - /growtree add (name of the tree you want to add a stage to) (schematic name) # Adds an already saved schematic to the file of the specified tree. Replies with: Invalid Tree # if the file wasnt found.

    - /growtree enable (name of the tree you want to enable) # Enables a treetype. If you create a new treetype, it is disabled by default.

    Once you have created it, added schematic stages and enabled it, i´there is a random chance of it being used whenever a user places a sapling and bonemeals it or it ages on its own.

    Whenever the tree grew, there is no sapling left which can be used to bonemeal it. I dont really mind about that, because its not really needed.

    Whenever all logs of a growing trees are destroyed, the tree will no longer grow.

    Other commands:

    - /growtree reload # Reloads all files, in case files have been edited in an editor and not ingame.

    - /growtree remove (treename) (stage) # Removes a stage from one tree, the tree will grow from stage 1 to 3 if 2 is deleted.

    - /growtree delete (treename) # Completely deletes a trees file

    Here is a picture of a tree growing trough all stages, from left to right.

    View attachment 32061

    Permissions:
    - growtree.main (For all commands, they all are the same requirements)

    However, the developer who will eventually create this plugin, can change a lot of things I suggested here.
    I have no clue how Java works, thats why I dont know what the optimal way of making a plugin like this is.

    I would really appreciate, if someone takes the time to create this.

    If you are still reading this, thank you for taking your time.

    Greetings, CryoCrafter
     
    Last edited: Jan 5, 2019
  2. Offline

    KarimAKL

    @CryoCrafter I'm not sure i'm able to make this but wanted to let you know that i think you forgot the part where you tell us how the tree changes stages, is it after some time? If so how much time? If not how then?

    EDIT: Also, what permissions do you want for the commands?
     
    Last edited by a moderator: Jan 1, 2019
  3. @KarimAKL I have changed the earlier post. I hope, it works fine for you, now.
     
  4. Offline

    KarimAKL

    @CryoCrafter How do they grow?
     
  5. I said it there.
     
  6. Offline

    bryansolis13

    Its gonna be a bit hard to find a developer that does this. Specially since all trees that are growing will have to go into a database so they can be called back when the server starts up. But that's the easy part. The hard part is detecting if the tree should grow. Let's say you detect it by seeing if all the blocks are there but if a player breaks one leaf block then all the blocks wont be there, so it will think the tree is broken but only one leaf was broken. The detection system will have to know that it's ok to go to the next stage is going to be the hardest part
     
  7. Offline

    KarimAKL

  8. I would add some options in the config, for example, the light level on the main block, the %age of the blocks able to be breaken before the tree stops growing, etc. Doesnt have to bee too close to the original mc physics
     
Thread Status:
Not open for further replies.

Share This Page