[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

    Zarius

    Do you have the latest HawkEye or an unofficial one (that might cause the problem)?

    Enchanted sheep: pity :)

    Well, you could potentially want to drop a red sheared sheep...

    Don't have to specify an enchantment level - you'd just get the minimum level.

    Trouble with enchant: field is with multiple drops, eg. [GOLD_PICKAXE, IRON_INGOT, EGG] - we'd have attempt to apply it to all the items.

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

    Koksons

    The server was running with the plugin only OtherDrops
     
  4. Offline

    Zarius

    Dang - I see the error now but it's not playing nice - working on fixing it.
     
  5. Offline

    Celtic Minstrel

    Oh right... I was thinking of items only.

    Right, as I said, the shortcut syntax.
     
  6. Offline

    Zarius

    Koksons - fixed in 2.0.1 (download in first post)
     
  7. Offline

    Koksons

    Thank you!
    Now everything works as it should.

    I have a new problem:
    it's my config
    Code:
    otherdrops:
      CREEPER:
        - tool: ALL
          drop: 264
          Chance: 0%
          quantity: 1
    Diamonds droped from creeper always!

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

    Zarius

    You're right - there's bugs with the chances and drops (and default) :( I'll have to look into it in about 12 hours (gotta go to work).

    Doh... was side-tracked looking into another problem and didn't see the real problem with this config - all parameters need to be lowercase :/ There's no way around this unfortunately - it's a limitation of the YAML config in Bukkit (I could support it but it means I'd need to check uppercase/lowercase/titlecase/etc separately for each and every parameter).

    So this works:
    Code:
      CREEPER:
        - tool: ALL
          drop: 264
          chance: 0%
          quantity: 1
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  9. Offline

    Koksons

    the features (your first post) all the options are written with a capital letter, so it's written.

    In the meantime solved the problem this way:
    Code:
    otherdrops:
      CREEPER:
        - tool: ALL
          drop: 264/5%
        - tool: ALL
          drop: 289/85%
          quantity: 1-2
        - tool: 268
          drop: 264/20%
          quantity: 1
    

    I wanted to make a chance to recover glass, which the captures. I had a problem with the world guard. Each player could break the glass, despite the protected region ...
     
  10. Offline

    Zarius

    The features isn't meant to be a list of parameters (that's actually a few lines lower and all in lower case) but I understand the confusion and I've removed the capital letters at the start of each feature line.

    Not sure what the issue with your glass/worldguard is - I've tested worldguard protection and it works here. Still causing you issues? What versions of worldguard/otherdrops/craftbukkit are you using?
     
  11. Offline

    Koksons

    I do not know what I have to give permission to force world guard protect the glass.
    craftbukkit and plugins have the latest available version.
     
  12. Offline

    Zarius

    If your users can't break glass in the WorldGuard region normally (without OtherDrops) then it should be automatic that they can't break glass with OtherDrops enabled. Have you tested the same region with OtherDrops removed?

    I need to know the actual version numbers to be able to help debug the issue.
     
  13. Offline

    Koksons

    OtherDrops 2.0.1
    World Guard 5.4
    craftbukkit-1.1-R1-20120121.235721-81

    Region spawn:
    Code:
    regions:
      spawn:
        min: {z: 203.0, y: 0.0, x: -182.0}
        flags: {pvp: deny, greeting: To jest spawn - jedyne bezpieczne miejsce., use: allow,
          water-flow: deny, fire-spread: deny, lighter: deny, mob-spawning: allow, creeper-explosion: deny,
          lava-flow: deny, tnt: deny, chest-access: allow, ice-melt: deny, mob-damage: deny,
          enderman-grief: deny}
        max: {z: 305.0, y: 127.0, x: -80.0}
        priority: 0
        type: cuboid
        owners: {}
        members: {}
    all player can break glass
     
  14. Offline

    CubieX

    How to drop a custom amount of XP when killing a monster? Is it possible?

    EDIT. Found it in your description on BukkitDev. :)
     
  15. Offline

    Zarius

    Can you check the priority setting in your otherdrops-config.yml file? It should be priority: high in the newer versions of OtherDrops but if you've upgraded from an older version you might still have a different priority setting in there.

    I just tested with your region setup in the exact same versions of OtherDrops/WorldGuard/CraftBukkit and on priority high it works fine (ie. "You don't have permission for this area") but on priority normal (or lower) it allows you to break the blocks because worldguard hasn't had a chance to cancel the event yet.

    Glad you found it - let me know if you have any problems with it.

    Version 2.1 released! :)

    * enchantment support! eg. "drop: DIAMOND_SWORD@!DAMAGE_ALL#3, FIRE_ASPECT#2" - see here for more details
    * fix for bug where if an embedded chance fails the block doesn't break

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

    Celtic Minstrel

    Did you add an "enchant:" key as well?
     
  17. Offline

    Zarius

    Nope. I don't want to add this (want to keep the parameters down) unless someone has some good examples where it would be better than the embedded version. Intuitively I feel each enchantment is particular to a specific item therefore I feel they work best in the embedded form.
     
  18. Offline

    9903286

    Could it be possible to add so that if you hoe something (like a netherstone) it doesn't drop anything, instead it becomes another block.
    Code:
        NETHERRACK:
          - block: SAND
            action: RIGHT_CLICK
            tool: GOLD_HOE
    
     
  19. Offline

    Zarius

    Like this?

    Code:
        NETHERRACK:
          - action: RIGHT_CLICK
            tool: GOLD_HOE
            replacementblock: SAND
    
     
  20. Offline

    9903286

    Yes, exactly, thanks! I didn't know that command existed.. Oh and btw, i don't understand how to make an event, like if you mine a TNT it explodes.
     
  21. Offline

    Zarius

    Try:
    Code:
      TNT:
        - drop: NOTHING
          event: EXPLOSION
    
     
  22. Offline

    9903286

    Thanks! :D
     
  23. Offline

    CubieX

    I'm trying to display a message and grant no drops if a player kills a creeper with a bow.
    But the drops still get thrown and the message does not appear.

    How to set this up properly?

    Code:
          CREEPER:
            - tool: BOW
              drop: NOTHING/100%     
              message: ["Sniping a creeper? Where's the fun at that?"]
            - tool: ANY_SWORD
              drop: GUNPOWDER/60%/1-2   
            - tool: ANY_SWORD
              time: DAY
              drop: [XP/100%/4, MONEY/100%/1-3]
            - tool: ANY_SWORD
              time: NIGHT
              drop: [XP/100%/7, MONEY/100%/2-5]   
    
     
  24. Offline

    Zarius

    Try the unique flag, eg:

    Code:
          CREEPER:
            - tool: BOW
              drop: NOTHING
              flags: UNIQUE  # this means the other drops should not occur
              message: ["Sniping a creeper? Where's the fun at that?"]
            - tool: ANY_SWORD
              drop: GUNPOWDER/60%/1-2 
            - tool: ANY_SWORD
              time: DAY
              drop: [XP/100%/4, MONEY/100%/1-3]
            - tool: ANY_SWORD
              time: NIGHT
              drop: [XP/100%/7, MONEY/100%/2-5] 
    
     
  25. Offline

    CubieX

    Hmmm, no change. If the message does not appear, it means OD does not recognize me killing a creeper with a bow.
    That's strange.
    Even if I delete the other creeper drops, the message does not appear. :confused:
    The default drop gets thrown instead.

    I also tried "ARROW" instead of "BOW", but had no luck with it either.
     
  26. Offline

    Zarius

    Oops, sorry - didn't notice that bit. You need to use "PROJECTILE_ARROW".

    "BOW" and "ARROW" are interpreted as you walking up and hitting the creeper on the head with the item (would actually be quite impressive to kill a creeper manually with an arrow... :))

    Minor(ish) update:
    2.1.1

    * fix for "drop: default" not working
    * fix for "ALL:" & "ANY_CREATURE"
    * fix chance condition for dropgroups
    (download in first post)

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

    CubieX

    OK, that's weird.
    I tried another drop for it:

    Code:
        CREEPER:
            - tool: PROJECTILE_ARROW
              drop: STONE/100%/1
              flags: UNIQUE
              message: ["Sniping a creeper? Where's the fun at that?"]
            - tool: ANY_SWORD
              drop: GUNPOWDER/60%/1-2
            - tool: ANY_SWORD
              time: DAY
              drop: XP/100%/4
            - tool: ANY_SWORD
              time: DAY
              drop: MONEY/100%/1-3
            - tool: ANY_SWORD
              time: NIGHT
              drop: XP/100%/7
            - tool: ANY_SWORD
              time: NIGHT
              drop: MONEY/100%/2-5      
    I now also splitted the xp and money drop, because this:
    drop: [XP/100%/4, MONEY/100%/1-3]
    did nothing. Instead, the default drop was thrown.

    Now, the Stone gets thrown, meaning it's recognized now, but the message does still not appear AND XP is also there, but shouldn't. oO
    If I insert messages to the other drops, they appear.
     
  28. Offline

    Zarius

    CubieX


    What version are you using? I might have fixed that in 2.1.1. Just tested your config then and everything worked fine (including the "drop: [XP/100%/4, MONEY/100%/1-3]" bit).
     
  29. Offline

    9903286

    I am trying to get endermans to drop their blocks.. But it doesn't worklright... (I'm guessing i am the one doing something wrong)

    Code:
        CREATURE_ENDERMAN:
          - drop: CONTENTS
            chance: 100%
            quantity: 1
    
     
  30. Offline

    Zarius

    Nope, that's the correct way to do it :) Seems there's a bug with that bit :( I'll test it out later and see if I can fix it.

    New release - 2.1.2 (download in main post)

    * add dropgroup conditions back in
    * fix "drop:" default value (if not specified) - was DEFAULT, now NOTHING (more intuitive)
    * stop "drop: NOTHING" replacing blocks on actions other than blockbreak

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

    9903286

    Oh okay, by the way, could you add an event that makes it sunny. I wan't to make it so that when you hoe a gold block the block dissapears and then i stops raining.
     

Share This Page