[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

    Celtic Minstrel

    Well, it works with the 2.x API, doesn't it?


    In 2.0, you'll be able to give lists as the drop. If you enclose them in [], it'll drop everything in the list; if you enclose them in {}, it'll drop a random one from the list. You'll also be able to do things like "drop: ANY_CREATURE" which will drop a random creature, or "drop: ^ANY_CREATURE" to drop one of every creature. (Wildcards default to exclusive instead of inclusive because it feels more intuitive to me; "any" implies exclusivity, after all.)
     
    Rofang likes this.
  3. Offline

    Nytmare


    WOOT
     
  4. Offline

    Rofang

    Was it intentional to have "&environ" above and "*environ" below, or was that a typo?
     
  5. Offline

    Celtic Minstrel

    &environ gives a name to what follows (in this case, the list); *environ says to use the node by that name. So yes, it's intentional.
     
  6. Offline

    Rofang

    Ah, sorry. Let me go read up on yaml.
     
  7. Offline

    Zarius

    It's an advanced use of YAML - I couldn't find much reference to it, might write up a page on the wiki.
     
  8. Offline

    Celtic Minstrel

    Speaking of the wiki, is it too early to start updating it with 2.0 information? I suppose it is really...
     
  9. Offline

    Zarius

    We could make a copy of the wiki pages under a v2 folder (or v2_name pages) and update those so it's ready when 2.0 is released.
     
  10. Offline

    Rofang

    Just finished a lot of testing of 1.93 (using 1060), and I came across a few bugs that you may or may not have already fixed for 2.0:
    • Negative damageattacker values don't heal the player.
    • An entry with damagetool specified doesn't work at all. (Shame, because I was trying to make hoes take damage for breaking blocks.)
    • drop: CONTENTS for furnaces, etc. kicks me off the server (though I learned it's not necessary to specify this anyway).
    • My setup involves using gold picks and gold axes to break things down to their components (door yields 6 wood, for example). This works as expected for most everything, but only for doors when I mine the bottom half. If I mine the top half instead, I get the door itself and its components. Happens with wood and iron doors.
    • Unlike every other type of explosion in the game, the EXPLOSION event isn't nerfed by the plugin Safe Creeper 0.2 (I have it set up to damage people but not the world; OB's explosion event damages the world). I concede that this is probably not within your control and should be brought up with that plugin's designer.
     
  11. Offline

    Zarius

    2.0 is a big rewrite so there'll be a whole new set of bugs :/ I'll be getting some people to test first anyway and will release it as a "beta" for a while too until it seems stable.

    • Negative damageattacker values don't heal the player.
    Will look into this one.
    • An entry with damagetool specified doesn't work at all. (Shame, because I was trying to make hoes take damage for breaking blocks.)
    Haven't tested this in 2.0 yet but should work.
    • drop: CONTENTS for furnaces, etc. kicks me off the server (though I learned it's not necessary to specify this anyway).
    I worked out the problem for this one but need to see how it works in 2.0.
    • My setup involves using gold picks and gold axes to break things down to their components (door yields 6 wood, for example). This works as expected for most everything, but only for doors when I mine the bottom half. If I mine the top half instead, I get the door itself and its components. Happens with wood and iron doors.
    The setup sounds cool - would you be happy posting it or sending me a private message? Will look into the doors.
    • Unlike every other type of explosion in the game, the EXPLOSION event isn't nerfed by the plugin Safe Creeper 0.2 (I have it set up to damage people but not the world; OB's explosion event damages the world). I concede that this is probably not within your control and should be brought up with that plugin's designer.
    Yeah, tricky to get it working with explosion nerfing plugins - I was planning on adding a explosion@harmless though, might be able to add explosion@noblockdamage or something...
     
  12. Offline

    Rofang

    Sure. Feel free to use it in any way you'd like.

    Code:
        ANY_DIODE_BLOCK:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: STONE
            quantity: 3
          - tool: GOLD_PICKAXE
            drop: REDSTONE
          - tool: GOLD_PICKAXE
            drop: REDSTONE_TORCH_ON
            quantity: 2
    
        ANY_FURNACE:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: COBBLESTONE
            quantity: 8
    
        ANY_REDSTONE_ORE:
    
        # Gold shovels remove block intact.
          - tool: GOLD_SPADE
            drop: REDSTONE_ORE
    
        ANY_REDSTONE_TORCH:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: STICK
          - tool: GOLD_AXE
            drop: REDSTONE
    
        ANY_SIGN:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: STICK
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 6
    
        BED_BLOCK:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 3
          - tool: GOLD_AXE
            drop: WOOL
            quantity: 3
    
        BOAT:
    
        # Reclaim boats intact.
          - tool: ANY
            toolexcept: GOLD_AXE
            drop: BOAT
    
        # Gold axe tears down boat.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 5
    
        BOOKSHELF:
    
        # Reclaimable.
          - tool: ANY
            toolexcept: GOLD_AXE
            drop: BOOKSHELF
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 6
          - tool: GOLD_AXE
            drop: BOOK
            quantity: 3
    
        BRICK:
    
        # Gold pickaxe disassembles (uselessly).
          - tool: GOLD_PICKAXE
            drop: CLAY_BRICK
            quantity: 4
    
        CHEST:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 8
    
        CLAY:
    
        # Gold shovel removes block intact.
          - tool: GOLD_SPADE
            drop: CLAY
    
        COAL_ORE:
    
        # Gold shovel removes block intact.
          - tool: GOLD_SPADE
            drop: COAL_ORE
    
        COBBLESTONE_STAIRS:
    
        # Allow relcaiming with most picks.
          - tool: ANY_PICKAXE
            toolexcept: GOLD_PICKAXE
            drop: COBBLESTONE_STAIRS
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: COBBLESTONE
            quantity: 1-2
    
        CREATURE_PIG@SADDLED:
    
        # Get saddle back.
          - tool: ANY
            drop: SADDLE
    
        DETECTOR_RAIL:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: IRON_INGOT
          - tool: GOLD_PICKAXE
            drop: STONE_PLATE
            chance: 16.667
          - tool: GOLD_PICKAXE
            drop: REDSTONE
            chance: 16.667
    
        DIAMOND_BLOCK:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: DIAMOND
            quantity: 9
    
        DIAMOND_ORE:
    
        # Gold shovel removes block intact.
          - tool: GOLD_SPADE
            drop: DIAMOND_ORE
    
        DIRT:
    
        # Sometimes dig clay from dirt.
          - tool: ANY_SPADE
            drop: CLAY_BALL
            quantity: 1-3
            chance: 1
    
        DISPENSER:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: COBBLESTONE
            quantity: 7
          - tool: GOLD_PICKAXE
            drop: STICK
            quantity: 3
          - tool: GOLD_PICKAXE
            drop: STRING
            quantity: 3
          - tool: GOLD_PICKAXE
            drop: REDSTONE
    
        DOUBLE_STEP@COBBLESTONE:
    
        # Pop off one step, leave the other in place.
          - tool: ANY_PICKAXE
            toolexcept: GOLD_PICKAXE
            drop: STEP@COBBLESTONE
            replacementblock: STEP@COBBLESTONE
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: STEP@COBBLESTONE
            quantity: 2
    
        DOUBLE_STEP@SANDSTONE:
    
        # Pop off one step, leave the other in place.
          - tool: ANY_PICKAXE
            toolexcept: GOLD_PICKAXE
            drop: STEP@SANDSTONE
            replacementblock: STEP@SANDSTONE
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: STEP@SANDSTONE
            quantity: 2
    
        DOUBLE_STEP@STONE:
    
        # Pop off one step, leave the other in place.
          - tool: ANY_PICKAXE
            toolexcept: GOLD_PICKAXE
            drop: STEP@STONE
            replacementblock: STEP@STONE
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: STEP@STONE
            quantity: 2
    
        DOUBLE_STEP@WOOD:
    
        # Pop off one step, leave the other in place.
          - tool: ANY
            toolexcept: GOLD_AXE
            drop: STEP@WOOD
            replacementblock: STEP@WOOD
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: STEP@WOOD
            quantity: 2
    
        FENCE:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: STICK
            quantity: 3
    
        GLASS:
    
        # Reclaim glass with pick.
          - tool: ANY_PICKAXE
            drop: GLASS
    
        GLOWSTONE:
    
        # Remove waste from glowstone conversion.
          - tool: ANY
            toolexcept: ANY_PICKAXE
            drop: GLOWSTONE_DUST
            quantity: 4
    
        # Picks can harvest glowstone blocks intact.
          - tool: ANY_PICKAXE
            toolexcept: GOLD_PICKAXE
            drop: GLOWSTONE
    
        # In keeping with the theme of disassembly for gold tools.
          - tool: GOLD_PICKAXE
            drop: GLOWSTONE_DUST
            quantity: 4
    
        GOLD_BLOCK:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: GOLD_INGOT
            quantity: 9
    
        GOLD_ORE:
    
        # Gold shovel removes intact (uselessly).
          - tool: GOLD_SPADE
            drop: GOLD_ORE
    
        GRASS:
    
        # Gold shovel collects grass.
          - tool: GOLD_SPADE
            drop: GRASS
    
        ICE:
    
        # Ice can be collected with a pick.
          - tool: ANY_PICKAXE
            drop: ICE
    
        IRON_BLOCK:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: IRON_INGOT
            quantity: 9
    
        IRON_DOOR_BLOCK:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: IRON_INGOT
            quantity: 6
    
        IRON_ORE:
    
        # Gold shovel removes block intact (uselessly).
          - tool: GOLD_SPADE
            drop: IRON_ORE
    
        JUKEBOX:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: DIAMOND
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 8
    
        LADDER:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: STICK
            quantity: 3-4
    
        LAPIS_BLOCK:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: DYE@BLUE
            quantity: 9
    
        LAPIS_ORE:
    
        # Gold shovel removes block intact.
          - tool: GOLD_SPADE
            drop: LAPIS_ORE
    
        LEVER:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: STICK
          - tool: GOLD_PICKAXE
            drop: COBBLESTONE
    
        LOG:
    
        # Gold axe chops logs apart.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 4
    
        MINECART:
    
        # Gold pick disassembles.
          - tool: GOLD_PICKAXE
            drop: IRON_INGOT
            quantity: 5
    
        NOTE_BLOCK:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: REDSTONE
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 8
    
        PISTON_BASE:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: WOOD
            quantity: 3
          - tool: GOLD_PICKAXE
            drop: COBBLESTONE
            quantity: 4
          - tool: GOLD_PICKAXE
            drop: IRON_INGOT
          - tool: GOLD_PICKAXE
            drop: REDSTONE
    
        PISTON_STICKY_BASE:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: PISTON_BASE
          - tool: GOLD_PICKAXE
            drop: SLIME_BALL
    
        POWERED_MINECART:
    
        # Gold pick disassembles.
          - tool: GOLD_PICKAXE
            drop: MINECART
          - tool: GOLD_PICKAXE
            drop: FURNACE
    
        POWERED_RAIL:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: GOLD_INGOT
          - tool: GOLD_PICKAXE
            drop: STICK
            chance: 16.667
          - tool: GOLD_PICKAXE
            drop: REDSTONE
    
        RAILS:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: IRON_INGOT
          - tool: GOLD_PICKAXE
            drop: STICK
            chance: 16.667
    
        SANDSTONE:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: SAND
            quantity: 4
    
        SNOW:
    
        # Collect surface snow without a shovel.
          - tool: ANY
            drop: SNOW_BALL
    
        SOIL:
    
        # Gold shovel unearths soil undamaged.
          - tool: GOLD_SPADE
            drop: SOIL
    
        STEP@WOOD:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
    
        STEP@COBBLESTONE:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: COBBLESTONE
    
        STEP@SANDSTONE:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: SANDSTONE
    
        STEP@STONE:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: STONE
    
        STONE:
    
        # Gold pickaxe collects smoothstone.
          - tool: GOLD_PICKAXE
            drop: STONE
    
        STONE_BUTTON:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: STONE
            quantity: 2
    
        STONE_PLATE:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: STONE
            quantity: 2
    
        STORAGE_MINECART:
    
        # Gold pick disassembles.
          - tool: GOLD_PICKAXE
            drop: CHEST
          - tool: GOLD_PICKAXE
            drop: MINECART
    
        TNT:
    
        # Gold pickaxe disassembles.
          - tool: GOLD_PICKAXE
            drop: SAND
            quantity: 4
          - tool: GOLD_PICKAXE
            drop: SULPHUR
            quantity: 5
    
        TORCH:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: NOTHING
          - tool: GOLD_AXE
            drop: STICK
            chance: 16.667
          - tool: GOLD_AXE
            drop: COAL
            chance: 16.667
    
        TRAP_DOOR:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 3
    
        WOOD:
    
        # Gold axe chops planks into sticks.
          - tool: GOLD_AXE
            drop: STICK
            quantity: 2
    
        WOOD_PLATE:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 2
    
        WOOD_STAIRS:
    
        # Reclaimable.
          - tool: ANY
            toolexcept: GOLD_AXE
            drop: WOOD_STAIRS
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 1-2
    
        WOODEN_DOOR:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 6
    
        WOOL:
    
        # Gold axe cuts it apart.
          - tool: GOLD_AXE
            drop: STRING
            quantity: 4
    
        WORKBENCH:
    
        # Gold axe disassembles.
          - tool: GOLD_AXE
            drop: WOOD
            quantity: 4
    
     
  13. Offline

    Nytmare

    I putzed around with my own settings all last night, and the only one I can't seem to get is a clay > slime drop.

    Code:
          CLAY:
           - tool: ALL
             drop: CREATURE_SLIME
             chance: 5%
    
     
  14. Offline

    Zarius

    Odd - you set it at 100% chance for testing I assume? 2.0 should fix this when it's ready.
     
  15. Offline

    Nytmare

    Yeah I did. I also set a message line, and could get the message, but no monster.
     
  16. Offline

    Celtic Minstrel

    There are two things I can think of that might cause that; one is that the slime is given a size of 0 and this is considered already dead and removed immediately, and the other is that you have mobs disabled in server.properties or Multiverse or whatever. I can't think why the former would occur, though.
     
  17. Offline

    Zarius

    @Nytmare

    It's possible slimes with size 0 are having issues, try this: "drop: CREATURE_SLIME@SMALL"?

    @Rofang

    I've added some alias examples to the wiki - will fill out the rest of the documentation later.

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

    Rofang

    Wow, that's hardcore.
     
  19. Offline

    Zarius

    You thought that was hardcore? Check it out again :D

    I added some explanations examples of modifying aliases and redefining a new alias from the modification of an existing alias (and a practical use of that).

    Added an example showing dropgroups too.
     
    Rofang likes this.
  20. Offline

    generilisk

    I'm having this exact same issue.
     
  21. Offline

    Sh8kezula

    My problem was the SuperPerms Bridge.. If you don't have any plugins that use the bridge.. then you don't need. it. Remove the bridge and you will see your drops start working again.
     
  22. Offline

    Rofang

    Alternately, if you do have plugins that depend on Permissions 2 or 3, I found PermissionsEx works while SuperPerms Bridge did not.
     
  23. Offline

    Falsed

    I have a problem, whenever i enter this in the config

    SAND: - tool: GOLD_SPADE drop: GLASS - tool: DIAMOND_SPADE drop: GLOWSTONE chance: 50


    It does work somewhat, when I dig in sand with a gold spade it DOES drop glass.. but it also drops sand. same with the diamond spade, it drops glowstone 50% of the time but it also drops sand everytime. how can i fix that.
     
  24. Offline

    Celtic Minstrel

    @Falsed – You need to cancel the default drop by providing a drop: NOTHING with chance: 100.

    Zero is not a valid slime size, since a slime's health is proportional to its size and a size of zero means zero health. So yes, size zero slimes won't work. I think 2.0 won't let you specify size 0 slimes.
     
  25. Offline

    Falsed

    I did this.

    here for example i did this..

    otherblocks:
    SAND:
    - tool: ALL
    drop: NOTHING
    chance: 100
    - tool: DIAMOND_SPADE
    drop: SAND
    chance: 70

    it still drops 1 all the time when i use my hands and when i use diamond shovel it has 70% chance to drop TWO.

    i don't understand what im doing wrong...
     
  26. Offline

    Zarius

    I think PermissionsEx is the best solution as it also has a Permissions 2/3 bridge that's worked well for me. I'm now running this on my server with OtherBlocks and works fine (with 84 other plugins).

    That should work - is this the only config? Have you enabled any of the include-files?

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

    Falsed

    that's all i have in the config file for otherblocks yes.

    not even sure what you mean by include-files

    I really need help getting this fixed if anyone would know an answer, I've entered all correctly but it doesn't work, instead of dropping nothing it still drops and a shovel will just drop double for sand instead of 1.

    would any other plugins interfere with this?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  28. Enabling OtherBlocks prevents from destroying minecarts and paintings, except that everything works ok. Any fix for that (I've only enabled leaf overhaul)?
     
  29. Offline

    Zarius

    Latest version (1.93) of OtherBlocks? Using Permissions 3.16?
     
  30. Offline

    dyrnwyn

    Hey Zarius,

    I saw in the heroes thread (prior to it closing) that you were working on the 2.0 version with some improvements I have been hoping to see. Let me know if you need a server to test it on or someone else to try it out. My server and its players are all willing to assist.
     
  31. Offline

    Zarius

    I can confirm with OtherBlocks 1.93, CraftBukkit 1060 and PermissionsEx I have no problems with Minecarts, Paintings, Boats or the sand config.

    @Falsed

    In my setup the config I post above worked fine and dropped only one sand about 70% of the time.

    What permissions are you running? Permissions 3.16 or SuperPermsBridge?
     

Share This Page