Forest Fire Clean-Up

Discussion in 'Archived: Plugin Requests' started by Schirf, Jan 26, 2011.

  1. Offline

    Schirf

    I'd love to see a Forest Fire Clean-Up mod. Who hasn't seen the "tree" mess left by a fire? I don't want tree parts floating in the air any more than I want leaves floating in the air. While those using WorldEdit can always //replacenear X tree air, that also replaces tree parts in "unburned" trees.

    The solution would be to have a command to remove the appropriate tree blocks. The problem is that the formula for deciding if a tree block is part of an "unburned" tree is a little complicated.

    My take on it would be:

    (1) Select all tree blocks within distance X (param) into a candidate pool.

    (2) Move from the candidate pool into an exempt pool tree blocks adjacent (face or edgewise) to leaves.

    (2.1) While doing this pass, immediately replace with air and remove from the candidate pool any blocks not adjacent to either a leaves block or a tree block, since the block will not be used in subsequent iterations).

    (3) Move tree blocks from the candidate pool to the exempt pool tree blocks adjacent to blocks already in the exempted pool. (count blocks moved in this manner).

    (4) Repeat (3) until no additional blocks are added to the exempt pool (move count on last iteration = 0)

    (5) Remove (i.e. replace with air) all tree blocks in the candidate pool.

    I'm sure there are other methods... Any ideas?
     

Share This Page