[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

    Ah, sorry, I kinda dropped out of Bukkit-land for awhile. I'm fine with you officially taking over from Cyklo, and I'll try to get my code to you at some point.
     
  3. Offline

    Legolas75893

    Mind updating the Material and Creature list?
     
  4. Offline

    Zarius

    Updated the wiki with WEB, DETECTOR_RAIL, POWERED_RAIL, TRAPDOOR, DEAD_BUSH & LONG_GRASS - did I miss any? This should work in the latest version I think (I know that WEB does as I use it already) - gotta go to work now but will test this tonight and update the plugin if needed.
     
  5. Offline

    Legolas75893

  6. Offline

    Zarius

    Oops :D Don't know if it'll work but could be cool to have a particular (pre-explored) map randomly drop from sand as a "treasure map". Will look into it.

    Would be even better if you could place an x marks the spot on maps...
     
  7. Offline

    Legolas75893

    Mhm. <3 we thought the same things lol.
     
  8. Offline

    Zarius

    Maps work fine - just use MAP as the drop item and color: <mapnumber> to determine the map dropped :D Coding is thanks to Cyklo & Bukkit, I didn't have to change anything to enable maps.
     
  9. Offline

    Legolas75893

    Any chance for "CREATURE_PLAYER" any time soon?

    EDIT: Also, maybe certain events happening? Like, kill a zombie and it has a 1% chance of exploding?
     
  10. Offline

    Celtic Minstrel

    Note on maps, make sure you put the number of a map that has already been crafted by normal means.

    Better still, don't use maps as a drop.

    @Zarius – Just wondering, would you be interested in the code I put together for things like paintings and boats? I don't think I tested it, but if you don't already have that implemented...
     
  11. Offline

    Zarius

    Not sure that I'd use player drops myself but shouldn't be too hard (I hope). The exploding sounds cool too, will see if it's possible.

    Hadn't tested the map with a non-crafted map number - what happens? And wonder if there is a way to have the plugin detect this and not drop a non-crafted map.

    @Celtic Minstrel - yes, would love to see the code :) I'm probably working on different things so it'll save time and I don't mind testing it. Update your github repo and do a pull request?
     
  12. Offline

    Celtic Minstrel

    I'm not going to make a pull request since it's not tested, but you can find the code on my repository.
     
  13. Offline

    Zarius

    Updated to 0.7.6 - small change: added /otherblocksreload (or /obr) command to reload the config file.
     
  14. I don't understand where to download the jar, the site's only giving me the source code :/
     
  15. Offline

    Zarius

    Doh, I forgot to link to the raw file - fixed now, try downloading again.
     
  16. Thanks a bunch ^_^
     
  17. Offline

    Celtic Minstrel

    Alright, @Zarius – I just pushed a version with code for water damage, though again, it's not tested and may need some work.
     
  18. Offline

    Zarius

    Cool (suprisingly I took at look at your repository about 2 minutes after you pushed the change :D) - have been looking through the code and will test soon. Love the new synonyms.
     
  19. Offline

    Motumbo

    So ... Does this replace the drops? Or does it add additional drops?
    Example: I set stone to drop coal 100% of the time, will it drop stone and coal? Or just coal?
     
  20. Offline

    Zarius

    It can do both, if you set coal to 50% and add not other drops to stone then stone will drop coal 50% and default (cobble) 50%. If you set coal to 100% then it will only drop coal.

    You could also set it to drop coal 100% and gravel 100% then (because the total is above 100%) there should be no default drop and you'd have both coal & gravel dropping. You could add three, four, however many drops you want with different percentages each.
     
  21. Offline

    Motumbo

    Thank you. I am working on configuring the plugin now. If I do not edit stone for example ... and just leave stone out of the config file, will minecraft just drop the default stone? Because I don't want to have to go in and edit each item. :)
     
  22. Offline

    Zarius

    That's correct, drops will not be altered from the default (which may or may not have already been modified by other plugins) unless you add a section for that object/block.
     
  23. Offline

    Motumbo

    I cant seem to find the lapis dye

    for lapis dye would I do ...

    drop: INK_SACK
    color: BLUE

    ?

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

    Zarius

    Correct - that should work.
     
  25. Offline

    Motumbo

    also, is there a way to just flat out turn off creeper explosions with this plug in?

     
  26. Offline

    Zarius

    Not currently - the plugin only affects drops. I'm thinking about an "effects" field where you could add a chance of other creatures exploding, possibly with an attached drop - eg. a zombie could explode into a shower of diamonds, a spider have a 20% chance of exploding into two other spiders (not sure where you'd use this, but it'd be cool :D). If this is possible then it would be easy to disable the creeper explosions.

    I currently use "HigherExplosives" (don't know when this was last updated but working fine on RB860 still) to control creeper explosions as I don't like disabling them completely - I just reduce the size of the damaged area and increase the yield to 100% (ie. all destroyed blocks drop so you can easily fix holes).
     
  27. Offline

    Motumbo


    HEY. Thanks for all the help. Also, can you check my code on that website. I dont think I have any errors.

    Code:
    priority: lowest
    verbosity: low
    
    otherblocks:
        DIRT:
            - tool: ALL
              drop: DIRT
              chance: 100
    
            - tool: ALL
              drop: SEEDS
              chance: 1
    
            - tool: ALL
              drop: STICK
              chance: 5
    
            - tool: ALL
              drop: BONE
              chance: 2
    
            - tool: ALL
              drop: GLOWSTONE_DUST
              chance: 20
    
            - tool: ALL
              drop: INK_SACK
              color: BROWN
              chance: 3
    
            - tool: ALL
              drop: YELLOW_FLOWER
              chance: 3
    
            - tool: ALL
              drop: RED_ROSE
              chance: 3
    
        GRASS:
            - tool: ALL
              drop: DIRT
              chance: 100
    
            - tool: ALL
              drop: SEEDS
              chance: 1
    
            - tool: ALL
              drop: STICK
              chance: 5
    
            - tool: ALL
              drop: BONE
              chance: 2
    
            - tool: ALL
              drop: GLOWSTONE_DUST
              chance: 20
    
            - tool: ALL
              drop: INK_SACK
              color: BROWN
              chance: 3
    
            - tool: ALL
              drop: YELLOW_FLOWER
              chance: 3
    
            - tool: ALL
              drop: RED_ROSE
              chance: 3
    
        STONE:
            - tool: ALL
              drop: COBBLESTONE
              chance: 100
    
            - tool: ALL
              drop: COAL
              chance: 4
              quantity: 1-2
    
            - tool: ALL
              drop: GOLD_INGOT
              chance: .25
              quantity: 1-2
    
            - tool: ALL
              drop: IRON_INGOT
              chance: .5
              quantity: 1-2
    
            - tool: ALL
              drop: DIAMOND
              chance: .1
              quantity: 1-2
    
            - tool: ALL
              drop: MOSSY_COBBLESTONE
              chance: 4
    
        GOLD_ORE:
            - tool: ALL
              drop: GOLD_INGOT
              chance: 100
              quantity: 1-4
    
            - tool: ALL
              drop: IRON_INGOT
              chance: 5
    
            - tool: ALL
              drop: DIAMOND
              chance: 1
    
        IRON_ORE:
            - tool: ALL
              drop: IRON_INGOT
              chance: 100
              quantity: 1-4
    
            - tool: ALL
              drop: GOLD_INGOT
              chance: 5
    
            - tool: ALL
              drop: DIAMOND
              chance: .5
    
        COAL_ORE:
            - tool: ALL
              drop: COAL
              chance: 100
              quantity: 2
    
        LOG:
            - tool: ALL
              drop: LOG
              chance: 100
              quantity: 1-2
    
        DIAMOND_ORE:
            - tool: ALL
              drop: DIAMOND
              chance: 100
              quantity: 1-5
    
            - tool: ALL
              drop: DIAMOND_BLOCK
              chance: 2
    
        SAND:
            - tool: ALL
              drop: SAND
              chance: 100
    
            - tool: ALL
              drop: GLOWSTONE_DUST
              chance: 20
    
        LEAVES@GENERIC:
            - tool: ALL
              drop: APPLE
              chance: 5
    
            - tool: ALL
              drop: GOLDEN_APPLE
              chance: .75
    
            - tool: ALL
              drop: AIR
              chance: 100
    
            - tool: ALL
              drop: SAPLING
              chance: 5
    
        REDTONE_ORE:
            - tool: ALL
              drop: REDSTONE
              chance: 100
              quantity: 1-5
    
        ICE:
            - tool: ALL
              drop: ICE
              chance: 100
              quantity: 1-2
    
            - tool: ALL
              drop: RAW_FISH
              chance: 5
    
        LAPIS_ORE:
            - tool: ALL
              drop: INK_SACK
              color: BLUE
              chance: 100
              quantity: 3-6
    
        CREATURE_CHICKEN:
            - tool: ALL
              drop: EGG
              chance: 50
              quantity: 1-2
    
            - tool: ALL
              drop: FEATHER
              chance: 50
              quantity: 1-3
    
            - tool: ALL
              drop: AIR
              chance: 100
    
        CREATURE_COW:
            - tool: ALL
              drop: LEATHER
              chance: 100
              quantity: 1-3
    
            - tool: ALL
              drop: MILK_BUCKET
              chance: 3
    
        CREATURE_SHEEP:
            - tool: ALL
              drop: WOOL
              chance: 100
              quantity: 1-4
    
        CREATURE_PIG:
            - tool: ALL
              drop: PORK
              chance: 100
              quantity: 1-2
    
            - tool: ALL
              drop: GRILLED_PORK
              chance: 5
    
        CREATURE_SQUID:
            - tool: ALL
              drop: INK_SACK
              color: BLACK
              chance: 100
              quantity: 5
    
        CREATURE_SPIDER:
            - tool: ALL
              drop: STRING
              chance: 100
              quantity: 1-3
    
            - tool: ALL
              drop: GLOWSTONE_DUST
              chance: 40
              quantity: 1-2
    
            - tool: ALL
              drop: NETHERRACK
              chance: 10
              quantity: 1-3
    
            - tool: ALL
              drop: SOUL_SAND
              chance: 10
              quantity: 1-3
    
        CREATURE_SKELETON:
            - tool: ALL
              drop: ARROW
              chance: 100
              quantity: 3-5
    
            - tool: ALL
              drop: GLOWSTONE_DUST
              chance: 40
              quantity: 1-2
    
            - tool: ALL
              drop: NETHERRACK
              chance: 10
              quantity: 1-3
    
            - tool: ALL
              drop: SOUL_SAND
              chance: 10
              quantity: 1-3
    
        CREATURE_ZOMBIE:
            - tool: ALL
              drop: GLOWSTONE_DUST
              chance: 40
              quantity: 1-2
    
            - tool: ALL
              drop: NETHERRACK
              chance: 10
              quantity: 1-3
    
            - tool: ALL
              drop: SOUL_SAND
              chance: 10
              quantity: 1-3
    
            - tool: ALL
              drop: AIR
              chance: 100
    
    ALSO, I cannot get apples to drop from the leaves. Can you check that for me?

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

    Zarius

    All looks fine to me and parses ok (note: you only need to test with that website if you're getting errors from this plugin when you start up the server).

    Let me know how those % drops work for you, I had golden apples at around the same (0.75%) and seemed to be getting too many, I've changed mine to 0.006% and with about 8 regular players we find a golden apple once a week I think (unless they're not telling me about all the ones they find :D). Really depends on how rare you want to keep it.

    Keep in mind that leaves@generic only applies if you actually destroy the blocks. If you want to affect the leaf decay you need SPECIAL_LEAFDECAY@<treetype> (GENERIC,BIRCH or REDWOOD).

    Love the idea of ice having a chance to drop raw fish :D Have you considered having your spiders a % chance of dropping WEB?

    Just posted noting that LEAVES@GENERIC will only drop things if the player actually destroys the leaves. For decaying leaves use SPECIAL_LEAFDECAY@<treetype> (GENERIC,BIRCH or REDWOOD).

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

    Motumbo


    I didnt even think about web. I have been sitting there chopping the leaves. And still not a single regular apple. I don't understand what is going on. Everything else seems to work perfectly.

    I didnt want the leaf decay option. I want people to have to sit there and chop. But Why no apples? I have apples set at the same rate as the saplings. And I am getting saplings. So ... hrmmm?
     
  30. Offline

    Zarius

    Odd... I have also noticed that my server doesn't seem to be dropping apples but I wasn't 100% sure. Perhaps there's a problem that occured with the 860 update - will need to do some testing when I get home to see how apples work (have you tried 100% apple drop just to see if it works?).
     

Share This Page