[INACTIVE][MECH] AnyReg v0.3c - Fixed crash after build 274 [300]

Discussion in 'Inactive/Unsupported Plugins' started by DiddiZ, Jan 23, 2011.

  1. Offline


    AnyReg - Respawns Everything (as long as it's a block)
    Version 0.3c

    Since a had to work a lot for LogBlock, AnyReg a bit fell into oblivion. Therefore I'm glad that FlingeR updated it. I'm still not abandoning AnyReg.

    AnyReg mainly respawns mined clay blocks at a adjustable rate.
    AnyReg initially was released as ClayReg, that only was able to respawn clay. For every block type different settings can be made. If the config can be precised which block respawns at which rate, with which percentage, which blocks can pe replaced by a respawning block and wether player placed blocks should respawn. Due to some blocks beeing very rare, it could be preferable to have regenerating these blocks.
    E.g. respawning clay will replace air and water but nothing else so you can build on a claypit withhout getting blocks from the building replaced. Created clay blocks will be detected, so you can place new clay pits (or not depending of the config). Blocks destroyed with super pickaxe or WorldEdit/CuboidPlugin like editors won't respawn.
    This also appies to AnyReg, unless AnyReg isn't limited to clay. Ideas for regenerating blocks:
    • Clay
    • Pumpkins
    • Flowers and mushrooms
    • Ores and coal
    • Sand
    • Snow
    • Lightstone
    I'm sorry for the short default config only containing clay and pumpkins, a larger version is comming with the regions update, that will propably crash the actual config.

    • Respawns mined selected block
    Download, Config and Details:

    • AnyReg v0.3c (Feb. 10, 2011)
      Requires CraftBukkit 300
      • Fixed crash after craftbukkit build 274
  2. Offline


    Released v0.3b
    Removed listener for "/#stop" command, it saves at server shutdown when bukkit disables all plugins, so there is no need for using "/#stop" to keep the blocks.
    Added a timer that saves all block files (there is a new config entry for that "saveDelay")
    So there are now 3 cases that saves a blocks file:
    1. Every regeneration cycle (but they can take some hours)
    2. Every save cycle
    3. At server shutdown
  3. Offline


    I have an idea, could you make it so that if say a gold tool is used to remove a re-spawning block it dose not re-spawn? Maybe even make the tool configurable?
  4. Offline


    Ah, good idea. Makes really sense.
    Going to implement this on next update
  5. Offline


  6. Offline


    Does anyone has a config for flowers etc?
    I would like to make a larger default config, but I don't have good reg values.
    --- merged: Feb 5, 2011 5:20 PM ---
    Working on sqlite at the moment
  7. Offline


    heres what i use.
    saveDelay : 300000
    respawn : [82, 86 ,14, 15, 16, 37, 38, 39, 40, 56, 73]
    # Clay, replaces air and water
    "82" :
      regDelay : 100
      regChance : 0.05
      useBlacklist : true
      canReplace : [0, 8, 9]
    # pumpkin replaces air
    "86" :
      regDelay : 4320000
      regChance : 0.05
      useBlacklist : true
      canReplace : [0]
    # goldore replaces air
    "14" :
      regDelay : 4320000
      regChance : 0.05
      useBlacklist : true
      canReplace : [0]
    # ironore replaces air
    "15" :
      regDelay : 4320000
      regChance : 0.05
      useBlacklist : true
      canReplace : [0]
    # coalore replaces air
    "16" :
      regDelay : 4320000
      regChance : 0.05
      useBlacklist : true
      canReplace : [0]
    # flower replaces air
    "37" :
      regDelay : 300000
      regChance : 0.9
      useBlacklist : true
      canReplace : [0]
    # rose replaces air
    "38" :
      regDelay : 300000
      regChance : 0.9
      useBlacklist : true
      canReplace : [0]
    # brownmushroom replaces air
    "39" :
      regDelay : 300000
      regChance : 0.9
      useBlacklist : true
      canReplace : [0]
    # redmushroom replaces air
    "40" :
      regDelay : 300000
      regChance : 0.9
      useBlacklist : true
      canReplace : [0]
    # DIAMONDore replaces air
    "56" :
      regDelay : 4320000
      regChance : 0.05
      useBlacklist : true
      canReplace : [0]
    # redstoneore replaces air
    "73" :
      regDelay : 4320000
      regChance : 0.05
      useBlacklist : true
      canReplace : [0]
  8. Offline

    Don Redhorse

    hmm the plugin sounds cool, but how do you limit it to a certain area? for example I want to dig a street through a sanddune... so I have the dig now.. I pave the street... I wait.. and the dig is filled with sand again because the blocks on top of the pavement where air. Correct?

    Would it be possible to just allow this to certain areas?

    One of our players made a BIG pyramid out of sand... but he also needed to dig some space around the pyramid.. in this case your plugin wouldn't have made that possible...

    just checking... NOT complaining ;-)
  9. Offline


    I'm planning this as a future feature.
    By now, you only can disable sand respawn, replace the sand with dirt (or something that doesn't regenerate) until the next regeneration cycle or mine the sand with super pick axe to avoid the block demage event.

    Regions are planned, but requires a different config format (I'm thinking about world wide regions to select a single world on a multiworld server)
    I thougt through that idea once more, and came to 2 results:
    1. This is really necessary
    2. Gold tools aren't fitting
    Maybe a command like "/reg on" and "/reg off" but that's a bit inefficient.
    Maybe a certain tool/block at a certait inventory slot? Even no good.
    When I have an idea for that, or I hear a good one, I'll add this immediately.

    The next update will be SQLite for block list saving (now I have to also store the world), and maybe MySQL support.
    On my server was still a loss of blocks, caused by server crashes (resp. plugins that crashed the server, in particular wool color giver). I hope to avoid loss with databases ...
  10. Offline


    IMHO, that should be done in reverse. Makes gold useful for something and is slightly alchemyish. Now you have a motivation to go mine some gold and make tools with it, because those tools get you more resources.

    Also, WorldEdit region support for allowing regen would be nice. I'd like to deny the whole whole regen, and manually add areas that I want to regen.
  11. Offline


    I just set up a server 2 weeks ago. It is just a private server for family and friends. About 3 days ago i installed CraftBukkit to the server and it is working fine (I did use the newest version). Yesterday I installed AnyReg. I set up the config file with the following just to test:

    saveDelay : 300000
    respawn : [03]
    # Dirt replaces air
    "03" :
    regDelay : 100
    regChance : 1.0
    useBlacklist : true
    canReplace : [0]

    I Added AnyReg to my server properties and restarted the server. It was not working. After checking a few things i noticed that Version 0.3b requires CraftBukkit build 166.

    I deleted the CraftBukkit jar file and put in the 166 build jar. The server has saved the Dirt log and is loading the plugin, but I can not get the Dirt to respawn.

    This is the first server i have created and this is the ONLY plugin installed. Am i missing something?

    Also i did have a question... If someone mines clay, or diamonds, or whatever and after the respawn cycle the block does not respawn because it was set to 10%. Does the block then have a 10% chance again to respawn at the end of the next cycle? Or is it wiped from the log files never to respawn again?
  12. Offline


    I'm confused by your description: Does this only restore clay? As that's what it appears to be.
  13. Offline


    No it restores whatever u set up in the config file. The description Just says clay cause the plugin was originally written for clay ONLY(when it was named ClayReg). It has been modified since then, Diddiz just missed that part in the description.
  14. Offline


    I think you just have to delete the 0 in 03
    Should be:
    respawn : [3]
    # Dirt replaces air
    "3" :
    --- merged: Feb 8, 2011 9:00 PM ---
    I'll have to do this too, right?
  15. Offline


    hmm... I know when i read the description before it was a little confusing. Seems completely fine now.
    Nope, i understand the description. But the Reference to ClayReg might be confusing to people that never used it and don't understand what the description is saying...
    Thanks DiddiZ ill try this when i get home. Thanks for the quick response.

    I was wondering, with Craftbukkit do i HAVE to use build #166? Or will the plugin work for an build 166 or later?
  16. Offline


    Not really. I don't have a real overview of bukkit versions, so i write the version which I used while coding.
    At the moment I use 230 and it still works, (it also works on 271, but only with one world)
    --- merged: Feb 9, 2011 12:16 PM ---
    The block has a 10% chance to respawn every cycle, it will be only deleted, if there is something placed insteed, which cannot be replace by a respawning block (canReplace config)
  17. Offline


    This keeps happening to me.

    Terminal says this when I break a sand block:
    Exception in thread "Timer-0" java.lang.NoSuchMethodError: org.bukkit.Server.getWorlds()[Lorg/bukkit/World;
    at com.bukkit.diddiz.AnyReg.AnyReg$RegTimerTask.run(AnyReg.java:165)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)

    Here is my config/yml:

    saveDelay : 0
    respawn : [12, 86]
    "12" :
    regDelay : 100
    regChance : 1
    useBlacklist : false
    canReplace : [0, 8, 9]
    "86" :
    regDelay : 4320000
    regChance : 0.05
    useBlacklist : true
    canReplace : [0]

    i want sand to spawn really fast (like 1 or two seconds) any help is appreciated.

    I have the latest craftbukkit as of Feb 8 2011
  18. Offline


    This is alredy the reason. Like the big red text in the main post says, AnyReg doesn't works with any bukkit version with mutiworlds
  19. Offline


    how do i downgrade then haha
  20. Offline


    Released v0.3c
    Just fixed some lines of code, to avoid the crash after build 274.
    AnyReg only works with the first world on a server. I'm working on multiworld support and MySQL, but this took longer thas estimated, so I pushed this crash fix.
    Regions are a brainteaser, cause they are meant to be editable ingame, editable by hand (and so human readable) and contain wildchars.
    Here is an example:
      - name : Everywhere
        region : '*:*:*:*'
        respawn : [82, 86]
      - name : Lightstone
        region : '1:*:*:*'
        respawn : [89]
      - name : SandAtSealevel
        region : '0:*:64:*'
        respawn : [12]
      - name : Gravelpit
        region : '0:-23 -18:60 65:54 62'
        respawn : [13]
    Name should be clear, region is marked as world:x-axis:y-axis:z-axis with wildchars and ranges, and last, respawn are again the regenerationg blocks. This regions system seems to me to be very powerfull, but the weakpoint is that respawn rates are still given server wide. But any method I mind to set them also in the regions ended up very confusing.
    If you have improvements to the markup or the notaion, say it, I'm still in planning phase.

    PS: Regions will totally come
  21. Offline


    The link is dead. I would really like to get this tho :-D
  22. Offline


    huh ...
    link isn't dead ... not really
    mysterious white page, try reloading
  23. Offline


    need update:
    16:36:17 [SEVERE] Could not load plugins\AnyReg.jar in plugins: null
    	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:80)
    	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:129)
    	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:94)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.bukkit.diddiz.AnyReg.AnyReg.<init>()
    	at java.lang.Class.getConstructor0(Unknown Source)
    	at java.lang.Class.getConstructor(Unknown Source)
    	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:75)
    	... 8 more
    CB build 493
  24. Offline


    I'm still working on sqlite and regions. Regions are done, sqlite halfway. I spendet much time in LogBlock, but now I plan to be done this weekend.
  25. Offline


    For now, regions work, sqlite works, regenerating works, only blacklists are still to do
  26. Offline


    I'm still working on it, but LogBlock has a higher priority.
  27. Offline


    Now, regions ans sqlite works, the only thing to do is the respawn blacklist
  28. Offline


    Now, everything works, exept that sqlite is way to slow, and can lag the server.
    Working on mysql
  29. Offline


    Do you have multiworld support? If not, consider this to be a feature request. :p
  30. Offline


    With the new version comes support for as many worlds as you wish

Share This Page