[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

    Clucky

    I think I can think of two more:

    When lava touches sand, it drops glass when dug:
    Code:
    otherblocks:
      SAND:
        - tool: ANY
          adjacent: LAVA
          drop: GLASS
          quantity: 1
          chance: 100
    
    When cobblestone touches redstone it will drop stone when mined (useful for turning a cobblestone generator into a stone generator; a cobblestone generator is made by placing water and lava next to each other and letting them continue to make cobblestone without eliminating each other)
    Code:
    otherblocks:
      Cobblestone:
        - tool: ANY
          adjacent: REDSTONE_WIRE
          drop: STONE
          quantity: 1
          chance: 100
    
    If you need me to, I can try to think of more; but no joke, this would be extremely useful for servers that enjoy to build complex machines :p
     
  3. Offline

    Zarius

    @Clucky

    iGrow is much better for this stuff (sand to glass near lava is a classic :D) but this would be a lot less of a performance issue (as it'd only check surrounding blocks if you configured it and only specific blocks). I'm a little way into a large overhaul of iGrow but it's on hold until OtherBlocks 2.0 is finished.
     
  4. Offline

    Clucky

    What is iGrow, do you have a link?
     
  5. Offline

    Zarius

    @Clucky

    Here's the forum thread for iGrow. I need to start a new one :)
     
  6. Offline

    grinch843

    That would be great. I wish this was something that EVERY plugin had, the option to NOT use any permission system at all....

    Grinch
     
  7. Offline

    Celtic Minstrel

    Prior to Bukkit 1000, that sentiment would make a lot of sense; however, since Bukkit 1000 and superperms, there's no reason to support legacy permissions systems at all, nor any reason to offer an option not to use permissions. (2.0 will still support legacy Permissions though, but I at least have no intention of adding an option to not check permissions at all. I can't speak for Zarius on that though.)

    EDIT: Checking back, I realize Zarius was referring to the canBuild() checks. It may actually be possible to implement that without doing any permissions checking at all; however, if not, a similar principle applies there. It should give a choice between legacy permissions and superperms in some way.
     
  8. Offline

    grinch843

    I guess its just a matter of waiting for everyone to get with one permission system and stick with it. I just recently switched over to bukkitpermissions, this is the 4th or 5th time I've changed and I don't really want to have to do it again. I know this is bad to say, but I think it would benefit the MC community in the long run, if the bukkit guys would just come out and make it a requirement that if a plugin in going to use permissions, then they need to use the built in system. I know this would tick some people off, but ya gotta break some EGGs to make CAKE :)...

    Sorry for the OT post...

    Grinch.
     
  9. Offline

    Zarius

    Well, not so much of an issue - all the new permissions plugins do use the new system. The problem is Permissions 3.16 & the various bridges supporting legacy permissions.

    @Celtic Minstrel

    Yeah, the native permissions will be default but I think I'll still allow for the system to be turned off completely, just in case there are oddities somewhere that might be avoided that way for some users.

    DevBukkit page in progress, will be here - OtherBlocks will be renaming to OtherDrops for version 2.0.

    I've done a quick maintenance release on the 1.x version in the meantime:

    Release 1.94
    * support for mobarena
    * Register update (iConomy 4/5/6, BOSEconomy 6/7, Essentials & MultiCurrency supporT)
    * Added usepermissions option back in (for those having issues with SuperPermsBridge or Permissions 3.16) - add "usepermissions: false" to the global config.

    OtherBlocks 2.0 crazy config (backup your world :D)

    # Opencut mining (have god mode on) - block breaks from explosions now drop same as from players
    Code:
      DIRT:
        - drop: CREATURE_CREEPER@POWERED
          chance: 40%
    
      STONE:
        - drop: CREATURE_CREEPER@POWERED
          chance: 40%
    
    [​IMG]
    Link in case embedded image stops working.

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

    iFreZzAx

    @Zarius
    What is the permisssion node for use ?
     
  11. Offline

    Zarius

    There's no permission node for use - it runs for the whole server (as long as you can break a block) unless you add "permissions: " conditions.
     
  12. Offline

    iFreZzAx

    I'm not sure whats up then I just finished setting up Bukkitpermissions and now none of the blocks that are broke pay any attention to the config even tho in the console it says there active.
     
  13. Offline

    Zarius

    Try adding "usepermissions: false" to the global config file.

    eg:
    Code:
    # disable permissions checks (can help with SuperPermsBridge & permissions 3.16 issues)
    usepermissions: false
    
    # Set this to "low" to reduce number of boot messages or to high, highest, extreme for more debugging info
    verbosity: normal
    
     
  14. Offline

    iFreZzAx

    Ty worked like a charm :D
    But now its logging all this:
    Code:
    14:09:49 [INFO] [ItemStack{FEATHER x 2}]
    14:09:51 [INFO] [ItemStack{ARROW x 2}, ItemStack{BONE x 2}]
    14:09:51 [INFO] [ItemStack{ARROW x 2}, ItemStack{BONE x 2}]
    14:09:53 [INFO] [ItemStack{ARROW x 2}]
    14:09:53 [INFO] [ItemStack{ARROW x 2}]
    14:10:12 [INFO] []
    14:10:12 [INFO] []
    14:10:24 [INFO] [ItemStack{BONE x 2}]
    14:10:24 [INFO] [ItemStack{BONE x 2}]
    14:10:30 [INFO] []
    14:10:30 [INFO] []
    14:10:37 [INFO] [ItemStack{STRING x 2}]
    14:10:37 [INFO] [ItemStack{STRING x 2}]
    14:11:17 [INFO] [ItemStack{SULPHUR x 2}]
    14:11:17 [INFO] [ItemStack{SULPHUR x 2}]
    14:12:02 [INFO] [ItemStack{BONE x 1}]
    14:12:02 [INFO] [ItemStack{BONE x 1}]
    14:12:04 [INFO] []
    14:12:04 [INFO] []
    14:12:16 [INFO] /178.79.164.111:35279 lost connection
    
    Into the console can I stop this ?
     
  15. Offline

    Zarius

    Oops... left a debug message in sorry.
     
  16. Offline

    Erich T. Wade

    I'm trying to set up a config such that mobs, when killed with a bow and arrow, drop arrows. It seems that drops for bow kills aren't working. The tool: BOW suggestion earlier in this thread does not trigger if I kill something by shooting it - only if I hit it over the head with a bow. In fact, even if I set the arrows to drop on tool: ANY, they drop for everything except shooting them. (On both of these settings, shooting them drops the default drops instead.)

    Just for the sake of saying I tried, I also tried tool: ARROW (which of course didn't work), and tool: PROJECTILE_ARROW from the 2.0 section of the wiki.

    While testing this, I found that pigs seem to refuse the special drops entirely.

    I'm running CB 1060 with, for testing purposes, no other plugins enabled. I'm using the latest OB version as of this post (0.94).

    Code:
    # Drops arrows and gives the message for all kills EXCEPT shooting to death.
    # When shot, drops leather.
        CREATURE_COW:
            - tool: ANY
              drop: ARROW
              quantity: 3
              message: "Arrows!"
    
    # Drops arrows and gives message when beat to death with bow, but not when shot to death.
    # When shot, drops wool.
        CREATURE_SHEEP:
            - tool: BOW
              drop: ARROW
              quantity: 3
              message: "Arrows!"
    
    # Does not drop anything or give a message when killed with sword or beat to death with bow.
    # Drops pork when shot.
        CREATURE_PIG:
            - tool: ANY
              drop: ARROW
              quantity: 3
              message: "Arrows!"
    
    EDIT: On further testing, the pig drops work sometimes. I killed a new pack of four pigs, all using a diamond sword; it triggered on two of the pigs but not on the other two.
     
  17. Eh I presume this spam is from this plugin?

    15:28:41 [INFO] [ItemStack{GOLDEN_APPLE x 51}, ItemStack{IRON_INGOT x 5}, ItemStack{REDSTONE_ORE x 44}, ItemStack{GOLD_HELMET x 1}, ItemStack{GOLD_LEGGINGS x 1}, ItemStack{COAL_ORE x 49}, ItemStack{REDSTONE_ORE x 64}, ItemStack{REDSTONE_ORE x 6}, ItemStack{IRON_BLOCK x 21}, ItemStack{GOLD_CHESTPLATE x 1}, ItemStack{COAL_ORE x 19}, ItemStack{GOLD_BOOTS x 1}, ItemStack{IRON_LEGGINGS x 1}, ItemStack{IRON_BOOTS x 1}, ItemStack{IRON_LEGGINGS x 1}, ItemStack{IRON_CHESTPLATE x 1}, ItemStack{IRON_HELMET x 1}]

    I can fix that changing logging from Normal to Low or so ?
     
  18. Offline

    Robert Pendell

    Hi. I'm looking at implementing this on my server (for good drops and surprises... maybe even a few traps). For the items that already have drops is it necessary to include in a drop that occurs all the time or can I just leave that out and it will work fine? Basically below is the config I'm looking at so far can you see anything I can leave out or need to add in? I need normal drops to work normally and only be replaced with a different drop on chance.

    Code:
    GLASS:
        - tool: ALL
          drop: GLASS
          chance: 10
    
    SPECIAL_LEAFDECAY:
        - drop: AIR
          chance: 100
        - drop: SAPLING
          chance: 10
        - drop: APPLE
          chance: 3
        - drop: GOLDEN_APPLE
          chance: 0.1
    
    LEAVES:
        - tool: AIR
          drop: AIR
          chance: 100
        - tool: SHEARS
          drop: LEAVES
          chance: 100
        - tool: [AIR, SHEARS]
          drop: APPLE
          chance: 5
        - tool: AIR
          drop: GOLDEN_APPLE
          chance: 0.05
        - tool: SHEARS
          drop: GOLDEN_APPLE
          chance: 0.1
    
    CREATURE_CREEPER@POWERED:
        - tool: [GOLD_SWORD, DIAMOND_SWORD]
          drop: TNT
          chance: 10
    
    BOOKSHELF:
        - tool: ALL
          drop: BOOKSHELF
          chance: 100
    
    BURNING_FURNACE:
        - tool: [WOOD_PICKAXE, STONE_PICKAXE]
          drop: FIRE
          chance: 1
    
    BRICK:
        - tool: ANY
          drop: BRICK
          chance: 100
        - tool: ANY
          drop: CLAY_BRICK
          quantity: 1-4
          chance: 5
     
  19. Offline

    Zarius

    Debug spam, yeah :( Will be fixed in 1.95 - along with a better compatibility with MobArena.

    Yeah, if you don't define a drop then the default drop occurs and if a drop with a chance does not occur the default drop will occur. If you want the default drop to always occur you can add drop: DEFAULT, and if you want it not to occur you can add drop: NOTHING.
     
  20. Offline

    Robert Pendell

    Ok great. Then I can probably take out the redundant 100% entries that are present that would be the default drop anyways. Thanks.
     
  21. Offline

    RugRats

    The OtherDrops dev-bukkit page is coming along nicely. If you wish to see it click here
     
  22. Offline

    Zarius

    Version 1.95 (2011/08/29)
    * fix mobarena support (it worked but also disabled wolf drops outside the arena)

    * removed debug message

    @Joy - try this version, removed that annoying debug message.
     
  23. Offline

    RugRats

    Thanks :)
     
  24. Offline

    Worleyboy

    :( Does anyone else use the Jobs plugin with OtherBlocks? I don't get money or experience for jobs when I destroy/place a block that has custom behaviors/drops enabled. I have changed the priority of this plugin to all possible options. Does anyone have a solution. I'd greatly appreciate it.
    P.S. This plugin is great. I don't want to have to swap it out for another custom drops plugin.
     
  25. Offline

    Clucky

    Ok thanks =)
     
  26. Offline

    Zarius

    Took a quick look at Jobs source code - it's because it runs at Priority.MONITOR (I expect this would also effect every other custom drop plugin) - this is higher than highest. If the Jobs priority could be user-configured (bug the author in the Jobs thread :)) then you could set it on high and OtherBlocks on highest and they should work together then.
     
    Worleyboy likes this.
  27. Offline

    Worleyboy

    Thank you very much! You're the best! I'll go bug someone else now. -thanks!
    Edit: I wonder if it would be possible to just edit it myself.
     
  28. Offline

    Celtic Minstrel

    Does Jobs modify the event on Monitor? If so, you should probably bug the developer to not do that since it's a violation of the contract of Monitor.
     
  29. Offline

    TheMap

    I was wondering if there is a universal name for all blocks? For example I want a permissions group to gain the benefit of 10% chance of bonus block dropping on break. Is there a single name for all these blocks or do I have to type in everyone?

    Also is there a way for me to add "custom" groups without permissions set on? I have classes that are granted benefits to certain drops and without superpermsbridge working I have to set permissions off.

    And one last questions, if I was to want a specific world to have 0% drop on any block in that world is there a simple way to do this or do I have to type every block/item out?
     
  30. Offline

    Zarius

    In version 2.0 there will be an "ANY_BLOCK" name which could help for your wish to have 0% drop.

    10% bonus block might be tricky though as I'm not sure what to put in the drop, ie.

    Code:
      ANY_BLOCK:
        - drop: ??
          chance: 10%
    
    I can't just put default as I currently have no way of telling what the default drop is ("default" just lets minecraft do it's thing).

    Version 2.0 should work ok with superperms when it's fully released (early beta releases probably wont have permissions polished).

    Posted a pre-release of version 2.0 in the top post, text is copied below:

    For anyone game enough: here is a pre-release of version 2.0. Backup your configs, backup your world and give it a whirl, probably heaps of bugs still in there but the major things seem to work ok. Let me know of any bugs or post to the issue tracker. New features and other details are on the dev.bukkit page here.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  31. Could you please add a config option to disable the "mobarena support" as I actually have a pretty brilliant idea on how to improve MA, but now it's impossible due to your bugfix ;)
     

Share This Page