[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

    Depends on what you want to do. eg. giving money for mob kills:

    Code:
      ZOMBIE:
        - drop: MONEY/30  # this will give the player that kills the zombie 30 "credits"
    
    You need an economy plugin - I suggest iConomy6 - mainly because it's what I test with (but it supports iConomy 4/5/6, BOSEconomy 6/7, Essentials Eco, and Multi Currency).
     
  3. Offline

    Le_minaw

    Hello,
    I have a problem with your plugin.
    I make the configuration and when the command /od show GLASS is shouted, all is working.
    But when I break glass, my server lag, and crash.
    In the console, there is
    Code:
    [SEVERE] Could not pass event BLOCK_BREAK to OtherDrops
    But the most interesting:
    Code:
    java.lang.NoSuchMethodError: me.taylorkelly.bigbrother.BigBrother.onBlockBroken(Ljava/lang/String;Lorg/bukkit/block/Block;Ljava/lang/String;)V
    Maybe the problem is BigBrother, no?
     
  4. Offline

    Zarius

    Sounds like a problem with OtherDrops actually - perhaps the BigBrother logging API has changed? I'll need the whole error message to track it down though. Not sure why your server lagged & crashed though - I would have just expected the error message and OtherDrops stopping, no other issues.
     
  5. Offline

    Le_minaw

    First of all, thanks for your fast Reply.
    So, maybe the lag/crash is an other problem.
    My version of BigBrother is outdated, I must update it?
    This is the complete complete message:
    Code:
    [SEVERE] Could not pass event BLOCK_BREAK to OtherDrops
    java.lang.NoSuchMethodError: me.taylorkelly.bigbrother.BigBrother.onBlockBroken(Ljava/lang/String;Lorg/bukkit/block/Block;Ljava/lang/String;)V
        at com.gmail.zariust.otherdrops.OtherDrops.queueBlockBreak(OtherDrops.java:303)
        at com.gmail.zariust.otherdrops.OtherDrops.performDrop(OtherDrops.java:350)
        at com.gmail.zariust.otherdrops.listener.OdBlockListener.onBlockBreak(OdBlockListener.java:88)
        at org.bukkit.plugin.java.JavaPluginLoader$40.execute(JavaPluginLoader.java:542)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:340)
        at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:205)
        at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:169)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:504)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:43)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:94)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:534)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    And, if it's important, I make the test with SOIL fot this test.
     
  6. Offline

    Zarius

    Le_minaw - could be that OtherDrops needs updating to support new versions of BigBrother.

    What version of BigBrother are you using?
     
  7. Offline

    Le_minaw

    It's the version 1.9.1-SNAPSHOT (#581)
     
  8. Offline

    Zarius


    1. Fixed for Beta12 (not released yet)
    2. no change from last post - will look into this after version 2.0
    3. Yes, you can override shears leaf drops (on left click) - tested this with:
    Code:
      LEAVES:
        - tool: SHEARS
          action: LEFT_CLICK
          drop: NOTHING
    
    I looked into it and I'd recommend LogBlock instead (or perhaps HawkEye) - my search for BigBrother just now came up with the following first results: "bigbrother is aperantly dead", "bigbrother not working?", "bigbrother crashed server, help?", "bigbrother for bukkit 1.0.1", "bigbrother = server lag?", etc...

    The official BigBrother thread is locked but it seems the download there is newer - 1.11.0, you could try that if you need to keep BigBrother. I just double-checked and I used BigBrother 1.10-1 for building OtherDrops so maybe 1.9.1 doesn't have the logging API (so yes, seems you need to upgrade BigBrother or change logging tool).

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

    Le_minaw

    OK, thanks a lot!
    Ho, and, great plugin.

    Oh, one thing (Yes, I'm a pain...).
    I make:
    Code:
        ZOMBIE:
            - drop: 383@054 #ID of the zombie's egg.
    But it's not working...
    I make a mistake, or the plugin doesn't work with eggs?

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

    Zarius

    It should work with drop: MONSTER_EGG@54 - as long as you are using a 1.1 build of bukkit.

    Beta 12 release (download):

    * fix "delay bug" choosing same location
    * dropgroups now have separate messages (handy for delays - show immediate message then delayed messages with event)
    * fix IN_MOB_ARENA flag
    * fix UNIQUE flag
    * update hawkeye logging (hopefully rollback works? not tested)
    * remove ProjectileAgent debug msg
    * fix for negative regions (region: [-here])
    * fix for ANY_BLOCK (using replacement block or DENY changed any block to the first block you broke)


    Old message, I know - but just letting you know that 2.0beta12 will let you do this now - eg.
    Code:
      LEAVES:
        - dropgroup: test
          action: LEFT_CLICK
          tool: GOLD_HOE
          message: ["&Cstep 4b)&F Congrats, %t detected, event test: you should see lightning after a short delay (60)."]
          drops:
    # test event - lightning
            - events: LIGHTNING
              message: ["&Cstep 4c)&F Lightning triggered."]
              delay: 60
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  11. Offline

    Skirmisher

    lol, you've been out for a while, so I guess you're not up to date on the logging plugins. N3X15 ditched BigBrother, so now everyone's using LogBlock or HawkEye while they're waiting for the merge of "the big three", called Guardian.

    So anyway, back to OtherBlocks: anything else you want me to test?

    Edit: Oh cool, you threw out a new release.
     
  12. Offline

    Le_minaw

    OK, fine, it's working at all.
    Thanks again, and sorry for my bad english... I do what I can.
    If I can help you, (but I think I'm useless), call me.
     
  13. Offline

    Nuinbot

    Awesome! Thanks so much, it is appreciated! :)
     
  14. Offline

    Zarius

    Oops - small bug in beta12 causes it to crash without mobarena plugin (I didn't notice as I was actively testing mobarena) - beta12-2 fixes this.

    Pre-release of beta13 (download here) with fix for explosion tools, and allowing explosions (tnt/creepers) to drop custom drops, for those that might want to try it out.

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

    kahlilnc

    Im getting this error with 12-2
    00:25:29 [WARNING] [OtherDrops:2.0-beta12-2] OnEntityDeath: entity has no 'lastD
    amageCause'.
    00:25:29 [WARNING] [OtherDrops:2.0-beta12-2] OnEntityDeath: entity has no 'lastD
    amageCause'.
    00:25:29 [WARNING] [OtherDrops:2.0-beta12-2] OnEntityDeath: entity has no 'lastD
    amageCause'.
     
  16. Offline

    Zarius

    Do you know what's causing it (eg. is anyone actively killing mobs)?
     
  17. Offline

    kahlilnc

    This is on my test server so I doubt it. And its spamming :/

    EDIT: I am not getting it anymore, maybe because what I am pasting in the world was killing tons of mobs at once. . . XD nvm then
     
  18. Offline

    Zarius

    Well, to remove the message you can put verbosity on low (it's a normal level message) but I'm not sure why it's occuring - I've been extensively testing it on my server and haven't seen that message once yet.

    I might move that message to a high verbosity level as it's not a critical error (basically it's just entering the onEntityDeath function, noting there's no lastdamagecause and exiting...)

    Ah, k - well thanks for the report anyway - I've moved the warning up to high verbosity and added the entity name to the warning to help in future.

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

    gawelium

    Hi, your plugin is awesome !
    Is it possible if i have group with groupmanager to configurate drop block for each group ?
     
  20. Offline

    Zarius

    Not sure about group manager but you can do it with the permissions. Just give each group a custom permission eg. "otherdrops.custom.miners", "otherdrops.custom.admins" and use:
    Code:
      GRASS:
        - drop: DIAMOND/10
          permissions: admins  # this means they need the otherdrops.custom.admins permission
    
    If no-ones got any outstanding bugs I think I'll push beta13 to a full 2.0 release :)

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

    CubieX

    OtherDrops 2.0 does nothing for me.
    The startup messages are ok. Says it's been loaded and iConomy has been found.
    But none of my drops are rewarded.
    "/id show spider" for example gives my config for it, so obviously OD has found my drop config file.

    Using Bukkit 1797 with PEX 1.17+ dev and iConomy 6, but it also does not work on RB 1597 for me...
    I then added my drops in the main config instead of having a separate include file, but the problem is the same.

    Neither money nor custom drops appear.

    My drop config: (open)

    Everithing default, only altered the drop config at the bottom:

    Code:
    otherdrops:
    ##########
    # Your changes here, or create a new .yml file and include it above in the "include-files" section
    # Explore the included config files for many more examples
    #
    # If make a interesting or crazy config let me know on the forum and I might include it in the next release.
    #
    # Example:
    #    GLASS:
    #        - drop: GLASS
    #     
    #        - drop: MONEY
    #          quantity: 3-15
    #          message: You recycled the glass for %q dollars.
        CREEPER:
            - tool: ANY_SWORD
              drop: TNT
              chance: 1
              message: ["Test OK"]
        SPIDER:
            - tool: ANY_SWORD
              drop: WEB
              chance: 1
              message: ["Test OK"]
        SKELETON:
            - tool: ANY_SWORD
              drop: BOW
              chance: 1
              message: ["Test OK"]
        ZOMBIE:
          - tool: ANY_SWORD
              drop: MONEY     
              quantity: 5
              chance: 1
              message: ["Test OK"]


    My main config: (open)

    Code:
    # Set this to "low" to reduce number of boot messages or to high, highest, extreme for more debugging info
    verbosity: normal
     
    # Try adjusting this if you have compatibility problems with other plugins.
    # Default: "high". Can also use "low", "normal", "high", "highest".
    priority: high
     
    # OtherDrops uses BukkitPermissions by default - set 'useyetipermissions' to true if you want
    # legacy permissions support (no guarantees it will work).
    useyetipermissions: true
     
    # Number of decimal places to round money drops off to (for the drop and message)
    money-precision: 2
     
  22. Offline

    Zarius

    CubieX
    Do you have any errors in your startup on the console? Not sure if it's just how you pasted it but the last bit of config (for the zombie) has too many spaces in front of the drop/quantity/chance and message lines that would cause an error.

    Do you have any errors/messages in the console when you kill one of the creatures?

    Also be aware that chance: 1 means 1% chance of a drop - that could be why you're not seeing anything. Perhaps you meant 100%?

    Woo - ( Kane - 22nd January it is :D ) 23:54 on the 2012/01/22 and version 2.0 finally released! :)

    Only change from 2.0beta13-1 is a fix for HawkEye logging and support for integer drop values (eg. 318@1022).

    There are undoubtedly a few bugs left but I'm satisfied that the major ones have been fixed. I still have heaps of ideas however so stay tuned for more versions (and hopefully less bugs :D)

    Next step however is to clean up change-logs and write a "what's new in 2.0" section - but that'll have to wait as I'm quite tired (2.0 took many late nights this week).

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

    CubieX

    Whoops. :eek:
    I thought 1 = 100% and 0.25 = 25 %.
    Now it works. Thanks & sorry. XD
     
  24. Offline

    Zarius

    Did you notice my comment about the chance values? 1 actually means 1% so you will very rarely see a drop - did you mean to put the drops at 100% instead?
     
  25. Offline

    CubieX

    I did. (edited my last message)

    But I have one more question: Does OD always add its drops to the normal game drops?
    Or does it suppress them if custom drops are set?
     
  26. Offline

    Zarius

    Suppresses them if there is a 100% chance of a custom drop, otherwise if no custom drop is "rolled" it'll drop the default. You can override this with a "- drop: nothing". Some examples:

    Code:
      GRASS:
        - drop: DIAMOND/50% # 50% chance of diamond - the other 50% of the time default drop will occur
    
    Code:
      GRASS:
        - drop: NOTHING  # this means that the default will never drop
        - drop: DIAMOND/50%  # 50% chance of diamond - the other 50% of the time nothing will drop
    
    You can also drop the default item however you like - eg.
    Code:
      GRASS:
        - drop: NOTHING  # this means that the default will never drop
        - drop: DIAMOND/50%  # 50% chance of diamond - the other 50% of the time nothing will drop
        - drop: DEFAULT/25%  # this now means that 25% of the time the default will occur (note this means you might get default _and_ the diamond)
    
    or if you only want one item to drop:
    Code:
     
      GRASS:
        - drop: NOTHING  # this means that the default will never drop
        - drop: DIAMOND/50%  # 50% chance of diamond - the other 50% of the time nothing will drop
        - drop: DEFAULT/25%
          flags: UNIQUE  # this means that if this drop occurs then the previous (eg. diamond) will not
    
     
  27. Offline

    CubieX

    Ok. I love this plugin because of its nearly endless customization ability.
    Our current drop plugin is a bit limited in some areas.
     
  28. Offline

    Celtic Minstrel

    But we also used "/" for separating multiple data values, so there's ambiguity there. Maybe "tool@data,data,data@ench!data,ench!data,ench!data/chance%/amount"...?

    It used to, but we removed that for consistency, since 50000 is not a data value there.

    This feature doesn't really seem to be in the scope of OtherDrops.

    Actually, I think extra spaces like that are ignored by the YAML parser.
     
  29. Offline

    Zarius

    Hmm... don't know that I've ever used the multiple data values... like SHEEP@RED/SHEARED isn't it? So SHEEP@RED,SHEARED@ench!data,ench!data/100%/1 (enchanted sheep FTW :D). There's still a little ambiguity there - how to tell between data and enchantments (as both follow an @)... In my local build I've added ench data and used tool@data!ench#level,ench#level but this can be easily changed.

    XP: actually the 50000 is a data value as you can set the value of each XP ball (ie. 3 lots of 500 XP balls or 50 lots of 1 XP balls) - not sure whether anyone would need this though so I'm in no rush to change it yet.

    XP direct to player - I'm happy enough with the ability to do this via commands :)

    Extra spaces - nope: the indentation was out and my server refused the process the config until fixed.
     
  30. Offline

    Celtic Minstrel

    Heh, you can't enchant sheep though. :p Come to think of it, I don't think you can actually have multiple data values in the drop; I think they only make sense in block or replacement.

    It's enchantments if it contains an exclamation mark? You do need to specify enchantment level, right?

    Hm, maybe it would be better to not embed enchantments in the drop at all... maybe we should just add a new "enchant:" field... but then you wouldn't be able to use enchantments in the short syntax. Still, we should probably add an "enchant:" field anyway.

    Maybe because the only properly-indented line had the hyphen...
     
  31. Offline

    Koksons

    I have a problem:
    Code:
    2012-01-22 17:17:02 [INFO] This server is running Craftbukkit version git-Bukkit-1.0.1-R1-103-gb0999f2-b1797jnks (MC: 1.1) (Implementing API version 1.1-R1-SNAPSHOT)
    2012-01-22 17:17:02 [SEVERE] Could not load 'plugins\OtherDrops.jar' in folder 'plugins':
    java.lang.NoClassDefFoundError: uk/co/oliwali/HawkEye/entry/DataEntry
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:175)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:188)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:109)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:156)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:132)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Caused by: java.lang.ClassNotFoundException: uk.co.oliwali.HawkEye.entry.DataEntry
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 11 more
    I've set up only with this plugin.
    It is very necessary to me.
    I used the default configuration.
     

Share This Page