Remove Floating Trees

Discussion in 'WIP and Development Status' started by Jacek, Aug 20, 2011.

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


    I have been working on a plugin to prevent floating tree tops running my servers landscape and have just finished the first working version.

    When a player breaks a block, if that block looks like the trunk of a tree it's position is stored, then every 30 minutes all of the stored locations are checked for trees that are not attached to the ground, if one is found it's logs are removed.

    The main problem I had was preventing it being used for griefing, if someone looked at the code they could build a shape that would be considered as a tree out of logs to wipe a huge area. I think I have solved this problem pretty well, if an area is not at least 15% leaves, not thing will be done to it. Most trees are more than 15% leaves and most buildings and tree-houses are less.

    Basically, I would love someone to do some testing for me :)

    Download links

    The debug version runs the tree removal ones every two seconds :)
  2. Offline


    This sound's interesting, I'll try to do some testing when I can, however, may I ask if this is lightweight, because it sounds like every 30 minutes it check's all trees in the world,

    I.E 5000x5000 + Maps
  3. Offline


    When a player breaks a block that looks like a trunk of a tree that location is stored in a list, every 30 minutes that list is cleared. It does do a lot of work so I would not really say lightweight but I also doubt it would cripple a server. I can always improve efficiency a little bit as well, there are some things I could remove from the is-that-a-tree-and-not-a-log-house check. I also want to add a limit so that if there are 10,000 trees they wont all be processed at once, or maybe they would with a delay between each one.
Thread Status:
Not open for further replies.

Share This Page