[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

    Tux2

    @Pythros
    Interesting idea. Sorry I didn't get back to you sooner, but life has been crazy lately for me. As far as "soaking" up the water/lava that would involve finding the water/lava source blocks around the clay and removing them, or manipulating them in interesting ways. I'll definitely look into it though. Turning clay into bricks using lava? That should be easy enough to implement. Just give me some time as I am in the process of moving in and getting a steady internet connection.
     
  3. Offline

    TheBeast808

    Could you possibly make multiple activator blocks? I want to have lapiz and gold turn gravel to clay, but it currently only allows for you block..
     
  4. Offline

    Pythros

    No problem. Thanks for looking into it :)
     
  5. Hmm thought I reported this, maybe on Dev? But this causes server lockups for us, once I had installed some clay factories. No error trace, nothing, just full server lockup, had it a few times in the first hours after enabling this, then disabled it, issue gone.
     
  6. Offline

    Tux2

    I will definitely look into this. Mind telling me how many players were online when this happened and the settings for claygen?
     
  7. Offline

    jammieisftw

    Maby put an option for only lava/water to be used incase of griefing, and maby put in the thread that lava/water is configurable if it is configurable.

    James.
     
  8. Offline

    Tux2

    Oops, forgot to put that in the features. Added.
     
  9. Offline

    jammieisftw

    I'm Forgetful Too. Don't Worry :)

    James.
     
  10. Config: http://pastie.org/2487217

    Server was full, so would be about 120-130 online.
     
  11. Offline

    Tux2

    Try changing slowserver = false to true. That will reduce the load that ClayGen places on your server significantly. Let me know if the problem still occurs with that enabled.
     
  12. What exactly does that change? As this was not an issue of high load, this was a complete lockup of the main thread, if it's just a scaling factor...

    Against my better judgement I tried it with your config change, still causes server lockup. Note that this is the nastiest crash type possible, as it even entirely blocks the stop command, thus always creating a rollback on entire population, very very nasty.

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

    Tux2

    Hmm... I think I know what's going on here... To me it was a very rare edge case and I couldn't eliminate it at the time, but I'll have another whack at it. What would happen was when my plugin had "clayfarm=true" whenever I would start a new world it would lock up the entire server, just like you said is happening to you... If you were to actually create a new world, stop the server after about five minutes, then add my plugin everything would be fine. The cause of this was a rapid fire sequence of waterFlow events caused by all the new chunks being created. I'm assuming with 120-130 players online my plugin just either gets overwhelmed by the sheer volume of waterFlow events, or there is an incredible amount of land generation going on. Either way it would cause the lock up. I will investigate this thoroughly and will hopefully have a fixed version by the end of the week.
     
  14. Great, as this plugin is unique, would love to use it :)
     
  15. Offline

    Deathfromace

    I look forward to those updates :D
     
  16. Offline

    Dusi

    Is this working for 1.8.1?
     
  17. Offline

    Zaros

    Try?
     
  18. Offline

    gearsgod

    PLEASE FIX THE LOCKUP! my servers economy works around this plugin and i need the lockups fixed :(

    it happens when new land is gen'ed
     
  19. Offline

    Tux2

    @Joy @gearsgod Server lockups should be fixed! I flew in a straight line for 15 minutes straight, then waited around thirty to make sure it was good, making sure to have clay factories set up along the way. So go ahead and download the latest version. I fixed a few bugs, as well as optimizing a lot of stuff... wow, I've learned so much since I started coding bukkit plugins... (this was my first bukkit plugin)

    Yes, it does work with 1.8.1. I also uploaded a new version, so if you have an older version I strongly recommend updating.

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

    gearsgod

    just a quick thing, not sure if u noticed but with farm turned off the water has to touch the block to work, but with it on the gravel can be NEXT TO the water block and it will work, didn't know if this was supposed to be like this or not so I just sent a heads up
     
  21. Today was our first day of having ClayGen back, and server lockup was achieved after a few hours. The issue is still there in 1.5.1 sadly :/
     
  22. Offline

    Tux2

    Ugh.... This is getting a little frustrating. Admittedly I only use the instant gravel->clay feature on my server. I will do some testing with it in farming mode on my private server and see if I can get some more useful results and try to track down exactly what is happening.

    EDIT: It could also very well be the long time you have set for it to turn into clay (8-20 minutes) while keeping all the chunks loaded the server could very well run out of RAM.... just a theory, I'll be doing more testing.
     
  23. Yea that's really not it, I see 0 change in RAM use before or after having ClayGen enabled, and we have a lot of it. It's really the plugin locking up the main thread, I dunno what exactly could cause it tho...
     
  24. Offline

    Tux2

    Just curious, how many Gigs of RAM do you have allocated to the server? I know on my server I have 3.5GB allocated and I only really have around 8 people on at a time (before 1.8.1 we had around 50 plugins and 5 worlds and the RAM usage was consistently above 1GB. It's probably overkill now, but hey, the more ram the better, right?) Also, right now I've enabled all the options on the plugin on my server to match the settings in the config file you sent me... Let's see what happens...
     
  25. About 14 dedicated to JVM currently. But I have a running monitor of our GC, so I see very quickly if a plugin is leaking memory, that's not the issue here.

    Also, you should probably build a few of them, if you not already have that, we didn't used to have issues when we only had one up for testing over some days.
     
  26. Offline

    Tux2

    Thanks for the tip! Would it be possible for me to join the server as a guest or something so I can take a look at the clay generators so I can get a general idea of what I need to reproduce?
     
  27. Sure just throw me an IGN :p
     
  28. Offline

    Tux2

    Whoops: IGN: Tux2
    I forget that people don't necessarily use their IGN for the forum...

    EDIT: When would be the best time for me to get on? (right now my GMT offset is -6)
     
  29. Added and reservelisted you, anytime is fine, easiest is poking me on IRC, but you can also just ask in global or so for people to show you.

    To be honest there's not much to see, I think we had a few working factories, before it started lockups again.
     
  30. Offline

    Tux2

    Just a little update to everyone watching the thread. Thanks to @Joy letting me see the setup on their server I was able to duplicate the bug and fix it. So everyone using the farming mode with chunk persistence on should download the newest version.
     
  31. No crashes after a period we'd surely have had a crash, so this is looking good :)
     
    Tux2 likes this.

Share This Page