[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

    CDJ445544

    FIRST!!!!!!!!!!!!!!:D[cake]

    But seriously this sounds amazing i WILL try it out
     
  3. Offline

    Zenithas

  4. Offline

    Tux2

    You're right, that plugin is very similar to mine, but there are a few differences. Let me sum it up in a nice list:
    What it can do that mine can't:
    • Chuck gravel into water to instantly turn it into clay dust.
    What both of them can do:
    • Turn gravel into clay when flowing water hits the block.
    What mine can do that it doesn't:
    • Require a "Trigger" block under the gravel to turn it into clay (Default is netherrack)
    • Lava and/or water can be used to make clay
    What does this mean to me?
    We both have different design goals. His design goal is to make it easy to get clay. Gravel is faster to dig, and if you can just chuck it in the water, (think of taking those huge piles of gravel in your inventory that you can just throw out the inventory window) it makes for a fast conversion. As for me though, I have several people on my server that would rather not have that huge gravel pit under the water turn into clay while they are digging (although you can configure my plugin to do so). Also, clay is supposed to be a little rarer than gravel and should be a little more work. If you configure it so that you can only use lava, and have the netherrack underneath option, then it means that the player has to actually spend the time and effort to make it (go to the nether to get netherrack, find a lava pit, and have iron to make a bucket), not just find some gravel (which may just be too easy) and make clay. Honestly though, I started work on my plugin and had a working copy on my server before the other one came out, I just had to polish it up and test it before releasing it. Also, when I did find out about the other plugin, mine was different enough to warrant releasing it, in my opinion. (Hey, who doesn't want to be able to convert that gravel with lava! :cool:)

    I hope this answers your questions.
    Tux2
     
  5. Offline

    Zenithas

    It does, with spades! Thanks for that.
     
  6. Offline

    mtszyk

    As a feature suggestion, is it possible to have it take a certain amount of time, or have a probability as a function of time, or something, to change the sand into gravel?
    Basically, so you can imagine it looking like a farm. You plant your sand, and go do things while it erodes to clay.
     
    Tux2 likes this.
  7. Offline

    Tux2

    Hmm... I assume you are talking about gravel into clay, but that would be a really cool feature! I'll see what I can do to implement that. (I have a few ideas running around in my head on how to do it...)
     
  8. Offline

    mtszyk

    Yeah that one, sorry about that =P. Thanks for consideration!
     
  9. Offline

    Tux2

    Idea has been implemented in version 0.4. Please let me know what you think.
     
    mtszyk likes this.
  10. Offline

    darklust

    Right on. I'm aiming for expediency, you've added an alternative challenging method. Good work :D
     
  11. Offline

    mtszyk

    Will be testing this weekend, awesome!
     
  12. Offline

    jamescosten

    I like this plugin a lot, i have made it so base block is Brick. That way, like reeds, u have to find some first before you can start farming. Cause Netherrack you have to spawn and on a PVP server its impossible to get.
     
    Tux2 likes this.
  13. Offline

    Tux2

    Cool jamescosten. I have multiverse installed on my server so I could have a nether, so netherrack was no big deal for me, but I really like the Brick underneath idea. I'll probably be changing the default base block to brick in the next release.
     
    jamescosten likes this.
  14. Offline

    jamescosten

    :D not even a like though :p YEY
    yeah i just thought it would be a more of a challenge, especially on PVP.

    Ok well ive just uploaded a video showing how it woks.
    Please Go check it out if you your thinking of using this plugin.



    Please If you like so your appreciation :)

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

    Tux2

    Hey everyone, I just published version 0.5. I fixed a bug in the farming mode, plus adding another feature, so all of you using it in that way I would strongly encourage to update.
     
  16. Offline

    mtszyk

    I'm using V0.5 and CB740, (plan on updating very soon, pending a few mod updates) MC 1.5.2.
    I have the farm mode on set to a very long delay (50-70 minutes) and the clay only turns when someone is on (maybe must be near by too? untested) for the whole time when the water is flowing.
    Is it possible to have it save the time spent, so that I can spend 30 minutes now, and 30 later?
    Perhaps even have it work when those chunks are not loaded at all?

    Making a town based around a clay factory =P
     
  17. Offline

    Tux2

    It should still increment the gravel even when the chunks aren't loaded, but I don't really know what happens when it comes time for the gravel to turn into clay and the chunk isn't loaded (haven't really been able to test that...)...
    Also, UPGRADE!!!!! There is a big bug in 0.5 when you save the gravel turning into clay. Let me know if any of the issues you are experiencing with 0.5 go away when you upgrade.
     
  18. Offline

    mtszyk

    My apologies, the properties file said it was 0.5, but I actually had upgraded to 0.6 when it came out.
    Regardless, the issue persists in 1.0. I thought it might do with interference of another plugin (PerformanceTweaks's chunk persistence) but I disabled it and still have it.
    Also, thanks for the plugin!
     
  19. Offline

    Tux2

    :) Understandable with the properties file. Nothing changed in the properties file between the 0.5 and 0.6 version, so I didn't update it if it is already there. Also, in the next version I will add an option to keep chunks loaded in memory that has gravel turning into clay, because it could be memory intensive for some users. If you wouldn't mind I would love your help beta testing that feature.
     
  20. Offline

    Soulmirror

    Hello,

    I´ve got a problem, server sais that the plugin is enabled but it doesn´t create the /ClayGen folder in my plugin folder. I´m using 818 with the v 1.0 version of your plugin.
     
  21. Offline

    Tux2

    First off: Do you ever get the message: "ClayGen: - file creation failed, using defaults."
    Also, what operating system are you running and your version of java?
    If you aren't getting the first error message look in your main minecraft folder for a file called "plugins/ClayGen/ClayGen.ini"
     
  22. Offline

    mtszyk

    I'd be happy to, let me know more information when it's ready to test.
     
  23. Offline

    LEOcab

    I want to let you know that I really appreciate you making this plug-in! It comes in very handy now that clay doesn't spawn naturally in maps generated by Minecraft 1.6. I just installed it on my server. I like the variety of options too. You saved my life! Thank you! :D
     
    Tux2 likes this.
  24. Offline

    Deathfromace

    Just want to thank you for the plugin. Its great and I used it as a prize for the end of an event in my server. Had technology advance after a vampire event and the citizens rebuilt the towns with the clay/brick :D
     
  25. Offline

    Taranis01

    @Tux2
    i got this error after trying regenerate a tinyregion with //regen (worldedit). The Server didnt 'crashed' but we got disconnected and werent able to login again.

    Code:
    2011-06-13 15:24:54 [SEVERE] Could not pass event BLOCK_PHYSICS to ClayGen
    java.lang.StackOverflowError
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.PrintWriter.<init>(PrintWriter.java:95)
        at java.io.PrintWriter.<init>(PrintWriter.java:79)
        at org.bukkit.craftbukkit.util.ShortConsoleLogFormatter.format(ShortConsoleLogFormatter.java:54)
        at java.util.logging.StreamHandler.publish(StreamHandler.java:196)
        at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:105)
        at java.util.logging.Logger.log(Logger.java:476)
        at java.util.logging.Logger.doLog(Logger.java:498)
        at java.util.logging.Logger.log(Logger.java:587)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:330)
        at net.minecraft.server.World.k(World.java:423)
        at net.minecraft.server.World.applyPhysics(World.java:411)
        at net.minecraft.server.World.setData(World.java:323)
        at org.bukkit.craftbukkit.block.CraftBlock.setData(CraftBlock.java:91)
        at Tux2.ClayGen.ClayGen.clayWaterRemoved(ClayGen.java:726)
        at Tux2.ClayGen.ClayGenBlockListener.onBlockPhysics(ClayGenBlockListener.java:66)
        at org.bukkit.plugin.java.JavaPluginLoader$25.execute(JavaPluginLoader.java:412)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at net.minecraft.server.World.k(World.java:423)
        at net.minecraft.server.World.applyPhysics(World.java:410)
        at net.minecraft.server.World.setData(World.java:323)
        at org.bukkit.craftbukkit.block.CraftBlock.setData(CraftBlock.java:91)
        at Tux2.ClayGen.ClayGen.clayWaterRemoved(ClayGen.java:726)
        at Tux2.ClayGen.ClayGenBlockListener.onBlockPhysics(ClayGenBlockListener.java:66)
        at org.bukkit.plugin.java.JavaPluginLoader$25.execute(JavaPluginLoader.java:412)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    after that this error continued spaming the logs:
    Code:
    at net.minecraft.server.World.k(World.java:423)
        at net.minecraft.server.World.applyPhysics(World.java:411)
        at net.minecraft.server.World.setData(World.java:323)
        at org.bukkit.craftbukkit.block.CraftBlock.setData(CraftBlock.java:91)
        at Tux2.ClayGen.ClayGen.clayWaterRemoved(ClayGen.java:726)
        at Tux2.ClayGen.ClayGenBlockListener.onBlockPhysics(ClayGenBlockListener.java:66)
        at org.bukkit.plugin.java.JavaPluginLoader$25.execute(JavaPluginLoader.java:412)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
     
  26. Offline

    Tux2

    Wow, never saw that error before! That has now been fixed in the latest version. Thanks for reporting it. :)
     
    Taranis01 likes this.
  27. anychance of permissions like who can use it or who can create one?
     
  28. @Tux2
    Just tested this plugin on CB907 and it seems to run fine, but after a while the server just freezes (happened twice). This was with two clay farms operating in loaded chunks. After disabling plugin, no more freezes. I cant say for certain that its the plugin, but its starting to look like it.

    Other Plugins (open)

    Growbie
    Lampstone
    IPGet
    StairDrop
    ColoredSigns
    AppleTree
    LoginMessage
    iConomyChestShop
    Parties
    SpawnX
    PickBoat
    AdminCmd
    BukkitContrib
    OpenInv
    Elevators
    FenceStack
    AdminMode
    iConomy
    Superpickaxe
    CraftBukkitUpToDate
    SheepFeed
    LWC
    MobLoot
    NoSlimes
    NoExplode
    HeroSneak
    FenceDoor
    PermissionsPlus
    Permissions
    RectractableBridge
    VanishNoPickup
    Tetris
    kFeatherTeleport
    Lockette
    DefaultPermissions
    HigherExplosives
    PorteCoulissante
    NoMoreRain
    HeroicDeath
    properTime
    LogBlockQuestioner
    iChat
    MultiVerse
    Jail
    HomeX
    EasyRules
    Nethrar
    Logblock
     
  29. Offline

    Tux2

    @Sorken Please test on the recommended build 860 and see if the error still appears. Also, it would help to see the config file for ClayGen as well.
     
  30. @Tux2
    I cant run that build due to issues with other plugins.

    Edit: Made a second test server that ran on CB860 and the same crash appears there. This time with only one clay farm in use (6 blocks).

    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 = 3
    #keepchunksloaded keeps all the chunks loaded into memory where gravel is turning into clay.
    keepchunksloaded = false
    #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 = false
    #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 = 12
    #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
     

Share This Page