[MECH] MineralManager v2.2.1 - Enrich your World! [1.6.4-R2.0]

Discussion in 'Archived: Plugin Releases' started by Paradox, Mar 11, 2012.

  1. Offline

    Paradox

    Updated 10/31/2013
    MineralManager - Enrich your World! [1.6.4-R2.0]
    Version: v2.2.1
    Tested Through: 1.6.4-R2.1
    DevBukkit - http://dev.bukkit.org/bukkit-mods/mineralmanager/

    Check out the DevBukkit for the latest news, releases, and information!

    Features:
    • Ability to manage any type of natural block.
    • Blocks respawn when mined with custom cooldown timers.
    • Blocks have a chance to be destroyed when mined based on custom degradation probabilities to prevent having infinite resources.
    • Messages that will tell players how long until a block is reset when it is mined. As well as messages that let players who attempt to mine an unavailable block know what the block will be when it re-spawns.
    FAQ:
    • [Q] Will I need to make a new world in order to use this plugin?
      [A] No! You can use MineralManager with an existing world, no problem.
    These pictures are from an older version of MineralManager (aka MineralVein) but they still give the a sense of the general idea of the plugin.

    A typical view while mining.
    [​IMG]

    MineralManager keeps blocks around so you can mine them later.
    [​IMG]

    But degredation keeps the server from flooding with resources.
    [​IMG]

    Once an ore has been mined you can check to see what kind of ore it is, but it won't tell you how long until it respawns to stop ninja's from stealing it!
    [​IMG]
     
  2. Offline

    md_5

    Just 1 rb in title (R8) please Paradox
     
  3. Offline

    Paradox

    Oh sorry about that, I wasn't sure if you wanted just the RB or just the latest tested version so I thought I'd just put both. :)
     
  4. Offline

    md_5

    Please use a proper download link, your devbukkit one is fine
     
  5. Offline

    Paradox

    Sounds good! Just curious, is there a rule against having links to download it from outside of bukkit.org? Or is it just because it's better practice because its safer / more controlled?
     
  6. Offline

    md_5

    Mostly the latter, removed them for you. Approved
     
  7. Offline

    shikohadou

    i noticed if you add theses to your config.yml u can have the rest of the resources ^_^

    little note on editing the degrade, lower the number the better i think?

    Code:
    MineralVein:
      Cooldowns:
      - REDSTONE_ORE: 1000
      - GLOWING_REDSTONE_ORE: 1000
      - LAPIS_ORE: 1000
      - GOLD_ORE: 4800
      - DIAMOND_ORE: 3600
      - GOLD_ORE: 1440
      - IRON_ORE: 60
      - COAL_ORE: 60
      Degrade:
      - REDSTONE_ORE: 0.1
      - GLOWING_REDSTONE_ORE: 0.1
      - LAPIS_ORE: 0.102
      - GOLD_ORE: 0.01837
      - DIAMOND_ORE: 0.0625
      - GOLD_ORE: 0.125
      - IRON_ORE: 0.25
      - COAL_ORE: 0.5
    //0.5=2 mines possible
    
     
  8. Offline

    shellofchaos

    2 questions.
    1.) do you need to make a new world?
    2.) is it possible to just replace it for cobblestone instead of bedrock? (or make it changeable in the config)
    since if it would be in the middle of a plot ur mining than bedrock would be pretty nasty.

    looks great might consider it if these are more clear/fixed :)
     
  9. What if the ore vein also had a chance to disappear, causing it to not become unlimited resources?
     
  10. Offline

    Tulips

    mm... ye making chance for the core to be broken and not regenerate, but as cobble it would be better

    EDIT: i found a bug.. when i reload the server they reset to being their ores, people might exploit it when im updating plugins, resetting or reloading to add permissions
     
  11. Offline

    Paradox

    Thank you. :)

    shikohadou Degrade is the probability that when you mine the block that it won't reset and will simple dissapear. So if you want to be able to mine things twice, statistically you should have 50% chance to degrade so you should set degrade to 0.5.

    Also, you can add any block you want into the config.yml and it should work with MineralVein, at least any natural block. Beds and stuff won't work I don't think.

    shellofchaos You do not need to make a new world, the plugin should start working as soon as you put it into your plugins folder. If there are any other clarifications you would like please let me know and I'll update my post as well as bukkitdev.

    I could make it so you can customize which ore is used as the replacement. The reason I had it replace it with bedrock is to keep people from destroying the block since it will turn back into its original resource after the cooldown.

    Would you want to make it so that it is replaced with cobblestone initially and then after a certain period of time the cobblestone is replaced with the original ore? What would you want to happen if someone mined the cobble? Should it just replace the air block with the original ore then after the cooldown? Any info would be a big help :)

    CrusaderDeleters That's how the plugin works! :) The degrade parameter in the config.yml is that chance that that block has to disappear.

    Tulips Thanks! So would you want it to have a chance to turn into cobble instead of just disappear? Or do you want it to have a chance to dissapear, and instead of turning into bedrock turn into cobblestone instead?

    As for the bug, it was intended as no permanent information about the blocks are stored. I can set it up so that it saves all of the information as a text file and instead sets all blocks that have been mined to their "mined" state. However right now if I did that the cooldown would start up again from the beginning instead of where it was. I'll look into fixing this though as I can see how that would be an issue. For now, if you use the plugin I would suggest limiting the amount of server shutdowns in order to avoid this issue. :)
     
  12. basicly, can i create a world WITHOUT resources in the ground and add this and make this as PUPLIC mine where people must use this?
     
  13. Offline

    Paradox

    Yes! Assuming that you manually place the resources in the mine yourself. MineralVein doesn't edit your map, it just works with what's already there.

    I would suggest using a degrade of 0.0 if you're going to do something like that. :)
     
  14. Offline

    CarrotPCdude

    Looks good. I'm gonna give this a go on my server because no-one really goes very far from the spawn, so the resources are depleted pretty fast. Just earlier today I was thinking I really need something to regenerate natural caves, but that would be waaaay too hard to make, since it would need to not regenerate man-made mines. This plugin sounds like it should do everything required to keep a good mineral supply going. :)
     
  15. Offline

    Paradox

    I'm glad you're interested! I'm curious as to what you mean by "it would need to not regenerate man-made mines" though. If my plugin doesn't offer what you're looking for, but close, please let me know and I'll do my best to fix / update it to meet your needs! :)
     
  16. Offline

    CarrotPCdude

    By "it would need to not regenerate man-made mines" I meant that if there was a plugin which would regenerate entire caves, as opposed to just the minerals, it would need to be made not to regenerate mines which players had dug themselves, otherwise the players would just keep losing any progress they had made. Such a plugin would be almost impossible to make though. From what I've read here on Bukkit forums/Bukkit dev your plugin will do what I need it to, and what it is possible to do. I will give some more feedback once I actually have it working, because I have a whole heap of plugins to update, and I found a set of new plugins which I'm also installing.
     
  17. degrade of 0.0? what does the degrade do? / mean? sry my bad english.
    Also do u have any idea how i could create a world WITHOUT resources at start?
     
  18. Offline

    Paradox

    CarrotPCdude I get it! Yea, MineralVein should work perfectly for you then!

    Semirotta Degrade is a parameter than you can change in the config.yml files that MineralVein generates when you run the server with the plugin installed. Setting the degrade to 0.0 will make it so the blocks don't have a chance to be permanently destroyed when you mine them.

    As far as making a world without any resources you could use something like WorldEdit (http://forums.bukkit.org/threads/edit-sec-admn-worldedit-world-editing-de-griefing.62/) and use its replace command to replace all of the resources with stone. I don't know if there is a way to generate a world without any resources but using WorldEdit you can make your current world have none.
     
  19. Offline

    CarrotPCdude

    I've just got the server running again, with updates and new plugins.
    I tried mining a block of iron next to some lava first of all, and the bedrock pushed the iron into the lava. Would it be possible to make the replacement block air by default? Bedrock also means you can't reach resources behind the block you just mined.

    Edit: I also can't continue my current tunnel in the same line because the bedrock blocks it when I try to mine some iron which is in the way.
     
  20. Offline

    Paradox

    True, that was the big downside to doing it the way I did. I'll get and update out that'll let you pick a custom block to replace it with. The only downside to not replacing it with some sort of unbreakable block is that there will be no way to know what block was there originally.
     
  21. Offline

    CarrotPCdude

    Could you perhaps make it so the replacement block was something like a flower, or a dead bush? Or would that need too much extra coding to prevent removal of the flower when it's hit?
    Also, can you give a prediction as to when to expect the update including configurable blocks to be released?
     
  22. Offline

    Paradox

    I've got the update to allow custom replacement blocks done. I was just going to make a few more changes before I uploaded it to Bukkit. As far as using a dead bush or flower (or some other object you can walk through), I really like the idea and I'll look into it. :)
     
  23. Offline

    CarrotPCdude

    I just used winrar to look inside the .jar file, and I noticed the config.yml in the .jar file has a lot more detail at the top (eg. advice about using GLOWING_REDSTONE_ORE) than the config.yml in the MineralVein folder. Is this just me or should the config file in the MineralVein folder have the extra detail at the top?
    Regarding your note about people offering to peer assess the code, I'd LOVE to, the only problem is I know nothing at all about coding java. :p
     
  24. Offline

    shikohadou

    Paradox thanks for the reply, i dont understand java that well and is it possible to make the ores drop more then 1 of each resoucre like iron ore only drops one iron block, is it possible to config it to drop 2+ blocks per mining it?

    also i love this mod its very nice to see easy to use and not be over complex! ^_^
     
  25. Offline

    Paradox

    I have updated the plugin to v1.1! Please check out the change log and download the new file!

    That was an issue with Bukkit's copyDefaults method that I was using to copy the default config.yml into the MineralVein folder. I fixed it now though!

    As far as peer review, the goal of it is to improve my code more than to teach others. So by default I would need someone more experienced than me if I want to improve. Thanks for the offer though! If you are learning and have any questions though I'm certainly willing to help. :)

    Thanks! I'm very glad that you like the mod! As far as making the ore drop multiple blocks when it is mined, I think there are a few plugin's out there that already do something similar to that. I know McMMO has a system where as you level up mining you have a chance for every block you break to drop multiple resources.

    I am planning on making a separate plugin sometime in the near future that will do something like what you're asking, although I'm not sure how that will turn out and when it will be available. :)
     
  26. Paradox
    How the heck i set the area for this plugin? or is it everywhere in world?! :O
    Cant i claim certain area with for example //wand tool?

    EDIT:

    downloaded plugin, placed into plugins folder, reloaded server and after breaking a iron_ore -> this showd up

    Code:
     
    2012-03-16 02:33:55 [SEVERE] Could not pass event BlockBreakEvent to MineralVein
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
    at net.minecraft.server.ItemInWorldManager.breakBlock(ItemInWorldManager.java:218)
    at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:173)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:626)
    at net.minecraft.server.Packet14BlockDig.handle(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
    at me.hellfire212.MineralVein.BlockMinedListener.onBlockBreak(BlockMinedListener.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    ... 12 more
    2012-03-16 02:33:59 [SEVERE] Could not pass event BlockBreakEvent to MineralVein
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
    at net.minecraft.server.ItemInWorldManager.breakBlock(ItemInWorldManager.java:218)
    at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:173)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:626)
    at net.minecraft.server.Packet14BlockDig.handle(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
    at me.hellfire212.MineralVein.BlockMinedListener.onBlockBreak(BlockMinedListener.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    ... 12 more
     
  27. Offline

    Paradox

    The area for this plugin is the entire world! As for the error you posted. Can you please submit a ticket on BukkitDev for me? :)
     
  28. i cant, my chrome wont give referree or something ^_^
    sey
     
  29. Oh, sweet. Then this plugin isn't that bad with a custom world generator that changes how often an ore may spawn.
     
  30. Offline

    xBloodydaggerx

    Quite the amazing plugin in I have to say.. I use it on my server and it works as stated.. I just have one question.. or suggestion.. Is there anyway to completely get rid of the message that pop up when you mine something? Sometimes while your down in the mine and mining away.. and the messages keep popping up about.. This Iron_Ore will be ready.. etc.. it drives you alittle mad.. or.. maybe a suggestion on giving an option to turning it off perhaps? Besides that.. keep up the great work!
     

Share This Page