[MECH] QuickTree v1.01 - Harvest Trees Quickly! [1060]

Discussion in 'Inactive/Unsupported Plugins' started by scarletomato, Aug 24, 2011.

  1. Offline

    scarletomato

    <font color="#333399">QuickTree[Deprecated, search for QwickTree]</font>
    Harvest Trees Quickly!
    Version 1.01


    <font color="#ff0000">Gorbb has done an amazing job with rewriting this plugin as QwickTree for 1.2.5. Check it out HERE!</font>
    Description
    I had a plugin for hmod back in the day that harvested the entire tree and had configurable drops. I haven't seen something quite like it yet for bukkit, so here it is!
    <Edit by Moderator: Redacted mediafire url>
    <Edit by Moderator: Redacted mediafire url>
    This plugin <font color="#ff6600">breaks down trees fast</font> with an 'optimized for speed' tree search algorithm!
    "But!" you say, "Cutting the wood isn't what takes so long! I still have to wait for those blasted leaves to decay."
    Indeed! This plugin <font color="#ff6600">prunes the leaves as well</font>! With <font color="#ff6600">configurable drops</font> no less! You want apples? Great! Add them in. Cocoa Beans! Fantastic! Can do with <font color="#ff6600">configurable data values for drops</font>! Extremely rare golden apples? No rare is too rare with<font color="#ff6600"> configurable probability precision</font>! <font color="#ff6600">Saplings that match the tree</font>? Of course!
    "Hold on!" you rudely interrupt, "with all these drops, won't I have to waste time running around gathering them all up? And what if I miss a rare golden apple!?"
    No need to worry you're blockish little head with such trivialities! Now with the <font color="#ff6600">configurable auto collect option</font>, drops are placed directly into your inventory! (Unless, of course, you have no more room) This plugin is a one-stop shop for anyone tired of spending time chopping down those pesky trees! With its Non-Recursive...
    "Non-Recursive!?" you ignorantly impose, "Isn't recursion faster!?"
    Absolutley not! While excellent for allowing humans to wrap their little brains around an algorithmic idea, recursion is a nightmare for computers that have to save the environment to the execution stack every time it recalls the recursive method!
    So now that I've quelled all of your fears you can confidently fell trees with the speed of a Canadian Lumberjack with QuickTree!

    Show Spoiler
    #how rare can you make the drops. The larger the number the smaller the allowable chance. 10000 gets as low as 0.01
    dropPrecision: 10000
    #format
    #- [ItemID][:dataValue],[Chance out of 100]
    #make sure all the changes add up to 100 or less
    #if it's less, make sure AIR is at the end
    leafDrops:
    - 6,20
    - 18,10
    - 260,1
    - 351:3,0.1
    - 322,0.01
    - 0,1
    #will drops automatically go into the players inventory?(if the inventory is full, items will fall naturally)
    autoCollect: true
    #how far away will the algorithm search for leaves to prune?
    #My recommendation is 3. This ignores a few leaves on the larger trees. If that bothers you add to this number slowly.
    #Remember the search time grows by a power of 3 here (3 dimensions to search in)
    leafReach: 3
    #tools that will allow tree harvesting to allow any tools use 0 as the only entry
    tools:
    - 286


    Features:
    * Configurable:

    - * Leaf drops and data values for them
    * Probabilities for the leaf drops, as rare as you want
    * Auto-collect option to have drops placed directly into your inventory
    * Tools that allow harvesting
    - Saplings and logs match the tree
    - Non-Recursive tree search algorithm optimized for speed.

    ToDo:
    * Permissions support
    * Automatic drop precision and better randomization code

    Changelog:
    * <Edit by Moderator: Redacted mediafire url>

    - * Released QuickTree
    - <Edit by Moderator: Redacted mediafire url>
    * Corrected tool handling
     
    Last edited by a moderator: Nov 12, 2016
    someguy817 likes this.
  2. Offline

    gorbb

    I'll just see how things go then. If I need to re-write it, then that is what I will do. Thanks for your help.
     
  3. Offline

    ralphhogaboom

    Well, not necessarily. I'd say the fact that the source is posted is a tacit invitation to play. At worst, it's a security blanket for when the dev loses interest/gets a job/is hit by a bus. That way the project can continue - like Gorbb's suggesting, eh?
     
  4. Offline

    Jacek

    You can re-write it in the same way :) Looking a the source it would probably benefit from a re-do anyway.

    Well no, open source means you can look at the source, not copy it into your own project and release it with very few changes ;)
     
  5. Offline

    gorbb

    I was thinking of that, but that would have been after I release it.

    Exactly. Not only that, but an open source plugin is a great place to start, especially if the person is new to coding.

    Does this mean that this plugin is actually, though it seems not, open source?
    Or does it mean that because the Source code is available for anyone to get, that it is, in fact Open Source?

    Also, why would anyone out the source code up, if they didn't want other people to put it up?
    To be perfectly honest, I can guess, probably quite accurately, that the Author probably doesn't even care too much about it anymore, which would be why the plugin hasn't been updated at all since MC 1.7 (ish)
     
  6. Offline

    ralphhogaboom

    Thanks to Gorbb's plugin, I have this running on my server :D

     
    gorbb likes this.
  7. Offline

    robplusplus

    Well done! It's good to have QuickTree back. Here's some issues we found:

    1. Oak tree leaves often drop a much higher percentage (~15%) of saplings than the config allows (5%) (birch and pine not checked).
    2. Setting tools to only 0 caused the config to regenerate with the various axes listed.
    3. Adding 0 to the various axes allows the fist and the axes to work but no other block does.
    4. Version shows as 0.1.

    Aside from these minor issues, it runs perfectly. Gorbb, I sincerely hope you continue polishing this gem.
     
  8. Offline

    gorbb

    The tree leaves dropping saplings, I'll have to look at, I'm not too sure if I changed anything, but I may have accidentally put an extra number in there.

    Edit: Looking at the Source Code, the Default Values for drops are:
    Adding that, I get 32.11%, so I don't know what happens with the rest. Drops nothing, I guess.

    About it regenerating the tools on config, I have an idea why it's doing that.

    Issue 3, that will be because block 0 is actually air, so it'll check to see if there is air (nothing) in you hand.

    And the Version shows as 0.1, because it hasn't yet been released. When it is release, the version numbers will either reset to 1.0, or 1.1 to continue the version numbering above.

    Thanks for your help testing this for me, and I'll send you an updated copy when I've made those changes.
     
  9. Offline

    robplusplus

    Sorry, I should have added my config.yml:
    Code:
    leafDrops:
    - 6,10
    - 260,1
    - 0,189
    tools:
    - 279
    - 286
    - 258
    - 275
    - 0
    leafReach: 3
    autoCollect: true
    dropPrecision: 200
    The drop probabilities are taken from the wiki. I remember that the original QuickTree had some issues with miscalculating probabilities and that adding block 0 at the end of the list of possible drops would round it out.

    As for block 0 as tool, the original QuickTree would allow any tool (or lack thereof) to drop a tree if it found 0 (and only 0?) in the tools list. I had tried just 0 but the config regenerated the axes so I simply added the 0.

    All in all, an excellent beginning. I look forward to the next version. Since we're running on CB 1.1R8, I haven't had a chance to test it on jungle trees - I would recommend a check for leaves on the ground to avoid removing them (or maybe an option to do so?).
     
  10. Offline

    gorbb

    I think there might be something wrong with the leaf drops part of that... by the looks of it, you've written 189% chance of spawning air!
    I'll try that config though, and see what I can do with that.

    And for the forest leaves, that's a good idea, I'll put that onto my todo list, but it might not be a feature until after the release.
     
  11. Offline

    robplusplus

    Unless something has changed, the leaf drops aren't percentages, but fractions of dropPrecision (e.g., air occurs 189/200 of the time).
     
  12. Offline

    gorbb

    I've been looking at the code, and it isn't quite that. Air is listed with the "189", but the chances of it spawning is actually (simplified a bit though) dropchance* (Precision/100), which in this case, is 378 (187 * (200/100)), which is then again divided by another number (which I haven't yet gotten to) and multiplied by a random number within bounds (Precision).
    So, it is kind of like that, but until I have got my head round that bit of code, I'm not too sure what will happen with that.
    So if you think about it, it is ((dropchance * (Precision/100))/somenumber) * random between 1 & Precision
     
  13. Offline

    robplusplus

    Never mind, I'm being dense. Since the minimum allowed probability of a leafDrop is (100%/DropPrecision) and leafDrops are in fact percentages, my config should have read:
    Code:
    leafDrops:
    - 6,5
    - 260,0.5
    - 0,94.5
    tools:
    - 279
    - 286
    - 258
    - 275
    - 0
    leafReach: 3
    autoCollect: true
    dropPrecision: 200
    I'll test this as well as try forcing the config to accept 0 as the only tool.
     
  14. Offline

    gorbb

    Thanks. I'll be trying to tidy up code now, as I will be releasing this in about 5-ish days, so I'll try to get the problem with the regenerating config sorted, and I'm thinking about a way of generating the drop chances that I understand, because it is a little confusing. I also will have to be renaming it, as I cannot post something on the wiki that isn't mine:
    [​IMG]
    So I'll need to rename it, along with (I think) a complete code re-write, although, I will not be able to re-write it all within 5 days with my other work I need to do as well. On the subject of a new name, which does anyone prefer?
    • QwickTree (For Familiarization)
    • Timbr (Like Flickr)
    • Hoquaim (Means "Hungry for Wood" in native language)
     
  15. Offline

    robplusplus

    +1 for QwickTree :) If you want to bounce any ideas off me, please feel free - my programming skills are severely rusted but my math and logic are still sharp.
     
  16. Offline

    gorbb

    Ok, thanks, I will do. :)
     
  17. Offline

    bluehasia

    ohhh some took over this project.Thank you one of my top favorite plugins on my server
     
  18. Offline

    gorbb

    Almost ready for the Beta release. I've just a few more bits of code to write, and then I shall release it.
    That should be some time this week, but it may be longer (due to issues with my PC).
    You can see the post here.
     
  19. Offline

    gorbb

  20. Offline

    thelaman

    have you uppdated it to 1.2.5
     
  21. Offline

    gorbb

    It should work with 1.2.5, and I've had no reports of problems from anyone yet.
     
  22. Offline

    scarletomato

    gorbb! Thank you so much for picking this project up and keeping it up to date! It has been a tumultuous last few months with very little time to keep up with bukkit. You're more than welcome to continue the spirit of this plugin. If you ever get tired of updating it and i'm avaliable, i'll pick it back up at such time.

    Until then, awesome work and thanks!
     
  23. Offline

    Kingbox

    doesn't work!
     
  24. Offline

    gorbb

    Sorry, but that isn't quite accurate enough. Make sure that you have the latest version, and if it still does not work, then please could you create a ticket of the BukkitDev page for this, including a little more detail too.

    Thanks.
     
  25. Offline

    md_5

    Long time no see scarletomato. You will notice that this thread has now been placed into the Inactive Plugin subforum.
    If you wish to revive this plugin, please ensure that you update and test compatibility with the latest recommended Bukkit build before reporting your original post, asking for it to be moved back to the release forum.

    Thanks for your time.
    md_5
     

Share This Page