[MECH] OtherDrops 2.8- Ultimate block/mob/player drop editing [1.5.2]

Discussion in 'Archived: Plugin Releases' started by Zarius, Jun 12, 2011.

  1. Offline

    Zarius

    [​IMG]


    Want to fix glass/stairs/boat drops? Want to gather ice/glowstone/grass in a balanced manner? Want to smelt ore with golden tools? Want to cause chaos with undead that rise again? Now you can, simply by enabling the included example files or delve into the more advanced customisation and make drops work the way you want.

    OtherBlocks aims to give you ultimate control over what item that blocks/entities drop when destroyed, depending on how they were destroyed. Compatible with WorldGuard. Lightweight! Only scans what it needs to and ignores the rest.
    Download: BukkitDev (download link on there) | Source Code

    Included Modules
    * Fix undroppables: fix drops for stairs, glass (don't use your hands - ouch), boats & bookshelves (1.8 stairs included)
    * Gold tools (basic): gold tools have a chance of dropping the complete block for grass, ice & glowstone.
    * Gold tools (smelt): gold tools have a chance of mining an ingot directly from ores.
    * Ore Extraction: using the usual tools, ingots are ripped out of ores, leaving the stone behind.
    * Leaf overhaul: adds leaf drops (apples, cocoa, leaves, sticks & a very small chance of golden apple).
    * Undead Chaos: beware the night! Zombies & skeletons rise again and even players rise back from the dead (player deaths spawn more zombies/skeletons).
    * and more...

    Custom Configuration Examples
    Code:
        # Simple glass drop fix
        GLASS:
          - drop: GLASS
     
        # Players drop Zombies on death, 50% of the time
        PLAYER:
          - drop: CREATURE_ZOMBIE
            chance: 50%
     
        # Spiders killed with any sword at night have a 10% chance to drop web,
        # otherwise they drop whatever they normally would
        CREATURE_SPIDER:
          - tool: ANY_SWORD
            time: NIGHT
            drop: WEB
            chance: 10%
     
        # Trees drop apples (or cocoa from birch trees)
        SPECIAL_LEAFDECAY@GENERIC:
          - drop: APPLE
            chance: 5%
        SPECIAL_LEAFDECAY@BIRCH:
          - drop: DYE@BROWN
            chance: 5%
    
    If you are getting errors with the word "snakeyaml" in it, your config file isn't properly formatted.
    Test it on this website (or this one).

    See the dev.bukkit page for full details on how to set up OtherDrops, a complete parameters list and further examples.


    Changelog

    Newest changelog details here.


    Main author: @Zarius
    Contributors: @Celtic Minstrel, raws
    Original author: @cyklo
     
  2. Offline

    Motumbo

    Does this work for 928 yet?
     
  3. Offline

    Zarius

    Don't know and won't be able to test for another six hours or so. If anyone does test it let me know how it goes.

    EDIT: tested and seems to be working fine.

    New version:

    Version 0.9.0z (2011/06/24)
    • weather condition (RAIN, THUNDER, CLEAR or a list)
    • economy support (via Register, supports iConomy and Boseconomy)
    • event system (accompany the drop with lightning, treespawn or explosions)
    • see examples file for details on usage

    @Legolas75893
    Sorry, no player drops yet :D

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

    Celtic Minstrel

    Other options: PLAYER@GROUP-<group> or PLAYER@@<group>.

    Would I be correct in guessing that this skeleton will only drop a diamond if you kill the skeleton before killing the spider? If so, maybe add the reverse condition ("carrying"?) as well, so that the spider can also have a special drop if you kill it first. A carrying condition would also apply to vehicles and paintings. Technically mounted would as well, but since that doesn't make sense I don't think it's likely a plugin would do that.

    [/quote]Also looking into adding two new tool synonyms - DAMAGE_PLAYER (tools, air - hmm, also needs to be any block/item eg. if the player kills a mob with an apple) and DAMAGE_ENVIRONMENT mainly to make it easier to nerf mob farms. Perhaps easier to implement a NOT parameter and say tool: NOT DAMAGE_ENVIRONMENT (and alias DAMAGE_PLAYER to this).[/quote]Player-sourced damage is anything that's an item, isn't it? Did I already make a synonym for that? I'd call it ANY_ITEM rather than DAMAGE_PLAYER, I think.

    Ah, but this is a touch misleading, since RAIN will also match snow.
     
  5. Offline

    TheTennessee

    Well, I got it working on my server. I definitely hit the "what is the enum for that?" setbacks of course. It's WOODEN_DOOR but WOOD_STAIRS... etc etc... But I did get it set up. You at least got it working well, the confirmation at start up definitely helps. So, good mod overall. It did everything I needed it to.
     
  6. Offline

    Motumbo

    can you explain the weather option to me?

    so ... funny story, after updating to 928, apples dont work again.

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

    Zarius


    Yes, when the entity is killed it will check if it was riding whatever is in the condition. Could do the same for the opposite as you say "carrying:". I think mounted is a little ambiguous as to whether it means something it's on or something on it - perhaps "riding:".

    Didn't think of ANY_ITEM - that should cover everything player-based. Myself I was mostly thinking of DAMAGE_ENVIRONMENT as otherwise I need to type [DAMAGE_WATER, DAMAGE_FALLING, DAMAGE_LAVA, etc] to try and cover all bases for mob farms.

    Yes but most weather plugins also refer to it as rain - blame notch since he merged the two weather conditions. Actually - I could probably allow SNOW to test for a snow biome and "raining" then have RAIN test for not being in a snow biome.

    Glad you it's working well for you.

    If you set "weather: RAIN" then the drop in question will only occur during the rain. You could have something like this:

    Code:
            GRASS:
    # find money in the grass only during a clear day (can't see as well as
    # at night or raining)
                - tool: ALL
                  drop: MONEY
                  quantity: 5-10
                  chance: 5
                  message: ["Someone dropped their change in the grass.","It's your lucky day - found some change."]
                  time: DAY
                  weather: CLEAR
    # chance of a mushroom at night whilst raining
                - tool: ALL
                  drop: BROWN_MUSHROOM
                  quantity: 1
                  chance: 10
                  time: NIGHT
                  weather: RAIN
    # chance of a diamond at night during a thunderstorm accompanied by
    # a thunderstrike (which also destroys the diamond - oh well :D)
                - tool: ALL
                  drop: DIAMOND
                  chance: 5
                  time: NIGHT
                  weather: THUNDER
                  event: LIGHTNING
    
    
    More details? Can you post the bit of the config for the block you are trying to drop apples from?

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

    Motumbo

    same as before. I tried setting it to 50% no dice.
     
  9. Offline

    Celtic Minstrel

    Agreed.

    It may not be as good, but you could have ANY_DAMAGE match all the DAMAGE_* constants and ANY_CREATURE match all the CREATURE_* constants.

    Ah, in that case RAIN would also need to check it's not in a biome that has no whether (I believe that's desert and possibly taiga). And the add STORM to just check whether there's weather without checking biomes. You could also add something specifically for weather in desert biomes... CLOUDY, perhaps, since if I recall correctly you cannot see the sun or moon even though there's neither rain nor snow.

    But maybe that's too complex. I dunno.
     
  10. Offline

    Zarius

    Sounds like a great idea - tried to implement it but had problems importing the Biome class for some odd reason.. might try another time.

    Hmm... I tested your config out, bumped the apple drop up to 100% and it worked fine. Dropped it back to 50% and still worked as expected. That golden apple drop is pretty high though, chopped down one tree worth of leaves and got two golden apples :D Also note that you misspelled redstone_ore as redtone_ore (also you need to set it up for glowing_redstone_ore too - see the sample file).
     
  11. Offline

    bk1138

    Ran into a problem when testing this last night. Bukkit 860 and Otherblock 0.9.0z. I spawned 6 zombies at the edge of a water feed into a grinder (drowning). Out of the 6, I got 2 red mushrooms, which is about right. I got 7 brown mushrooms, and 7 slimeballs. Those numbers are fine. However, I got a set of 4 "infinite" porkchops. I stepped near them, my inventory would fill up each time (I had 8 slots free). I could throw them away and they would be immediately replaced if I was standing near a porkchop, without picking up the porkchop itself. Finally had to dig a hole to throw them into so they were not "near" and keep lighting the hole on fire to destroy them all.

    This never happened with porkchops from pigs, although I have not tested that since installing Otherblocks. I will try that sometime this weekend and update you with my results.

    Here is my zombie config:
     
  12. Offline

    Celtic Minstrel

    This seems unlikely, but could the either YAML loader or the plugin be discarding the zero and leaving just the -1? Try putting quotes around '0-1' and see if that helps. Alternatively, just make it 1 and reduce the chance to 50%.
     
  13. Is there a way to "drop" a random amount of money? Or will this do it?

    Code:
        CREATURE_CREEPER:
            - tool: ALL
              drop: MONEY@1
              quantity: 5-15
              message: You found some Credits.
     
  14. Offline

    Celtic Minstrel

    Money drops are not supported at the moment, as far as I know.
     
  15. Isn't supported at all or just a random amount? Because the sample config says:
    Code:
    # NAME_OF_ORIGINAL_BLOCK:
    #     - tool: NAME_OF_TOOL (or ALL for all tools. Accepts lists like [toola, toolb])
    #       world: WHICH_WORLD (optional. Accepts lists like [worlda, worldb])
    #       drop: NAME_OF_NEW_DROP (can be any block/item or money (use MONEY@amount - can be negative)
    I will try what happens with my configuration.

    EDIT: It says that there is no error at startup, but ervery time a Zombie or Creeper (config like before, just added zobies the same way) dies it says the following:
    Code:
    17:02:12 [SEVERE] Could not pass event ENTITY_DEATH to OtherBlocks
    java.lang.IllegalArgumentException: No enum const class org.bukkit.Material.MONEY@1
            at java.lang.Enum.valueOf(Unknown Source)
            at org.bukkit.Material.valueOf(Material.java:14)
            at com.sargant.bukkit.otherblocks.OtherBlocks.performDrop(OtherBlocks.java:675)
            at com.sargant.bukkit.otherblocks.OtherBlocksEntityListener.onEntityDeath(OtherBlocksEntityListener.java:156)
            at org.bukkit.plugin.java.JavaPluginLoader$56.execute(JavaPluginLoader.java:635)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
            at net.minecraft.server.EntityLiving.r(EntityLiving.java:480)
            at net.minecraft.server.EntityLiving.a(EntityLiving.java:459)
            at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:403)
            at net.minecraft.server.EntityMonster.damageEntity(EntityMonster.java:47)
            at net.minecraft.server.EntityHuman.d(EntityHuman.java:569)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:880)
            at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:223)
            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:451)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    >
    Btw: here is the full cfg:
    config.yml (open)

    Code:
    # Set this to "low" to reduce number of boot messages
    verbosity: normal
    
    # Try adjusting this if you have compatibility problems with other plguins.
    # Default: "lowest". Can also use "low", "normal", "high", "highest".
    priority: lowest
    
    # experimental water damage (DANGEROUS - disabled above "enableblockto")
    # supposed to allow you to change the drop if a torch is destroyed by water (DAMAGE_WATER, doesn't work yet)
    # this setting CAN crash your server if set to true and configured incorrectly
    enableblockto: false
    
    otherblocks:
    ##########
    # This is a sample configuration file for OtherBlocks
    # Configuration blocks are set out as followed:
    #
    # NAME_OF_ORIGINAL_BLOCK:
    #     - tool: NAME_OF_TOOL (or ALL for all tools. Accepts lists like [toola, toolb])
    #       world: WHICH_WORLD (optional. Accepts lists like [worlda, worldb])
    #       drop: NAME_OF_NEW_DROP (can be any block/item or money (use MONEY@amount - can be negative)
    #
    ### Optional parameters ###
    #
    #       color: COLOUR_OF_NEW_BLOCK (default WHITE, only applies to WOOL/DYE/INK_SACK drops)
    #       quantity: AMOUNT_OF_NEW_DROP (optional, default 1)
    #       damage: TOOL_DAMAGE (optional, default 1)
    #       chance: DROP_PROBABILITY_PERCENTAGE (optional, default 100)
    #        time: DAY or NIGHT (optional, drop only occurs during day or night)
    #       weather: RAIN, THUNDER, CLEAR (accepts lists eg. [RAIN, THUNDER])
    #       event: LIGHTNING, TREE, EXPLOSION (accompany the drop with an event)
    #                     also TREE@BIG_TREE, TREE@BIRCH, TREE@REDWOOD, TREE@TALL_REDWOOD
    #          !!!BEWARE!!! - there is no check to see if chests are destroyed
    #
    # For lists of appropriate values to use, see:
    #  - Block and tools: [URL]http://cliqr.org/V[/URL]
    #  - Colors:          [URL]http://cliqr.org/Y[/URL]
    #
    # If you want to add a different drop based on a
    # different tool but for the same original block,
    # simply repeat the indented block again, but make
    # sure you start with "- tool", e.g.
    #
    # GRASS:
    #     - tool: AIR
    #       drop: GRAVEL
    #
    #     - tool: DIRT
    #       drop: STONE
    #
    # A tool: ALL statement sets the drop for any
    # tools not yet specified. Therefore, it should
    # always be the last item in a list.
    #
    # Uncomment any of the blocks below to see some example
    # behaviours
    #
    ##########
    # Drop Soulsand when you dig out
    # gravel with a golden shovel
    ###
    #        GRAVEL:
    #            - tool: GOLD_SPADE
    #              drop: SOUL_SAND
    #              quantity: 1
    #              damage: 4
    ##########
    
        TORCH:
            - tool: ALL
              drop: STICK
              chance: 10
    
        GRASS:
            - tool: WOOD_SPADE
              drop: GRASS
              chance: 10
    
            - tool: STONE_SPADE
              drop: GRASS
              chance: 11
    
            - tool: IRON_SPADE
              drop: GRASS
              chance: 12
    
            - tool: GOLD_SPADE
              drop: GRASS
              chance: 14
    
            - tool: DIAMOND_SPADE
              drop: GRASS
              chance: 15
    
        CREATURE_CHICKEN:
            - tool: ALL
              drop: EGG
              chance: 10
    
        CREATURE_SHEEP:
            - tool: ALL
              drop: STRING
              chance: 10
    
        CREATURE_CREEPER:
            - tool: ALL
              drop: MONEY@1
              message: You found some Credits.
    
        CREATURE_ZOMBIE:
            - tool: ALL
              drop: MONEY@1
              quantity: 5-10
    


    Strange because he stated in red, that iConomy is supported now. Did i miss something?
     
  16. Offline

    dragonhib

    Hi everybody !!
    Impossible to get this working on my server...
    Server logs (open)
    On server start :
    Code:
    2011-06-25 17:21:54 [INFO] [OtherBlocks] hooked into Permissions.
    2011-06-25 17:21:54 [INFO] OtherBlocks: ALL TOOLS + GLASS now drops 1x GLASS
    2011-06-25 17:21:54 [INFO] [OtherBlocks]: Config file loaded.
    2011-06-25 17:21:54 [INFO] [OtherBlocks 0.9.0z] loaded.
    2011-06-25 17:21:54 [INFO] [Otherblocks] Payment method found (iConomy version: 5)
    On error :
    Code:
    2011-06-25 17:22:08 [SEVERE] Could not pass event BLOCK_BREAK to OtherBlocks
    java.lang.NoSuchMethodError: com.sargant.bukkit.common.CommonEntity.isValidSynonym(Ljava/lang/String;)Z
        at com.sargant.bukkit.otherblocks.OtherBlocksContainer.compareTo(OtherBlocksContainer.java:121)
        at com.sargant.bukkit.otherblocks.OtherBlocksBlockListener.onBlockBreak(OtherBlocksBlockListener.java:96)
        at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:483)
        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:160)
        at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:122)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:469)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:223)
        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:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

    All seems to be properly configured.
    I tested with a simple config file (just glass drop glass) but same problem. Maybe conflict with an other plugin. Have you an idea ?
     
  17. Uh.. can you post your config too? Maybe you misspelled something or forgot to write drops/items/tools in UPPERCASE? Anyway i think the config contents will help.
     
  18. Offline

    Celtic Minstrel

    Ah, I must be a bit behind. I didn't realize he already had iConomy support in there... though the error messages does suggest that it's not. Maybe you don't have the latest version? I dunno.
     
  19. I donloaded the new version right before trying (this and also iConomy). I also updated Bukkit to the newest recommended build (928). Maybe its an issue with Bukkit?
     
  20. Offline

    sagethor

    @Zarius
    Ah, just checked this again. Thanks!

    Going to be adding this to my server shortly. Thanks to you [pig] [pig] [pig] will die when people want to unsaddle them.:).
     
  21. Offline

    Motumbo

    so what is the difference between the redstone and glowing redstone?
     
  22. Offline

    dragonhib

    This is the original config file, I just let the glass drop for test
    config file (open)

    Code:
    # Set this to "low" to reduce number of boot messages
    verbosity: normal
    
    # Try adjusting this if you have compatibility problems with other plguins.
    # Default: "lowest". Can also use "low", "normal", "high", "highest".
    priority: lowest
    
    # experimental water damage (DANGEROUS - disabled above "enableblockto")
    # supposed to allow you to change the drop if a torch is destroyed by water (DAMAGE_WATER, doesn't work yet)
    # this setting CAN crash your server if set to true and configured incorrectly
    enableblockto: false
    
    otherblocks:
    ##########
    # This is a sample configuration file for OtherBlocks
    # Configuration blocks are set out as followed:
    #
    # NAME_OF_ORIGINAL_BLOCK:
    #     - tool: NAME_OF_TOOL (or ALL for all tools. Accepts lists like [toola, toolb])
    #       world: WHICH_WORLD (optional. Accepts lists like [worlda, worldb])
    #       drop: NAME_OF_NEW_DROP (can be any block/item or money (use MONEY@amount - can be negative)
    #
    ### Optional parameters ###
    #
    #       color: COLOUR_OF_NEW_BLOCK (default WHITE, only applies to WOOL/DYE/INK_SACK drops)
    #       quantity: AMOUNT_OF_NEW_DROP (optional, default 1)
    #       damage: TOOL_DAMAGE (optional, default 1)
    #       chance: DROP_PROBABILITY_PERCENTAGE (optional, default 100)
    #    time: DAY or NIGHT (optional, drop only occurs during day or night)
    #       weather: RAIN, THUNDER, CLEAR (accepts lists eg. [RAIN, THUNDER])
    #       event: LIGHTNING, TREE, EXPLOSION (accompany the drop with an event)
    #                     also TREE@BIG_TREE, TREE@BIRCH, TREE@REDWOOD, TREE@TALL_REDWOOD
    #          !!!BEWARE!!! - there is no check to see if chests are destroyed
    #
    # For lists of appropriate values to use, see:
    #  - Block and tools: http://cliqr.org/V
    #  - Colors:          http://cliqr.org/Y
    #
    # If you want to add a different drop based on a
    # different tool but for the same original block,
    # simply repeat the indented block again, but make
    # sure you start with "- tool", e.g.
    ###
            GLASS:
                - tool: ALL
                  drop: GLASS
                  quantity: 1
    

    Thanks for help, I really want to use this plugin :)
     
  23. Offline

    Zarius

    NoSuchMethodError is the key line - this is due to a clash with another plugin that also uses the same "Common" library that OtherBlocks uses. Do you have the MobRider plugin installed? OtherBlocks has modified the "Common" library but I found that MobRider overrides the Common library with an older version.

    I'm looking for a solution - might just bring the "Common" files into main source code and rename the package - this should mean that there will be no clashes like this in the future.


    I'd prefer a non-killing way to get the saddle back but whatever works :D

    Just put it in with version 0.9.0 using the Register API (adds some more dependencies when compiling the source code but supports multiple economy plugins rather than just one).

    Random amounts work fine - but you should use just "MONEY" as the drop, not "MONEY@1" (there should be a couple of examples in the sample config file).

    When you hit a redstone block it lights up - this is actually a different block (glowing redstone) - might eventually make a REDSTONE_ORE@GLOWING, REDSTONE_ORE@UNGLOWING and have REDSTONE_ORE work for both.

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

    dragonhib

    Yes I have MobRider installed. I have tested to remove some plugins to make OtherBlocks work, but not MobRider.
    Test and feedback :)
    Thanks for the reply

    EDIT : Ok you're good !! I removed MobRider and all works perfectly. Thanks you awesome man :)
     
  25. Offline

    Celtic Minstrel

    Well, currently you can use REDSTONE_ORE for the non-glowing one (note that such a drop will never trigger since redstone will always be glowing at the time of mining... unless there's a plugin to prevent that), GLOWING_REDSTONE_ORE (I think) for the glowing type, and ANY_REDSTONE_ORE for both. I recommend always using ANY_REDSTONE_ORE, personally.
     
  26. Offline

    EMOberger

    it seems like i can not use 0.01-0.05 as a monster drop.
     
  27. Offline

    Celtic Minstrel

    What do you mean?
     
  28. Offline

    Zarius

    Not sure what you mean, can you post the config you are trying to use?
     
  29. Offline

    EMOberger

    Code:
    # Set this to "low" to reduce number of boot messages
    verbosity: normal
    
    # Try adjusting this if you have compatibility problems with other plguins.
    # Default: "lowest". Can also use "low", "normal", "high", "highest".
    priority: lowest
    
    # experimental water damage (DANGEROUS - disabled above "enableblockto")
    # supposed to allow you to change the drop if a torch is destroyed by water (DAMAGE_WATER, doesn't work yet)
    # this setting CAN crash your server if set to true and configured incorrectly
    enableblockto: false
    
    otherblocks:
    ##########
    # This is a sample configuration file for OtherBlocks
    # Configuration blocks are set out as followed:
    #
    # NAME_OF_ORIGINAL_BLOCK:
    #     - tool: NAME_OF_TOOL (or ALL for all tools. Accepts lists like [toola, toolb])
    #       world: WHICH_WORLD (optional. Accepts lists like [worlda, worldb])
    #       drop: NAME_OF_NEW_DROP (can be any block/item or money (use MONEY@amount - can be negative)
    #
    ### Optional parameters ###
    #
    #       color: COLOUR_OF_NEW_BLOCK (default WHITE, only applies to WOOL/DYE/INK_SACK drops)
    #       quantity: AMOUNT_OF_NEW_DROP (optional, default 1)
    #       damage: TOOL_DAMAGE (optional, default 1)
    #       chance: DROP_PROBABILITY_PERCENTAGE (optional, default 100)
    #        time: DAY or NIGHT (optional, drop only occurs during day or night)
    #       weather: RAIN, THUNDER, CLEAR (accepts lists eg. [RAIN, THUNDER])
    #       event: LIGHTNING, TREE, EXPLOSION (accompany the drop with an event)
    #                     also TREE@BIG_TREE, TREE@BIRCH, TREE@REDWOOD, TREE@TALL_REDWOOD
    #          !!!BEWARE!!! - there is no check to see if chests are destroyed
    #
    # For lists of appropriate values to use, see:
    #  - Block and tools: http://cliqr.org/V
    #  - Colors:          http://cliqr.org/Y
    #
    # If you want to add a different drop based on a
    # different tool but for the same original block,
    # simply repeat the indented block again, but make
    # sure you start with "- tool", e.g.
    #
    # GRASS:
    #     - tool: AIR
    #       drop: GRAVEL
    #
    #     - tool: DIRT
    #       drop: STONE
    #
    # A tool: ALL statement sets the drop for any
    # tools not yet specified. Therefore, it should
    # always be the last item in a list.
    #
    # Uncomment any of the blocks below to see some example
    # behaviours
    #
    ##########
    # Drop Soulsand when you dig out
    # gravel with a golden shovel
    ###
    #        GRAVEL:
    #            - tool: GOLD_SPADE
    #              drop: SOUL_SAND
    #              quantity: 1
    #              damage: 4
    ##########
    # Drop Glowstone Dust instead of
    # Redstone when mined with a golden pick
    # Note: redstone can also be glowing, so
    # specify both
    ###
    #        REDSTONE_ORE:
    #            - tool: GOLD_PICKAXE
    #              drop: GLOWSTONE_DUST
    #              quantity: 4
    #        GLOWING_REDSTONE_ORE:
    #            - tool: GOLD_PICKAXE
    #              drop: GLOWSTONE_DUST
    #              quantity: 4
    ##########
    # When you mine Gold with flint & steel,
    # it comes pre-smelted!
    ###
    #        GOLD_ORE:
    #            - tool: FLINT_AND_STEEL
    #              drop: GOLD_INGOT
    #              quantity: 1
    ##########
    # The leaves are now diamonds! (when punched)
    ###
    #        LEAVES:
    #            - tool: AIR
    #              drop: DIAMOND
    #              quantity: 1
    #              chance: 33
    ##########
    # Generic leaves drop apples (on decay and harvest, higher chance for harvesting manually)
    ###
    #        SPECIAL_LEAFDECAY@GENERIC:
    #            - tool: ALL
    #              drop: APPLE
    #              quantity: 1
    #              chance: 5
    #        LEAVES@GENERIC:
    #            - tool: ALL
    #              drop: APPLE
    #              quantity: 1
    #              chance: 15
    ##########
    # Grass has a 5% chance of dropping seeds during day, 5% chance of dropping brown mushroom at night
    ###
    #        GRASS:
    #            - tool: ALL
    #              drop: SEEDS
    #              quantity: 1-3
    #              chance: 5
    #              time: DAY
    #            - tool: ALL
    #              drop: BROWN_MUSHROOM
    #              quantity: 1
    #              chance: 5
    #              time: NIGHT
    ##########
    # Saddled pigs drop their saddles
    ###
    #        PIG@SADDLED:
    #            - tool: ALL
    #              drop: SADDLE
    #              quantity: 1
    ##########
    # Glass drops glass
    ###
    #        GLASS:
    #            - tool: ALL
    #              drop: GLASS
    #              quantity: 1
    ##########
    # Bookshelves drop bookshelves (with axe)
    ###
    #        BOOKSHELF:
    #            - tool: ANY_AXE
    #              drop: BOOKSHELF
    #              quantity: 1
    ##########
    # Boats drop boats
    ###
    #        BOAT:
    #            - tool: ALL
    #              drop: BOAT
    #              quantity: 1
    ##########
    # Economy examples
    ###
    #        CREATURE_SKELETON:
    #            - tool: ANY_SWORD
    #              drop: MONEY
    #              quantity: 10-50
    #
    #        CREATURE_SHEEP:
    #            - tool: ANY_SWORD
    #              drop: MONEY
    #              quantity: -10
    ##########
    ## Were you wishing you could have "powered creepers at night in a thunderstorm" have a 66% chance to 
    ## drop diamonds (accompanied by with a bolt of lightning) only when hit with a golden sword? Now you can :D
    #        CREATURE_CREEPER@POWERED:
    #            - tool: GOLD_SWORD
    #              drop: DIAMOND
    #              quantity: 10
    #              chance: 66
    #              time: NIGHT
    #              weather: THUNDER
    #              event: LIGHTNING
    #
    ## Unfortunately the lighting also zaps the diamonds :/  (will fix if I can) 
    ##########
            CREATURE_CREEPER:
                - tool: ALL
                  drop: MONEY
                  quantity: 0.01-0.10
    
            CREATURE_GHAST:
                - tool: ALL
                  drop: MONEY
                  quantity: 0.10-0.15
    
            CREATURE_GIANT:
                - tool: ALL
                  drop: MONEY
                  quantity: 0.01-1.00
    
            CREATURE_PIG_ZOMBIE:
                - tool: ALL
                  drop: MONEY
                  quantity: 0.01-0.10
    
            CREATURE_SKELETON:
                - tool: ALL
                  drop: MONEY
                  quantity: 0.01-0.05
    
            CREATURE_SPIDER:
                - tool: ALL
                  drop: MONEY
                  quantity: 0.01-0.07
    
            CREATURE_ZOMBIE:
                - tool: ALL
                  drop: MONEY
                  quantity: 0.01-0.05
    
            CREATURE_SLIME:
                - tool: ALL
                  drop: MONEY
                  quantity: 0.01
    
    
     
  30. Offline

    Zarius

    Ah yes, quantity at the moment is integer only, I kinda recycled the code to allow it to work for money too. Will add part "dollars" to the todo list.
     
  31. Offline

    XXXtheGreat

    Okay, so, when I ran my config through the YAML parser, it gave me back: "The document is not a valid YAML: while parsing a block collection in "", line 6, column 9: - tool: GOLD_PICKAXE ^ expected , but found '?'". It said the same with the next line.

    Code:
    priority: lowest
    verbosity: low
    
    otherblocks:
        GLOWSTONE:
            - tool: GOLD_PICKAXE
            world: world
            drop: GLOWSTONE
            quantity: 4
        GOLD_ORE:
            - tool: GOLD_PICKAXE
            world: world
            drop: GOLD_INGOT
        IRON_ORE:
            - tool: GOLD_PICKAXE
            world: world
            drop: IRON_INGOT
        DIAMOND_ORE:
            - tool: GOLD_PICKAXE
            world: world
            drop: DIAMOND
        STONE:
            - tool: GOLD_PICKAXE
            world: world
            drop: STONE
     

Share This Page