[FUN/MECH] ClayGen v1.5.2 - Turn Gravel into Clay using Water/Lava [1185-1317]

Discussion in 'Inactive/Unsupported Plugins' started by Tux2, May 1, 2011.

  1. Offline

    Tux2

    ClayGen - Turn Gravel into Clay using Water/Lava:
    Version: v1.5.2


    ClayGen is a plugin I made to turn gravel into clay after it was removed from mcMMO. There are three different modes:
    1. Turn gravel into clay whenever water flows over or around it (mcMMO style)
    2. Only when a certain block is below the gravel block (the default is Brick as of version 0.5).
    3. Farming mode: Sets a configurable delay before the gravel turns into clay. Just like any other crop in Minecraft.
    To change the behavior of the plugin just edit the claygen.ini file that it creates on first run under plugins/ClayGen.

    Comments, suggestions and bug reports are all welcome.

    Features:
    • Turns Gravel into clay with or without an activator.
    • Configurable option to only change a certain percentage of the gravel into clay.
    • Water/lava activation configurable
    • Change the default number of clay drops
    • Saves the blocks turning into clay in farming mode across server reboots.
    • Configurable option to have the clay drop more clay balls the longer water runs over the clay.
    • Multi-world support (although all worlds share the same config)
    • Editable config file.
    • Automatically adds new settings to config file when updating.
    Download ClayGen.jar - v1.5.2
    Download ClayGen.jar - v1.3 (for bukkit 766-953)
    Source Code

    How to video:


    Plugin Not working correctly?
    For me to diagnose the issue properly please provide me with the following information:
    Code:
    Description of issue:
    Version of Craftbukkit:
    Version of java:
    OS:
    Other plugins installed:
    Output of console (If there are any error messages):
    ClayGen configuration file:
    
    Changelog:
    Version 1.5.2
    • Definitely fixed main thread server lockup this time when using farming mode.
    Version 1.5.1
    • Fixed infinite recursion bug introduced in recent bukkit builds when using the custom drops over time feature.
    Version 1.5
    • General cleaning up of code.
    • Fixed bug where the gravel on the very edge of the water flow would not turn into clay.
    • Fixed bug where gravel would turn into clay unusually fast.
    • Fixed (hopefully) bug causing main server thread lockup.
    Complete Changelog (open)


    Version 1.4
    • Updated depreciated hooks for CB 1000.
    Version 1.3
    • Solved farming issues with threads not being in sync and locking up servers, causing NextTickOutofSync errors, among others.
    Version 1.2
    • Fixed StackOverflowError when regenerating regions with WorldEdit. (Should fix other world regeneration plugins as well.)
    Version 1.1
    • Fixed problem with gravel not turning to clay when the chunk wasn't loaded. (Thanks to mtszyk for pointing it out and helping test the fix.)
    • Added option to keep chunks loaded when gravel is turning into clay.
    Version 1.0
    • Added option to have a percentage chance for the gravel to turn into clay. (A suggestion by someone on the canary forum.)
    Version 0.9
    • A Canary mod only version. This version does not exist on bukkit. I bumped the version number to 1.0 on bukkit to not break compatibility going between the two server mods.
    Version 0.8
    • Fixed bug where when you only had 1 activator and the more drops over time feature enabled, you could leave the other one that wasn't activated next to the clay and it would still accumulate drops.
    Version 0.7
    • Speed enhancement (cpu load) for farming mode
    • Added configurable default clay drops
    • Added the "more drops the longer water runs over the clay" feature. (Thanks to DarkLiKally for suggesting this feature!)
    Version 0.6
    • Fixed problem where it would save the gravel file excessively.
    • Minor code enhancements/speed-ups.
    Version 0.5
    • Option to save all the gravel blocks turning into clay in farming mode. (Useful if you have a long delay set and you restart the server.)
    • Added relevant option in the config file to turn saving on and off.
    • Fixed a bug in farming mode where some blocks wouldn't update until the next round if the block next to them changed to clay.
    • Removed lingering debug message in farming mode.
    • Changed default activator block to BRICK. Please note that you will not see this change unless you are just installing the plugin or delete the config file.
    Version 0.4
    • Added a "farming" mode, where the gravel only turns into clay after a semi-random delay. (as requested)
    • Added relevant options to the config file to configure minimum and maximum time it takes to turn into clay.
    • In farming mode, placing gravel next to already running/still water will start the timer as well.
    Version 0.3
    • Added config options to set what flow triggers the gravel into clay change (water and/or lava)
    • Cleaned up redundant code.
    Version 0.2
    • Made it so that water/lava can flow next to the gravel turning it into clay, not just on top.
    • Added mcMMO style.
    • Created a proper config file.
    Version 0.1
    • First release of the plugin.




     
    lalesz and Taranis01 like this.
  2. Offline

    hofec

    @Tux2

    Tux, i really love you man ! Amazing plugin [diamond] [diamond]

    Anyway .. my server seems to be assh**e, because if i load your ClayGen on my #863 | few minutes later Read Time Out spam in console - and crash /freeze/ (all players kicked) :'(

    Any help with this please ?
    I will definitly use this on my svr !! [fire]

    And sir - this is my config !
    Show Spoiler
    Code:
    #This is the main claygen config file
    #The ActivatorBlock is the ID of the block needed
    #under the gravel to make it into clay. Default is a Brick Block
    #If needactivator is set to false, then any gravel
    #block that comes in contact with flowing water
    #gets converted into clay.
    activatorblock = 45
    needactivator = true
    #Set whether water flow will trigger the change
    wateractivated = true
    #Set whether lava flow will trigger the change
    lavaactivated = true
    
    #defaultdropamount changes the default amount of clay dropped when a block is broken
    defaultdropamount = 4
    
    #Clayfarm sets it so that the gravel turns into clay after a delay
    clayfarm = true
    #farmdelay sets the minimum delay in 10 second intervals. 5 = 50 seconds.
    farmdelay = 6
    #maxdelay sets the max delay in 10 second intervals. 12 = 120 seconds.
    maxdelay = 30
    #keepchunksloaded keeps all the chunks loaded into memory where gravel is turning into clay.
    keepchunksloaded = true
    #savefarm saves all the blocks currently being farmed for clay. (Otherwise
    #you will have to replace the gravel blocks or re-run the water after server reboot.)
    #Only useful if you have a large (20min+) delay for the gravel turning into clay.
    savefarm = false
    
    #The following lines let you set a custom number of clay drops based on the amount
    #of time that water has been running over them.
    #customdrops, if true, enables the custom drops
    customdrops = true
    #maxclay sets the maximum amount of clay a block can give
    maxclay = 6
    #minclay, sets the minimum amount of clay a block can give (must be more than 0!)
    minclay = 1
    #timeformaxclay, sets how long the player must wait for the max amount of clay
    # in 10 second intervals. 12 = 120 seconds.
    timeformaxclay = 360
    
    #graveltoclaychance sets the chance from 0.0% to 100.0% of the gravel turning into clay
    graveltoclaychance = 100.0
    #Do not change anything below this line unless you know what you are doing!
    version = 1.1
     
  3. Offline

    Tux2

    @Sorken @hofec I see both of your issues and I think they are related, would you mind turning clayfarm to false and see if you still get the same errors? I'm working on a fix for the crashes right now (I think so anyways)
     
  4. Offline

    Sorken

    I have disabled the option and put one of my mods to slave labor. 15 stacks of clay made so far and no crashes yet. The delay may indeed be the issue.
     
  5. Offline

    hofec

    yep, i also tried set in config clayfarm to false .. few minutes after server starts, same crash as before :(

    thank you for fixing this [cake]

    EDIT: My bad .. i only changed savefarm option to false :X .. i will test with clayfarm with false now !
     
    Tux2 likes this.
  6. Offline

    Tux2

    Happens to the best of us. ;) I have a build that I am testing right now that should solve the issue if setting clayfarm to false solves it for you.

    @Sorken @hofec @mtszyk Version 1.3 has been uploaded that should solve all the issues you guys are seeing with 1.2! Let me know if you find any new bugs.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  7. Offline

    Sorken

    @TuX
    I'm happy to report that the plugin no longer crashes the server. I am now currently trying to set it up in such a way that it uses a minumum time of 30 secs and a max of 120. And that blocks will pop into clay slowly during that time.

    Edit: No matter what i set in config, i seem to get 1-3 blocks converted and then the rest just pops into clay a few seconds later.

    Tried setting chance to 25.0 and 12.5. Tried increasing max time to 24 (240 secs).
     
  8. Offline

    Tux2

    @Sorken I'm glad that fixed the crashing problem! I'll definitely have a look and see what I can do about the delay not working the way you want it to. Just one thing for you to try: set the min wait time for 5, (50 seconds) and see if that helps.
     
  9. Offline

    Sorken

    @Tux2
    I think i finally got it working like i wanted. Used the following settings. It works fairly well for larger farms but not so well for smaller ones. All blocks still turn well before max time with the smaller one :(

    Config (open)

    # This is the main claygen config file
    # The ActivatorBlock is the ID of the block needed
    # under the gravel to make it into clay. Default is a Brick Block
    # If needactivator is set to false, then any gravel
    # block that comes in contact with flowing water
    # gets converted into clay.
    activatorblock = 45
    needactivator = true
    # Set whether water flow will trigger the change
    wateractivated = true
    # Set whether lava flow will trigger the change
    lavaactivated = false
    # defaultdropamount changes the default amount of clay dropped when a block is broken
    defaultdropamount = 4
    # Clayfarm sets it so that the gravel turns into clay after a delay
    clayfarm = true
    # farmdelay sets the minimum delay in 10 second intervals. 5 = 50 seconds.
    farmdelay = 3
    # maxdelay sets the max delay in 10 second intervals. 12 = 120 seconds.
    maxdelay = 24
    # slowserver Set this to true if your server has less than 10 ticks per second
    # (This is only used in farming mode)
    slowserver = false
    # keepchunksloaded keeps all the chunks loaded into memory where gravel is turning into clay.
    keepchunksloaded = true
    # savefarm saves all the blocks currently being farmed for clay. (Otherwise
    # you will have to replace the gravel blocks or re-run the water after server reboot.)
    # Only useful if you have a large (20min+) delay for the gravel turning into clay.
    savefarm = false
    # The following lines let you set a custom number of clay drops based on the amount
    # of time that water has been running over them.
    # customdrops, if true, enables the custom drops
    customdrops = true
    # maxclay sets the maximum amount of clay a block can give
    maxclay = 2
    # minclay, sets the minimum amount of clay a block can give (must be more than 0!)
    minclay = 1
    # timeformaxclay, sets how long the player must wait for the max amount of clay
    # in 10 second intervals. 12 = 120 seconds.
    timeformaxclay = 24
    # graveltoclaychance sets the chance from 0.0% to 100.0% of the gravel turning into clay
    graveltoclaychance = 100.0
    # Do not change anything below this line unless you know what you are doing!
    version = 1.3
     
  10. Offline

    srigby

    hello, i don't know whether anyone else is haveing this problem but for some reason the gravel is only turning intoclay if i use lava, i have the config set up to allow waterflow to change gravel to clay, but still it doesn't work,can u help me?
     
  11. Offline

    Tux2

    Permissions for this would be really tricky as I can't really find out who triggered a water/lava flow unless I keep track of all the redstone, explosion, and water place and flow events. Lots of effort for just a little reward.

    Do any errors show up in the console? If yes please list
    Craftbukkit version:
    Java version:
    OS:
    Your claygen configuration file:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  12. Offline

    ValBGaming

    I see so much potential for this when combined with pistons... :confused: Automatic Gravel to Clay machine! :D
     
  13. Offline

    echibahn

    Does this work for build 953?
     
  14. Offline

    Tux2

    It should work just fine, but I strongly discourage you from upgrading to 953 because of this duping bug.
     
  15. Love it in principle!

    Suggestions:
    1. Set it to change into clay dust instead of clay blocks. This would allow automation of gravel to clay production.
    2. Love the idea of the longer water runs over clay the more clay dust it produces.. Except.
    2a. Set it so that water/lava running over gravel has a chance to produce a random # of dropped 'item blocks'​
    2b. Set it so that when this number is reached, the gravel breaks into one last item block.​
    2c. Make it configurable what it can turn into/spit out.​

    For example:​
    Gravel with water/lava (separately configurable) running over it will spit out one of the following every (configurable # of) seconds with a (configurable per) chance of each:​
    1. sand block (if there were sand DUST I'd suggest this instead)​
    2. clay dust​
    3. flint​
    4. redstone dust (really rare)​

    Ultimately, if you can set it to work on any form of block you like, with any activator block, with either water/lava, and make it all configurable, that'd be awesome.

    (Because I'd totally let someone get 2 or 3 iron ingots out of a lava forged iron ore, for instance.)
     
  16. Offline

    Tux2

    Wow! Sounds like a really good idea for another plugin I should make. As it is right now this one has so many options that adding any more might confuse people (as well as making the config file a mile long!). I'll definitely tag you in the new thread when I make it though.
     
  17. Offline

    Joy

    Any chance for some sort of multiworld configuration? I would really like to deny/allow this in specific worlds.
     
  18. Offline

    Tux2

    I'll include that in the next version, thanks for the suggestion!
     
  19. Offline

    Joy

    Have another, albeit perhaps odd, suggestion. I really would like to restrict this to certain players. But obviously tricky with how it works.

    Is there any chance you could make it so Clay only bakes when there is a sign with [ClayGen] on it within X block radius? Then you could attach a permission node to creating that sign.

    Ideally X is configurable. And even better would be if Y is configurable iConomy cost for creating it...

    That would be awesome <3
     
  20. Offline

    Joy

    Small bump, wondering if there's progress, would love this <3
     
  21. Offline

    Tux2

    That is a novel idea. Combine it with a plugin like Turnstile and charge people money to use the clay generator. :) Although, I had a crazy idea of my own... Instead of it being sign based, have it be player based. If there is a player within X blocks radius that is in the access list/has permissions, turn the gravel into clay (or at least start the process if in farming mode). Let me know if this way would work better for you as I can do it either way.

    As far as the multiworld configuration goes, I am working on it, although I haven't had as much time as I would have liked since I'm helping someone else learn Java and Minecraft plugin development as well.
     
  22. Offline

    Joy

    Yes player with a certain node in range would also work ! And makes sense, needing an operator to bake :p

    That solves multiworld btw, you can just add the node to certain players only in certain worlds.

    Permission nodes = awesum.
     
  23. Offline

    Deathfromace

    Can't say I understood any of that permission talk but I came here to say thanks for the plugin once again. It works great with #1000 and people on my server are having tons of fun making automatic clay-creators.

    I personally don't like permissions but as long as it does not change how it works for guys like me that skip permissions I love the plugin.
     
  24. Offline

    Martin Holík



    Do not know what could be the problem? I use RB # 1000 and I have version 1.3
     
  25. Offline

    Tux2

    It looks like it is a problem with bukkitcontrib. You might want to make sure that you have the latest version. (I also have bukkitcontrib on my server but haven't seen this error yet. You might want to list all your plugins if updating bukkitcontrib doesn't solve the issue.)
     
  26. Offline

    Pythros

    Would it be possible to implement that lava over clay turns clay into bricks and that the lava and water that is used to get "soaked" up and removed?
     
  27. Offline

    Fuzetsu

    i only get a zip file without the .jar file i only get a bunch of other files :/
     
  28. Offline

    Joy

    Any updates coming in the near future Tux?
     
  29. Offline

    Tux2

    @Joy I'm actually in the process of moving, but the current version of Claygen should work with 1060. I already got rid of all the depreciated stuff in it. Should have another update out in another two weeks though.
     
  30. Offline

    Joy

    Cool, was mostly looking at the added functionality, good luck moving :)
     
  31. Offline

    Pythros

    @Tux2
     

Share This Page