[INACTIVE][MECH] GrowingOre v0.6- Public mines [860/935]

Discussion in 'Inactive/Unsupported Plugins' started by Streammz, May 6, 2011.

  1. GrowingOre
    Version: 0.6

    With this plugin, you can make public mines easily with ores that respawn after a set time.
    It also has a small chance of baby ores to be born in 5x5 around the ore.
    It makes use of the build-in OP, not by permissions

    Features:
    • Registering specific respawning ores
    • Set-able respawn time
    • Chance of new ores to be spawned in 5x5 area around the ore
    • Timer keeps counting after the server has been restarted (!)
    • Selecting blocks in a radius around you (0.3)
    • Respawning all ores in the world if configured (0.5)
    Download:
    v0.6 - Download


    Commands:
    Code:
    /ore add <itemID> <minutes>
         remove <radius>
         count <radius>
         select
               none
               radius <size>*
         register <radius>*
    
    * = Heavily lags server when used with too high parameters

    Settings file:
    Show Spoiler

    ######General settings######
    Worldwide=false
    GrowTemp=true
    ToolID=295
    Debug=false

    ######Default values for ores######
    GoldTime=90
    IronTime=60
    CoalTime=30
    LapisTime=300
    DiamondTime=600
    RedstoneTime=150


    How to register ores:
    When your an OP, you can select ores using the <ToolID> as tool.
    Whenever you think you have selected all the ores you need, you need to register them:
    use /ore add <itemid> <minutes of delay>
    as example: /ore add 56 15 - respawns diamond ore (ID 56) 15 minutes after it is mined.

    v0.6
    You now can register ores in an radius around you using /ore register <radius>

    Frequently asked questions:
    Show Spoiler

    Q: How do I need select the ores I want to respawn?
    A: Using the tool "seeds" ( /give seeds ), you can right-click the blocks you want to register

    Q: Where do I get the itemID's that I need to use for the ores?
    A: http://www.minecraftwiki.net/wiki/Data_values

    Q: How do I register the selected ores?
    A: using /ore add <itemID> <minutes of delay>

    Q: My ores don't respawn, they just turn into cobblestone/smoothstone
    A: The script calculates the time it needs to change into a specific ore, You'll just have to wait longer

    Q: What happens if i /reload or stop the server?
    A: The script will save all timing / ore data, and will start counting again after the script starts again.

    Q: How do i remove my selected ores?
    A: /ore select

    Q: How do i select all ores around me?
    A: /ore select radius <size>

    Q: I get errors with "OutOfMemoryUsage", should I ignore them?
    A: Please report the error in here, with some information when it happens, how much ores you have registered, selected etc (details helps me improve RAM usage)

    Q: Hello!
    A: Hey :)


    Video:


    Changelog:
    v0.6
    • Fixed all radius effects
    • Fixed wrong folders due to capitals in linux
    • Added /ore register <radius> - registers ore with the default time in settings.txt
    • performance tweak (i wonder how many i can find more of these, they seem pretty common)
    Show Spoiler

    V0.5
    • Support for explosions like creepers/tnt
    • Settings file (auto-generated on load)
    • Possibility to grow all ores in the world
    V0.4
    • Improved RAM usage again (forgot that we don't need timers with 0 delay at startup)
    • Changed the way that /area select radius <radius> works, and its now at least 2x as fast. (also changed limit to 200 radius now)
    V0.3
    • DRASTICALLY improved RAM usage (2500MB to 440MB, anyone?)
    • added /ore select radius <radius>
    • Changed timers to only eat RAM when they are activated
    • fixed baby ores overwriting registered ores
    • Fixed a lot of other major stuff.
    V0.2
    • Fixed using /ore without any parameters
    • Fixed timers if you do /ore remove
    V0.1
    • First release
     
    kahlilnc, po5 and Killie01 like this.
  2. Offline

    Pencil

    Looks pretty cool :D Might be useful someday!
     
  3. Offline

    Quizdonkey

    Definitely grow on this idea, it has huge potential, but needs to be extremely customizable
    goodwork!
     
  4. v0.2 out!
    • Fixed using /ore without any parameters
    • Fixed timers if you do /ore remove

    ps 100th post =D
     
  5. Offline

    Retricide

    Would it be possible to have this public select a large public area, then respawn all different ores an stone, based on percentage, after a certain time?
     
  6. Nope, but maybe i'll add it in an later version
     
  7. Offline

    heroanth2345

    Could you do a little description of all your commands in the thread?
    Because we only have the list. (Like a tutoriel or something like that)

    12:40:46 [GRAVE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'ore'
    in plugin GrowingOre v0.2
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85
    )
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
    55)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:677)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Unknown Source)
    at java.util.Timer.<init>(Unknown Source)
    at java.util.Timer.<init>(Unknown Source)
    at net.gamesketch.bukkit.growingore.methods.RegisteredOre.<init>(Registe
    redOre.java:15)
    at net.gamesketch.bukkit.growingore.methods.SelectedOre.register(Selecte
    dOre.java:27)
    at net.gamesketch.bukkit.growingore.CommandHandler.handle(CommandHandler
    .java:30)
    at net.gamesketch.bukkit.growingore.core.onCommand(core.java:82)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
    12:40:46 [GRAVE] Exception in thread "TimerQueue"
    12:40:46 [GRAVE] java.lang.OutOfMemoryError: unable to create new native thread
    12:40:46 [GRAVE] at java.lang.Thread.start0(Native Method)
    12:40:46 [GRAVE] at java.lang.Thread.start(Unknown Source)
    12:40:46 [GRAVE] at sun.awt.AWTAutoShutdown.activateBlockerThread(Unknown
    Source)
    12:40:46 [GRAVE] at sun.awt.AWTAutoShutdown.notifyThreadBusy(Unknown Sour
    ce)
    12:40:46 [GRAVE] at java.awt.EventQueue.initDispatchThread(Unknown Source
    )
    12:40:46 [GRAVE] at java.awt.EventQueue.postEventPrivate(Unknown Source)
    12:40:46 [GRAVE] at java.awt.EventQueue.postEvent(Unknown Source)
    12:40:46 [GRAVE] at java.awt.EventQueue.invokeLater(Unknown Source)
    12:40:46 [GRAVE] at javax.swing.SwingUtilities.invokeLater(Unknown Source
    )
    12:40:46 [GRAVE] at javax.swing.Timer$1.run(Unknown Source)
    12:40:46 [GRAVE] at javax.swing.Timer$1.run(Unknown Source)
    12:40:46 [GRAVE] at java.security.AccessController.doPrivileged(Native Me
    thod)
    12:40:46 [GRAVE] at javax.swing.Timer.post(Unknown Source)
    12:40:46 [GRAVE] at javax.swing.TimerQueue.postExpiredTimers(Unknown Sour
    ce)
    12:40:46 [GRAVE] at javax.swing.TimerQueue.run(Unknown Source)
    12:40:46 [GRAVE] at java.lang.Thread.run(Unknown Source)
    12:41:06 [GRAVE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'ore'
    in plugin GrowingOre v0.2
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85
    )
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
    55)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:677)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Unknown Source)
    at java.util.Timer.<init>(Unknown Source)
    at java.util.Timer.<init>(Unknown Source)
    at net.gamesketch.bukkit.growingore.methods.RegisteredOre.<init>(Registe
    redOre.java:17)
    at net.gamesketch.bukkit.growingore.methods.SelectedOre.register(Selecte
    dOre.java:27)
    at net.gamesketch.bukkit.growingore.CommandHandler.handle(CommandHandler
    .java:30)
    at net.gamesketch.bukkit.growingore.core.onCommand(core.java:82)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
    12:41:07 [GRAVE] Exception in thread "Thread-5"
    12:41:07 [GRAVE] java.lang.OutOfMemoryError: unable to create new native thread
    12:41:07 [GRAVE] at java.lang.Thread.start0(Native Method)
    12:41:07 [GRAVE] at java.lang.Thread.start(Unknown Source)
    12:41:07 [GRAVE] at org.bukkit.craftbukkit.scheduler.CraftWorker.<init>(C
    raftWorker.java:27)
    12:41:07 [GRAVE] at org.bukkit.craftbukkit.scheduler.CraftThreadManager.e
    xecuteTask(CraftThreadManager.java:14)
    12:41:07 [GRAVE] at org.bukkit.craftbukkit.scheduler.CraftScheduler.proce
    ssTask(CraftScheduler.java:102)
    12:41:07 [GRAVE] at org.bukkit.craftbukkit.scheduler.CraftScheduler.run(C
    raftScheduler.java:58)
    12:41:07 [GRAVE] at java.lang.Thread.run(Unknown Source)
    >
    I get this error when using the command /ore add 56 (diamond ore) 5

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

    godgodgodgo

    Surely if I made a mine and found diamond I could just keep going back to get it again?
     
  9. Offline

    jamescosten

    I like the idea of coal and perhaps redstone regenerating but not diamonds. When this becomes customizable i will dowload
     
  10. @jamescosten @godgodgodgo
    You must select the ores that respawn, not every ore in the world respawns.
    This way you can make a public mine in a city, but outside of it nothing will respawn unless you select them

    @heroanth2345
    Your server ram is full, you should give it more ram or use less plugins that eat ram.
     
  11. Offline

    heroanth2345

    mmmmmkay...
     
  12. Offline

    jamescosten

    Ahhhh, sorry ive read the post properly now :p

    Good job i will give this a go tonight cheers
     
  13. at least, that's what the error says, a lot of "OutOfMemoryException" in there, even for other plugins.
    the reason why this happens when you use my command is becouse it registers new timers etc per ore, which need some ram
     
  14. Offline

    Manbeast77

    Ok, this doesn't really work for me. I tried the commands on some diamond ore as an experiment, but when the ores respawn, they respawn as cobble then turn into stone. You might wanna make a tutorial (detailed) on how to make this actually work and what is needed for it to function properly.
     
  15. i'll give an detailed video instruction tomorrow, for now:

    when you use /ore add 56 15, you register an diamond ore which, after mined, respawns after 15 minutes.
    after 5 sec, it'll turn into cobble, then after (minutes*10) sec, it'll turn to smooth stone. and then after (minute*60) seconds , it'll turn into the diamond ore.
    In this case: *mined* 5 sec later *cobble* 2:30 min later *stone* 15 min later *diamond*
     
  16. Offline

    heroanth2345

    Ok, it works!
    (It's was because of war, it take alot of memory..)
    (Other plugins too but war take more..)
     
  17. Offline

    Manbeast77

    Ok, well that would make quite a bit more sense if it had been explained that way ;)
     
  18. Offline

    angel0fmars

    Great! Makes a miner's job much easier! Especially when iConomy becomes involved :)
     
  19. Offline

    tassox33

    How often do these values calculate, is it a strain on the server?
     
  20. It only calculate values once mined, and I'm not sure if it is a strain, but with 128 ores on my server, it runs perfectly
     
  21. Offline

    Nelien

    I'm not sure I understand what you mean by "selecting" ore, are you selecting each specific ore block so only that block respawns or are you selecting an ore TYPE so that all, say iron, in the world respawns?

    The command doesn't seem to have the functionality of selecting a block since you can only give the arguments ItemID and minutes, so I'm guessing you're selecting all ore of that type in the world. But then again, you mention this being used to make public mines, so how would you restrict the respawn to a certain area?

    Very cool idea none-the-less, helps to keep people to the same areas of the world and not constantly expanding outwards in search for new mines.
     
  22. Offline

    neX!Tem

    You use the seeds to select an ore, then you do /ore add "itemid" "how long it takes to respawn"

    That way you can let ores and other things respawn. also it spreads out like a infection :p
     
  23. Offline

    gamerluke

    Does this work with any item ID?
    I would like to make a minigame of sorts where players get rewarded for bringing items to me
     
  24. Offline

    neX!Tem

    yea it does

    but dont try right clicking on a chest = crash your client
     
  25. this is very nice. with this i would be able to set up zones with respawning resources that players eventually would fight each other to control. i am definately going to be playing around with this, and it has potential to increase the fun on our server. thank you very much.
     
  26. It works with anything yeah, but it still restores to stone etc before returning to the itemID

    I changed the post a bit with some instructions / FAQ, I hope that makes it a bit more clear
    Yes it spreads, but the spreaded ore won't be another registered ore, so it won't take over your world or something ;)

    good to hear ^^
     
  27. Offline

    Aeron

    I love this idea, it has some huge potential, because users won't have to dig large shafts, wipe out all the living in order to get some ores :D


    Question:
    Is the respawn rate global or local for the blocks clicked? Can I set a different respawn rate timer to a different block pile somewhere else, where I click?
     
  28. Offline

    Nelien

    Yes, that makes it a lot more clear. Thank you!
     
  29. V0.3 out!
    • DRASTICALLY improved RAM usage (2500MB to 440MB, anyone?)
    • added /ore select radius <radius>
    • Changed timers to only eat RAM when they are activated
    • fixed baby ores overwriting registered ores
    • Fixed a lot of other major stuff.
     
  30. Offline

    Kostronor

    looks very cool, i'm very interested in seeing the source-code of this! :D
    Can you please release it :)
     

Share This Page