Inactive [MECH] ChocolateFever v1.4.4 - Get CocoaBeans, GoldenApples, and Apples From Trees/Crops! [740]

Discussion in 'Inactive/Unsupported Plugins' started by aPunch, Apr 1, 2011.

     
  1. Offline

    aPunch

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ChocolateFever - Get CocoaBeans from trees and crops!
    Version: 1.4.4

    Don't want to generate a new world just so you can find cocoa beans in dungeons? Want cocoa beans to be more common so you can host cookie parties? Then this plugin is for you! When you break leaves or wait for them to decay, there is a chance that cocoa beans will drop. Also, you can get cocoa beans from crops!

    Features:
    • Tree Drops: Cocoa Beans, Apples, Golden Apples
    • Crops Drops: Cocoa Beans
    • Configurable drop-rate for golden apples, apples and cocoa beans
    • Decide which trees you want each item to drop from (generic, birch, or redwood)
    • Reload settings in-game
    Configuration:


    • drop-cocoa-from-crops: determine whether or not to drop cocoa from crops
    • cocoa-from-crops-chance: percent chance of cocoa beans dropping from crops
    • cocoa-from-trees-chance: percent chance of cocoa beans dropping from trees
    • apples-from-trees-chance: percent chance of apples dropping from trees
    • golden-apples-from-trees-chance: percent chance of golden apples dropping from trees
    • generic-cocoa-beans: determine whether or not to drop cocoa beans from generic trees
    • birch-cocoa-beans: determine whether or not to drop cocoa beans from birch trees
    • redwood-cocoa-beans: determine whether or not to drop cocoa beans from redwood trees
    • generic-apples: determine whether or not to drop apples from generic trees
    • birch-apples: determine whether or not to drop apples from birch trees
    • redwood-apples: determine whether or not to drop apples from redwood trees
    • generic-golden-apples: determine whether or not to drop golden apples from generic trees
    • birch-golden-apples: determine whether or not to drop golden apples from birch trees
    • redwood-golden-apples: determine whether or not to drop golden apples from redwood trees


    If you are an Op, you can reload these settings in-game or in the console using the command:
    Code:
    /[chocolate|choc|cf] -reload
    Known Bugs:
    • Drop-rates are not acting correctly
    Bug Reporting:
    • Read the README.txt in the /plugins/ChocolateFever directory before reporting bugs
    • If you violate one of the rules, I will most likely ignore you
    Changelog:


    1.4.4 - made small tweak that may improve drop-rates
    1.4.3 - fixed NPE when leaves decay
    - removed debug message
    - added README.txt file in /plugins/ChocolateFever directory
    - works with CB recommended build #740
    1.4.2 - added ConfigurationManager class (too many config variables to handle in the main class)
    - added /[chocolate|choc|cf] -reload command (can be done via console or in-game; you must be an Op to use it)
    1.4.1 - now comes with generated config.yml in a .zip file
    - switch statements are fun (internal change)
    1.4 - works with CB #726
    - accessor methods are your friend
    - added golden apples
    1.3 - added configurable apples drops
    1.2 - added ability to choose which trees cocoa beans can drop from
    - a bit of code clean-up
    1.1 - fixed configuration not working properly
    1.0 - Initial release.
  2.  
  3. Offline

    TfT_02

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Good luck with the drop rates! I know you can do it :D I'll just wait patiently until you have sorted it out.
  4. Offline

    GayJuice

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Good to know thx aPunch

    and gl with the drop rate bug i too will w8, good work.
  5. Offline

    Zenithas

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Not to sound pushy, but if you take a look at another mod I found still working in #740, AppleTree, you should find that their drop rate is actually about spot-on.

    Or just as possible, could you release a version that only adds cocoa beans as a drop? I'm not bothered by the cocoa drops - but I am by the golden apple spam I'm finding on my server.
  6. Offline

    EcoMaster21

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Do you have all of the config settings in your file? I noticed if you don't have the gold apple settings in your config file, you'll get a LOT of gold apples.
  7. Offline

    Butterquark

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @aPunch
    Just a thought, could you add a debug option that would write a file that said what the random number was each time a leaf breaks, and what the numbers are it compares to. That could help us determine if its our config file that is messed up.

    I edited my config so it used unix endline instead of dos. which helped make this work better. I'm not sure if that was the problem, but I actually wasn't getting anydrops, made that change and I get reasonable drops. Its hard to say if its the right statistic without doing a lot of testing though.
  8. Offline

    Zenithas

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Most definitely had the gold apples set to 0.0001, and only available from oak trees (same as apples, albeit they have a 0.01 chance, not that it seems to listen to that)
  9. Offline

    Sage9234

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The config doesnt seem to effect the drop rate at all. I got 8 golden apples 8 normal apples and 5 cocoa beans from one tree. +3 saplings.

    [Edit] Sorry! You already know!
  10. Offline

    freakyy85

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    are the droprates allready fixed?
  11. Offline

    Neils

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is it working with 714 ?
  12. Offline

    timmaeh

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I think the droprates are to high.

    Code:
    generic-cocoa-beans: false
    
    cocoa-from-trees-chance: 0.1
    
    generic-apples: true
    
    golden-apples-from-trees-chance: 0.00001
    
    redwood-cocoa-beans: false
    
    generic-golden-apples: false
    redwood-golden-apples: true
    
    birch-golden-apples: false
    
    redwood-apples: true
    
    birch-apples: true
    
    drop-cocoa-from-crops: true
    
    apples-from-trees-chance: 0.0001
    
    birch-cocoa-beans: false
    
    cocoa-from-crops-chance: 0.1
    [IMG]

    CB #740
  13. Offline

    Patrick Crespo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I also had some drop rate issues, where the config file was not only ignoring my drop rate, but every tree would drop 10 or so golden apples with the default config file installed. I read a few posts, and saw one about the random number generator used, taught myself a little java, and devoted ~4 hours to poking around in the source and came up with a 'fix' by changing the Math.random() call to the Random() call instead. I'll link the modified JAR at the bottom, but remember zero credit belongs to me.

    I coded in different defaults to my liking, so be sure and check the config that get's generated, of course. Also, I'd like to point out I'm absolutely no programmer, and you'd be better off waiting for aPunch to actually fix it than use my hack attempt. :)

    Short list of things I changed:
    • Don't check if there's no chance for a drop, (Just playing around with coding)
    • One random roll per decay/break event (No need for three different chances for one block)
    • Sequentially check Golden Apple -> Apple -> Cocoa Bean, so that only one will drop
      (I made that sequence because the least chance for my defaults is Golden Apple)
    • A bunch of naming conventions (in the source) just because I'm strange
    The defaults:
    Code:
    drop-cocoa-from-crops: true
    generic-cocoa-beans: false
    generic-apples: true
    generic-golden-apples: true
    redwood-cocoa-beans: false
    redwood-apples: false
    redwood-golden-apples: false
    birch-cocoa-beans: true
    birch-apples: false
    birch-golden-apples: false
    cocoa-from-crops-chance: 0.1
    cocoa-from-trees-chance: 0.05
    apples-from-trees-chance: 0.01
    golden-apples-from-trees-chance: 0.001
    
    Plugin: http://dl.dropbox.com/u/28452414/ChocolateFeverRevisited.jar

    Source: http://dl.dropbox.com/u/28452414/ChocolateFeverRevisited.zip

    Tested fine using Build 740.
  14. Offline

    NotoriousPyro

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This is massively broken.
  15. Offline

    Soruyao

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm going to test this immediately! I've been holding off on downloading the mod because of the drop rate issue. I'll get back to you if it works out. :D

    -edit-
    Not only does it work perfectly, your drop rates are almost exactly what I was aiming for! (I just had to switch it so different trees dropped different things and it was perfect!)

    Awesome :D Hopefully the creator of the mod incorporates your fix so more people can use it.
  16. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Nice work Patrick, any chance you could add permissions support? :p
  17. Offline

    Patrick Crespo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Oh, I could certainly try. What did you have in mind, permissions to the reload command? Or permissions on who can get what from what tree? :) (There is already a permission node for the reload command I believe.) Of course that will mean another crash course in Plugin programming! :)

    Edit: Never mind, after looking at the plugin, I didn't see a permission node, I'll take a look.
  18. Offline

    Joy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yes, that ^

    chocolatefever.goldenapple
    chocolatefever.apple
    chocolatefever.bean

    Or something :p
  19. Offline

    aPunch

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks to @Patrick Crespo for fixing the drop rate issue. If he is willing, I can incorporate his changes into the official plugin.
    TfT_02 likes this.
  20. Offline

    Patrick Crespo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    If you can sort through all of the unnecessary changes I made and only put in the necessary ones, by all means, please do. :)
  21. Offline

    TfT_02

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yes please!
  22. Offline

    PrivateAlpha

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  23. Offline

    TfT_02

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    IT HAS NYAN CAT?!?! Woah awesome!
  24. Offline

    thepackett

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    So you will be incorporating patrick's fix soon?
  25. Offline

    aPunch

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Uh.....please don't advertise your plugin in my thread.

    Yes, I will work on it soon. Right now I'm still a bit busy with other plugins.
  26. Offline

    QQCucumber

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Not sure if this is intended or not but you can get coco beans from destroying crops that haven't matured.
  27. Offline

    aPunch

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks for reporting that! I'll have it fixed in the next release.
  28. Offline

    QQCucumber

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I have a request for your next release. Could you please add red flowers and yellow flowers to possible drops?

    Flowers are normally a limited resource (unless you use Growbie) so it'd be nice to be able to get them from trees and crops.

    Personally, I want it so I can have it so normal trees=apples, birch=coco, evergreen=flowers.
  29. Offline

    bluej100

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    For anyone interested in slight realism, apple, cocoa, oak, and birch are all in the clade Rosids. I've made oaks (generics) drop apples and birch drop cocoa, since apples are more useful early on.
  30. Offline

    Butterquark

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I am testing your plugin. and when i turned up the drop rate, sometimes a get more than one apple per leaf block.
    Any idea what could cause that.
  31. Offline

    valdark

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It would be great if you also added leaf block drops for the different tree types. I could then use this plugin in place of another I am currently using and get more out of it at the same time.
  32. Offline

    Tealk

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    hi i have set it up so
    Code:
    drop-cocoa-from-crops: 0.1
    cocoa-from-crops-chance: true
    generic-cocoa-beans: 0
    birch-cocoa-beans: false
    redwood-cocoa-beans: false
    cocoa-from-trees-chance: false
    
    generic-apples: true
    birch-apples: true
    redwood-apples: true
    apples-from-trees-chance: 0.05
    
    generic-golden-apples: false
    birch-golden-apples: false
    redwood-golden-apples: false
    golden-apples-from-trees-chance: 0.01
    but Leaves drop cocoa too why?

Share This Page