Remove Floating Trees

Discussion in 'Plugin Development' started by Jacek, Aug 18, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Jacek

    One of the things that really bugs me on my public server is people leaving floating leaves all over because they cant be bothered to climb. So I am thinking of making a plugin to remove them after so long, the problem is I have no idea of the best way to do this, essentially I would like any log block that is not connected to the ground to decay over time.

    What I have tried so far is using the chunk_load event to scan the chunk for what looks like a floating tree and remove that, it works but chunks are not loaded often enough to stop them being visible for a long time. I don't fancy scanning the entire map every X seconds either !

    Any ideas on how this could be approached ? I'd be happy for someone else to take over too :D
     
  2. Offline

    K900

    Leaves decay automatically since 1.6 (IIRC).
     
  3. Offline

    Jacek

    Not ones next to logs.
     
  4. Offline

    K900

  5. Offline

    Jacek

  6. Offline

    tha d0ctor

    ummm can you post a pic of what you are trying to get rid of?
     
  7. Offline

    Crash

    He means trees where you chop the bottom part of the tree off but are too lazy to get the rest of the logs so the top part of the tree just sits there and floats
     
  8. Offline

    Jacek

    [​IMG]

    Awh, do you remember when the game looked like this :)

    Correct ! Any idea on how to do this nicely ?
     
  9. Offline

    tha d0ctor

    haha

    I guess if you did a check for wood blocks with air under then and leaves on atleast X sides you could make an algorithm that would accomplish this task

    too bad I don't know java :/
     
  10. Offline

    Jacek

    Read my first post... I have done that. But I don't know how bes to use it.
     
  11. Offline

    MadMonkeyCo

    ChunkLoad or ChunkUnload would be my choice.
     
  12. Offline

    Kostronor

    You could actually catch the event of players breaking the blocks of a tree, store the location of the tree(or better, the chunkid of the chunk, the tree is in) and every hour load every chunk you stored and use the algorithm on only this chunk.
    You understand what i'm talking about? i'm not actually sure if i would understand this :D
     
  13. Offline

    Jacek

    That is actually they way I am going at the moment, I have a check to see if there is any wood left too before adding the position to the list to be checked. I didn't think of using the chunkID though !
     
  14. Offline

    APhilosopher

    i too would really like a method to remove those floating trees,

    i would have just gone ahead and used this plugin that you guys linked - http://forums.bukkit.org/threads/fu...owest-block-like-cacti-1000-by-arcwolf.15566/

    BUT i got scared away by the large warning in its op

    >
    ATTENTION:
    There seems to be a plugin conflict where the client crashes with a blue-white screen and keeps crashing for minutes after that.

    i dont want the plugin if it is going to cause that risk, i like my server well functioning, i dont need something as fancy as that either,

    just kill the floating trees! :D

     
  15. Offline

    Kostronor

    I'm talking about storing the chunk (up to no serverloads) and later checking it to remove the tree in it.
    This is NOT checking every loaded chunk or something like that and not instakilling the tree, just saving one value into a hashmap and checking once every hour for leftover trees,
    if that is not what you want, than you want your trees to vanish magically :p
     
  16. Offline

    Jacek

    Haha, that put me off a bit too ! Also I have no idea how a pluign conflict could cause that :s


    I know :s I am trying to do that right now.
     
  17. Offline

    APhilosopher

    :D looking forward to it :D everyday i wander my server and just stare at these floating tree's, i used to try and fight them, id just pop ontop them and type replacenear 10 17 0 of course changing logs nearby to air and all

    but this is a losing battle every day there are more and more, and im tired of doing it xD

    once this plugin comes out i will be so very stoked :D
     
  18. Offline

    Jacek

    It's out, check my signature :D
     
  19. Offline

    APhilosopher

    uuuuuuuhhhhhmmmmmm am i like blind here? orrrrr do you not have a signature? xD
     
  20. Offline

    bergerkiller

    @APhilosopher Your signature is only visible in the first post you post in a thread to reduce the size of threads. :)
    (So look at his first post)
     
Thread Status:
Not open for further replies.

Share This Page