[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

    kyle921

    Quick report here--just an in-console error that doesn't affect me (I don't mess with painting drops). Basically, it just spits this out when someone messes with a painting, but everything else still works as far as I can tell.
    Code:
    17:03:39 [SEVERE] Could not pass event PAINTING_BREAK to OtherDrops
    java.lang.NullPointerException
            at com.gmail.zariust.otherdrops.event.OccurredDropEvent.<init>(OccurredDropEvent.java:145)
            at com.gmail.zariust.otherdrops.listener.OdEntityListener.onPaintingBreak(OdEntityListener.java:121)
            at org.bukkit.plugin.java.JavaPluginLoader$60.execute(JavaPluginLoader.java:662)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.EntityPainting.damageEntity(EntityPainting.java:207)
            at net.minecraft.server.Entity.burn(Entity.java:671)
            at net.minecraft.server.Entity.a(Entity.java:1269)
            at net.minecraft.server.EntityWeatherStorm.s_(EntityWeatherStorm.java:117)
            at net.minecraft.server.World.cleanUp(World.java:1052)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:460)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    17:03:39 [SEVERE] Could not pass event PAINTING_BREAK to OtherDrops
    java.lang.NullPointerException
            at com.gmail.zariust.otherdrops.event.OccurredDropEvent.<init>(OccurredDropEvent.java:145)
            at com.gmail.zariust.otherdrops.listener.OdEntityListener.onPaintingBreak(OdEntityListener.java:121)
            at org.bukkit.plugin.java.JavaPluginLoader$60.execute(JavaPluginLoader.java:662)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.EntityPainting.damageEntity(EntityPainting.java:207)
            at net.minecraft.server.Entity.burn(Entity.java:671)
            at net.minecraft.server.Entity.a(Entity.java:1269)
            at net.minecraft.server.EntityWeatherStorm.s_(EntityWeatherStorm.java:117)
            at net.minecraft.server.World.cleanUp(World.java:1052)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:460)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    17:03:39 [SEVERE] Could not pass event PAINTING_BREAK to OtherDrops
    java.lang.NullPointerException
            at com.gmail.zariust.otherdrops.event.OccurredDropEvent.<init>(OccurredDropEvent.java:145)
            at com.gmail.zariust.otherdrops.listener.OdEntityListener.onPaintingBreak(OdEntityListener.java:121)
            at org.bukkit.plugin.java.JavaPluginLoader$60.execute(JavaPluginLoader.java:662)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.EntityPainting.damageEntity(EntityPainting.java:207)
            at net.minecraft.server.Entity.burn(Entity.java:671)
            at net.minecraft.server.Entity.a(Entity.java:1269)
            at net.minecraft.server.EntityWeatherStorm.s_(EntityWeatherStorm.java:117)
            at net.minecraft.server.World.cleanUp(World.java:1052)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:460)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  3. Offline

    Celtic Minstrel

    I believe that's a Bukkit bug that's fixed either in the latest recommended build or soon after it.
     
  4. Last RB defo has the fix in it already yup.
     
  5. Offline

    jespertheend

    Is it possible to make something like:

    tool: anything but ANY_PICKAXE

    because I want sandstone to drop 4 sand, but when you break it with any pickaxe it will drop 1 sandstone
     
  6. Offline

    Celtic Minstrel

    toolexcept: ANY_PICKAXE

    That should have the desired effect.
     
  7. Offline

    glow

    I got a small problem regarding world guard

    because of the plugin they can destroy blocks in world guard regions.

    so i was wondering how to enable world guard cheek in the configuration of a drop..

    thx
     
  8. Offline

    p000ison

    Does this work with bPermissions?
    If yes, can somebody help me?
    My Configs:

    OtherDrops(otherdrops-drops.yml):
    Code:
    include-files:
    aliases:
    defaults:
    otherdrops:
        GLASS:
            - drop: GLASS
            permissions: test
    bPermissions Config:
    Code:
    default: default
    groups:
      default:
      - bPermissions.build
      - otherblocks.custom.test
      - essentials.afk
    players:
      p000ison:
      - default

    Bukkit Build: #1338
    Other Plugins: Heroes, Essentials, bPermissions

    With this configs it doesnt work..
     
  9. Offline

    Celtic Minstrel

    I believe you need two more spaces of indentation on the last line of the -drops.yml. Does that fix the issue?
     
  10. Offline

    glow

     
  11. Offline

    slimpyman

    - tool: ANY_AXE
    drop: DYE@BROWN
    chance: 0.1
    - tool: ANY_AXE
    drop: APPLE
    chance: 0.7

    seems drops of apples happen all the time like 1/8 times and with any tool... any help?

    do you still have to set 100 chance to default nothing? ? can you show the command?
    I believe it was one command because sometimes mobs will drop their default, and its a certain way to be certain they do not drop the default drops?

    Drop: Nothing default?

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

    WGMasterMPH

    Try this:
    OtherDrops(otherdrops-drops.yml):
    Code:
    include-files:
    aliases:
    defaults:
    otherdrops:
        GLASS:
            - drop: GLASS
            permission: test
    bPermissions Config:
    Code:
    default: default
    groups:
        default:
        - bPermissions.build
        - otherdrops.custom.test
        - essentials.afk
    players:
        p000ison:
        - default
     
  13. Offline

    p000ison

    No doesnt work.. :'(
     
  14. Offline

    diannetea

    why do I always see this when creatures have drops assigned?

    2011-10-22 03:50:22 [WARNING] [OtherDrops:2.0-beta7] OnEntityDeath: entity has no 'lastDamageCause'.

    This is the only mob I have set up right now. Is something missing?
    Code:
        CREEPER@UNPOWERED:
            - tool: ANY
              drop: [TNT/20%, GUNPOWDER/1-3/80%]
    
     
  15. Offline

    Celtic Minstrel

    @WGMasterMPH – No, plural vs singular is not an issue; we accept both.

    @p000ison – Uh, I gave you something to fix; why didn't you try it? The permission line is not indented enough.

    @slimpyman – "drop: NOTHING" is probably what you want. As for the apples... I've heard there are issues with percentages not working correctly, sorry.

    @diannetea – Uhhhh... that shouldn't happen normally. It means the mob somehow managed to die without being damaged. Does your customized drop work? Like, if you shoot a creeper you'll get TNT and about 3-5 gunpowder?
     
  16. Offline

    p000ison

    Sry, I overlooked it. Bukkit formatted it wrongly:
    Code:
        GLASS:
            - drop: GLASS
              permission: test
    So doesnt help
     
  17. Offline

    WGMasterMPH

    Maybe it needs to have a tool?


    Code:
        GLASS:
            - tool: ANY
              drop: GLASS
              permission: test
     
  18. Offline

    p000ison

    No doesnt help.
    Does it work for somebody with bpermissions?
     
  19. Offline

    diannetea

    Kind of. I separately spawned 10 creepers, and only 3 dropped gunpowder at all, on the other hand 5 actually dropped TNT. Those numbers are way off from what should have happened.
    I did not see that error while testing, but I only used a sword and it is possible that error was while someone was using MobArena, but I also have mcMMO installed which I think could be affecting it as well. I have seen it enough in my console to know it is still happening.

    Also, exclusive is very confusing. I tried a ton of things to get it to work the way I wanted to. Percentages and chance do not seem to be dropping as I would expect them to.

    Code:
        PUMPKIN:
            - tool: ANY
              drop: PUMPKIN_SEEDS/5%
              message: Oops!  The pumpkin burst open!
              exclusive: 1
            - toolexcept: ANY_SPADE
              drop: THIS
            - tool: ANY_SPADE
              drop: PUMPKIN_SEEDS
    
    that 5% resulted in 5 out of 6 pumpkins dropping seeds and not pumpkins while using a hoe to destroy them :(
     
  20. Offline

    kahlilnc

    Code:
    01:07:46 [SEVERE] Could not pass event PLAYER_INTERACT to OtherDrops
    java.lang.NullPointerException
            at com.gmail.zariust.otherdrops.subject.BlockTarget.<init>(BlockTarget.j
    ava:43)
            at com.gmail.zariust.otherdrops.event.OccurredDropEvent.<init>(OccurredD
    ropEvent.java:176)
            at com.gmail.zariust.otherdrops.listener.OdPlayerListener.onPlayerIntera
    ct(OdPlayerListener.java:40)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.j
    ava:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:171)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:142)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:825)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :148)
            at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:36)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :500)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    I am testing out pex and now seems to be getting this error when ever I wack with my diamondsword.
    Code:
    01:08:42 [SEVERE] Could not pass event PLAYER_INTERACT to OtherDrops
    java.lang.NullPointerException
            at com.gmail.zariust.otherdrops.subject.BlockTarget.<init>(BlockTarget.j
    ava:43)
            at com.gmail.zariust.otherdrops.event.OccurredDropEvent.<init>(OccurredD
    ropEvent.java:176)
            at com.gmail.zariust.otherdrops.listener.OdPlayerListener.onPlayerIntera
    ct(OdPlayerListener.java:40)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.j
    ava:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:339)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:171)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:142)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:560)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :500)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    I think those are a bit different but this one happens when ever I right click with my sword.
     
  21. Offline

    WGMasterMPH

    I've bPermissions too and it works. But i'm switching to PermissionsEx.
     
  22. Offline

    codename_B

    Any reason?
     
  23. Offline

    WGMasterMPH

    It look's like more plugins work with PEX and it's a nice feature to add players/groups ingame.
    But bPermissions isn't bad. It was very easy to set it up and manage it. :)
     
  24. Offline

    codename_B

    What plugins are these? You can add players/groups in-game with bPermissions lol. Did you not look at the command list? :p

    But alright, no worries, as long as you didn't have any problems with it, I'm always looking for feedback to make things better is all!
     
  25. Offline

    RugRats

    @Celtic Minstrel Can you make it so this can log thin_glass, glass, and glowstone with hawkeye?
     
  26. Offline

    p000ison

    Can you post the important parts of your config?
    Pls I dont know what is false. Some time ago it works. But this was 1.x
     
  27. Offline

    WGMasterMPH

    This is how i set up a thunderscepter:

    Code:
        ANY_OBJECT:
            - tool: GOLD_PICKAXE
              action: RIGHT_CLICK
              event: LIGHTNING
              chance: 100
              permissions: zeus
    Permission:

    Code:
    default: Guest
    players:
        WGMasterMPH:
        - WGMasterMPH
    groups:
        WGMasterMPH:
        - otherdrops.custom.zeus
     
  28. Offline

    slimpyman

    so there is currently no suggestion to make mobs drop percentages, and cancel the default drops consistently?
     
  29. Offline

    Celtic Minstrel

    Hm, so it sounds like your config is basically working then, apart from the distribution being off. I suppose not having a last damage cause might be possible if a plugin killed it...

    Well, your config says you need a shovel, not a hoe; did you try that? As for the percentages, there is mounting evidence that they are simply not being rolled properly, so that's an issue that needs looking into. Also, from what you explain, I believe you want "flag: UNIQUE" rather than "exclusive: 1"; exclusive is for if you have several drops, but only want one of them to occur, in which case you'd give them the same value for exclusive. It shouldn't have any effect if there's only one drop that has it.

    @kahlilnc – That error is impossible in beta7; seems like you're probably using beta6? A quick glance at the source suggests this is not fixed in beta7 though (it's due to a block being null, which I thought was impossible, but maybe that's no longer the case). I guess I'll add a check for it... :/

    @RugRats – Uhhh, possibly. Now that you mention it, logging OtherDrops breaks with logging plugins might be something that was accidentally removed in the 2.0 rewrite. (It only supported BigBrother and LogBlock before, though.)
     
    RugRats likes this.
  30. Offline

    RugRats

    Well, please add it :). I haven't had OtherDrops on my server for close to 2-3 weeks :(
     
  31. Offline

    diannetea

    So I was specifically using the hoe because I have two pumpkin seed drops and I did not want the 100% chance, I wanted to test the one that would work with any tool.

    Code:
        PUMPKIN:
            - tool: ANY
              drop: PUMPKIN_SEEDS/5%
              message: Oops!  The pumpkin burst open!
              exclusive: 1
    
    That right there is what should not have been dropping 5 out of 6 times.

    Also exclusive does work if you put it on the first drop, when I gave everything exclusive with the same integer it caused only the drop with higher chance to drop and never anything else. I will try unique though.
     

Share This Page