[INACTIVE][MECH] Mining Drops v0.3 - Customize drops and their frequencies [860 - 1000]

Discussion in 'Inactive/Unsupported Plugins' started by AlbireoX, Jun 14, 2011.

  1. Offline

    AlbireoX

    Mining Drops
    Version: v0.3 Download: Link Source: Github

    Drops random crap when blocks break. No big deal.

    Features:
    • Configurable item drop frequencies per block
    • Any block other than air can drop an item
    • Multiple drops per block (i.e. stone can have a chance of 1% for gold and 0.5% of diamond dropping)
    • XOR (Exclusive or) Setting: you can make it so that multiple blocks don't drop at once
    Configuration:

    The configuration in plugins/AlbieRPG/Skills/Mining.yml works as follows:
    Show Spoiler

    Code:
    blocks:
        blocktobreakid:
            options:
                xor: true or false, do you want drops mutually exclusive (one or the other)?
            drops:
                drop1blockid:
                    rate: integer from 1 - 10000, basically percentage of drop rate * 100
                    amount: amount of the item you want to drop

    Any questions on the above, please post here. I don't know how to make it more clear, but it looks kinda vague. You can have an unlimited amount of drops and blocks to break.



    Changelog:

    Version 0.3
    • Fixed an issue where it would still drop even if the block was protected.
    • Internal renaming of files
    • Git
    • Updated for 950
    Version 0.2
    • Added XOR
    • YAML instead of Properties file
    Version 0.1

    • Release
    Todo:

    • Integrate with AlbieRPG Core and make a simple leveling system
    Credits:

    • #bukkitdev - Thanks for putting up with my lack of Java skill and annoying questions.
     
    Mabobber likes this.
  2. Offline

    ChrizC

  3. Offline

    AlbireoX

    Sorry, it was rather late when I posted this. Thanks. Also, I changed the plugin name so it looks more attractive.

    So do you like the plugin?

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

    Taemera

    I sure do!
     
    AlbireoX likes this.
  5. Offline

    AlbireoX

    Thanks for the feedback! Anyone else? Please reply if you download!
     
  6. Offline

    Shurfire

    so i could chancge the drop rate? so could i chancge the drop rate of sand from 100% to 5%? or is it just extras like destroy a stone 1% drop rate for a stone and gold block. does it do just the 2nd expample or both. or just the first.
     
  7. Offline

    cholo71796

    Are drop events mutually exclusive? Can you make that possible if not?
     
  8. Offline

    AlbireoX

    It's extras. The normal drop always drops, but the custom drop has a set rate.

    I can make this possible; I'll do that now. It'll be a setting.

    Version 0.2 released with YAML and mutually exclusive drops.

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

    jamescosten

    Tried it and got this

    Show Spoiler
    08:29:49 [SEVERE] while parsing a block mapping
    in "<reader>", line 2, column 5:
    '1':
    ^
    expected <block end>, but found BlockMappingStart
    in "<reader>", line 12, column 6:
    '3':
    ^

    08:29:49 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:576)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:228)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
    08:29:49 [SEVERE] at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    08:29:49 [SEVERE] at org.bukkit.util.config.Configuration.load(Configuration.java:82)
    08:29:49 [SEVERE] at me.albireox.arSkMin.arSkMinConfig.loadConfig(arSkMinConfig.java:71)
    08:29:49 [SEVERE] at me.albireox.arSkMin.arSkMinConfig.getKeys(arSkMinConfig.java:159)
    08:29:49 [SEVERE] at me.albireox.arSkMin.arSkMinBlockListener.onBlockBreak(arSkMinBlockListener.java:66)
    08:29:49 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:482)
    08:29:49 [SEVERE] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    08:29:49 [SEVERE] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    08:29:49 [SEVERE] at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:159)
    08:29:49 [SEVERE] at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:121)
    08:29:49 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:456)
    08:29:49 [SEVERE] at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    08:29:49 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    08:29:49 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    08:29:49 [SEVERE] at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    08:29:49 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    08:29:49 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    08:29:49 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:29:49 [SEVERE] Could not pass event BLOCK_BREAK to AlbieRPG
    java.lang.NullPointerException
    at me.albireox.arSkMin.arSkMinConfig.getKeys(arSkMinConfig.java:160)
    at me.albireox.arSkMin.arSkMinBlockListener.onBlockBreak(arSkMinBlockListener.java:66)
    at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:482)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:159)
    at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:121)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:456)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:29:52 [SEVERE] while parsing a block mapping
    in "<reader>", line 2, column 5:
    '1':
    ^
    expected <block end>, but found BlockMappingStart
    in "<reader>", line 12, column 6:
    '3':
    ^

    08:29:52 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:576)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:228)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
    08:29:52 [SEVERE] at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    08:29:52 [SEVERE] at org.bukkit.util.config.Configuration.load(Configuration.java:82)
    08:29:52 [SEVERE] at me.albireox.arSkMin.arSkMinConfig.loadConfig(arSkMinConfig.java:71)
    08:29:52 [SEVERE] at me.albireox.arSkMin.arSkMinConfig.getKeys(arSkMinConfig.java:159)
    08:29:52 [SEVERE] at me.albireox.arSkMin.arSkMinBlockListener.onBlockBreak(arSkMinBlockListener.java:66)
    08:29:52 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:482)
    08:29:52 [SEVERE] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    08:29:52 [SEVERE] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    08:29:52 [SEVERE] at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:159)
    08:29:52 [SEVERE] at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:121)
    08:29:52 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:456)
    08:29:52 [SEVERE] at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    08:29:52 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    08:29:52 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    08:29:52 [SEVERE] at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    08:29:52 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    08:29:52 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    08:29:52 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:29:52 [SEVERE] Could not pass event BLOCK_BREAK to AlbieRPG
    java.lang.NullPointerException
    at me.albireox.arSkMin.arSkMinConfig.getKeys(arSkMinConfig.java:160)
    at me.albireox.arSkMin.arSkMinBlockListener.onBlockBreak(arSkMinBlockListener.java:66)
    at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:482)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:159)
    at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:121)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:456)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:29:53 [SEVERE] while parsing a block mapping
    in "<reader>", line 2, column 5:
    '1':
    ^
    expected <block end>, but found BlockMappingStart
    in "<reader>", line 12, column 6:
    '3':
    ^

    08:29:53 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:576)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:228)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
    08:29:53 [SEVERE] at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    08:29:53 [SEVERE] at org.bukkit.util.config.Configuration.load(Configuration.java:82)
    08:29:53 [SEVERE] at me.albireox.arSkMin.arSkMinConfig.loadConfig(arSkMinConfig.java:71)
    08:29:53 [SEVERE] at me.albireox.arSkMin.arSkMinConfig.getKeys(arSkMinConfig.java:159)
    08:29:53 [SEVERE] at me.albireox.arSkMin.arSkMinBlockListener.onBlockBreak(arSkMinBlockListener.java:66)
    08:29:53 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:482)
    08:29:53 [SEVERE] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    08:29:53 [SEVERE] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    08:29:53 [SEVERE] at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:159)
    08:29:53 [SEVERE] at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:121)
    08:29:53 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:456)
    08:29:53 [SEVERE] at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    08:29:53 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    08:29:53 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    08:29:53 [SEVERE] at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    08:29:53 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    08:29:53 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    08:29:53 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:29:53 [SEVERE] Could not pass event BLOCK_BREAK to AlbieRPG
    java.lang.NullPointerException
    at me.albireox.arSkMin.arSkMinConfig.getKeys(arSkMinConfig.java:160)
    at me.albireox.arSkMin.arSkMinBlockListener.onBlockBreak(arSkMinBlockListener.java:66)
    at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:482)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
    at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:159)
    at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:121)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:456)
    at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    08:29:54 [SEVERE] while parsing a block mapping
    in "<reader>", line 2, column 5:
    '1':
    ^
    expected <block end>, but found BlockMappingStart
    in "<reader>", line 12, column 6:
    '3':
    ^




    The mother of all spam, i had to shorten into multiple spoilers.

    Was more than 200000 characters cannot post :?
    So put up on pastebin : http://pastebin.com/A5mikZ1C
     
  10. Offline

    AlbireoX

    Can I see your config file please?
     
  11. Offline

    jamescosten

    Its just the default config, nothing changed. I deleted as this kept getting annoying so no config avaliable sorry.
     
  12. Offline

    AlbireoX

    I'm guessing you downloaded the wrong version of the plugin somehow. The default config file shouldn't have a "'3':".
    Could you please try redownloading the plugin? Thanks.
     
  13. Offline

    Mabobber

    Sorry, I am quite unfamiliar with the language used to make these plugins work (in the yml file), and it seems as though it's left to the server operator to set this up from scratch? I really hope to get this plug-in working as me and a couple friends only ever really mine and just explore and this would add a welcome level of excitement.

    All I am really after is like a 10,8,6,4,2% chance of Coal, Iron, Redstone, Gold, Diamond, respectively, dropping upon mining stone so that we can strip mine! If anyone can show me how to make that work it would be greatly appreciated! :)
     
  14. Offline

    AlbireoX

    Look at the default configuration it generates and compare that to the example config I have in the post. You will need the block ids of all of those things. (Go to MCWiki) If you still need help, post the current config.yml file under /plugins/AlbieRPG/Skills/Mining.yml (I will change that as it really isn't a part of AlbieRPG yet lol)
     
  15. Offline

    Mabobber

    Code:
    blocks:
        '1':
            options:
                xor: false
            drops:
                '14':
                    rate: 100
                    amount: 1
                '15':
                    rate: 50
                    amount: 1
    
    I really have no clue. -_- Sorry.
     
  16. Offline

    AlbireoX

    No problem, all you have to do is this:

    Code:
    blocks:
        '1':
            options:
                xor: false
            drops:
                '263':
                    rate: 1000
                    amount: 1
                '15':
                    rate: 800
                    amount: 1
                '331':
                    rate: 600
                    amount: 1
                '14':
                    rate: 400
                    amount: 1
                '264':
                    rate: 200
                    amount: 1
    
    Set that to be your Mining.yml.
    Also, go here: http://www.minecraftwiki.net/wiki/Data_values#Block_IDs_.28Minecraft_Beta.29
    That place has all of the block ids just in case you need them.
     
    Mabobber likes this.
  17. Offline

    Mabobber

    Oh! You're a champ sir, thanks for all your help.
     
  18. Offline

    AlbireoX

    No problem!
     
  19. Offline

    p000ison

    can you add permissions support for special groups?
     
  20. Offline

    AlbireoX

    ? what do you mean?
     
  21. Offline

    Milchshakee

    He means that only specific groups can get modified drops ..not every player
     
  22. Offline

    alfskan

    rate: 50 means 50%? 5% 0.5%?
    and
    rate: 500 means 50? 5? 0.5?
     
  23. Offline

    AlbireoX

    50 means 0.5%.
    500 means 5%.
     
  24. Offline

    Campouze

    config :
    Blocks or items never loot :/
     
  25. Offline

    AlbireoX

    YAML requires indentation... Put your config in code tags or something, please.

    Also, you should only be putting "blocks" in once.
     
  26. Offline

    STALKER543

    Hi!You have a really nice mod.My server is improved rly good.But its impossible to make them drop other coloured wool,other dyes (cocoa beans,and stuff wich use the same id).There are other id's wich use specific data to drop different items.Is there a way to do this, if not then make it possible.btw thx

    What you mean: Put your config in code tags or something.I got no items when i made more than 2 blocks drop items even if i had something on 10000 % drop rate

    Oh i think it would be better if you could make it with names instead of id's.I mean just add a section "name:".
    Would be rly awesome.

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

    AlbireoX

    It would also make the plugin incredibly slow... :/
     
  28. Offline

    Campouze

    It's ok.

    Good addon ;)

    Thanks
     
  29. Offline

    Zarius

    I'm working on the OtherBlocks plugin and had someone ask me just the opposite (ie. allow access via ID's) :D

    Just wondering why names would it make it slow? If you mean that getting materials by name is slow then you can do this when you load the config so that only the startup is slightly slower. That's what I do, internally all checking is done with getTypeId (I wasn't aware that .getType was substantially slower though...).
     
    _LB likes this.
  30. Offline

    keiran

    i get this error i think it means somthing is outdated im not sure

    [SERVERE} Could not pass event BLOCK_BREAK to MiningDrops
    java.lang.NullPointerException

    what does it mean?
     

Share This Page