[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

    Oops, ignore that one - it's only a debug warning that's meant to show on verbosity high.
     
  3. Offline

    RugRats

    Well I don't get any drops now :O and everything I destroy one of the editted blocks this comes up in the console and it drops the default drop. My verb is on low.
     
  4. Offline

    Zarius

    Dang, I didn't get to testing it with config version 1, add this line below verbosity:

    configversion: 2

    Currently no difference in config layout, it was just in preparation for drop groups.

    Edit: yup, need to add the line above or it won't work. Will be fixed in next release.
     
  5. Offline

    RugRats

    Works now thanks/ messages don't support color codes.

    @Zarius still getting random dropGroup: null messages. At random times..

    I'm using the brand new config. Yes. It was not 2 by default. EDIT: i get that dropGroup: null whenever i hit grass the weed stuff

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

    Zarius

    Yup, found the issue and fixed it for the next release, thanks for that. Will add colored messages to the todo list (which is currently miles long :D).
     
  7. Offline

    RugRats

    Okay and I get this :D
    Code:
    2011-07-14 19:11:53 [INFO] [OtherBlocks] Before compareto
    2011-07-14 19:11:53 [INFO] [OtherBlocks] Before compareto
    2011-07-14 19:11:53 [INFO] [OtherBlocks] Before compareto
    2011-07-14 19:11:54 [INFO] [OtherBlocks] Before compareto
    2011-07-14 19:11:54 [INFO] [OtherBlocks] Before compareto
    2011-07-14 19:11:54 [INFO] [OtherBlocks] Before compareto
    2011-07-14 19:12:08 [INFO] [OtherBlocks] Before compareto
    2011-07-14 19:12:08 [INFO] [OtherBlocks] Before compareto
    2011-07-14 19:12:08 [INFO] [OtherBlocks] Before compareto
    I do not know what causes it, it just spams the console randomly.
     
  8. Offline

    Zarius

    Left a debug message activated on leaf decay, fixed :) Can't release for until probably tomorrow though, but if you're happy to keep testing I really appreciate the bug reports :)
     
  9. Offline

    RugRats

    Well if you did see this sorry if you hit grass "wild grass" I get the dropGroups: null and if you could pass me on a unreleased beta version I would be more then willing to test with much better/ organized reports :p
     
  10. Offline

    Zarius

    What are you using in the config, LONG_GRASS?

    Oops, meant bug reports, not big. I'm happy with small bug reports and big reports :)

    I figure with a stable and beta version lots of people can try it out but the primary download link stays stable for those that want it.
     
  11. Offline

    RugRats

    Nope wild grass isn't editted at all to begin with so idk hehe
     
  12. Offline

    Zarius

    Odd. Well I've cleaned up the debug needed and made them give a bit more info so the next version should help us pinpoint this bug. Also this "drop groups is null" message will now only appear at verbosity high or greater.
     
  13. Offline

    RugRats

    yea I have my verb on low..
     
  14. Offline

    Celtic Minstrel

    Of course they will, if you use the § character followed by a hex digit and make sure to save your config file as UTF-8.

    (If you don't know what that means, you might want to reconsider running a Minecraft server... <_< )
     
  15. Offline

    Zarius

    That's a bit harsh :p I've been quite successfully (to my own goals) running a small server for nearly three months now with 70 plugins and about 99.88% uptime. I've never had much cause to play with color codes and since I'm running on linux I haven't concerned myself with file encoding (saving utf-8 by default).

    I wasn't sure that the color symbol was something supported by default by bukkit/minecraft or whether it was something plugin developers need to support. Glad to hear that it works :)
     
  16. Offline

    Imakunee

    Hi, I really love the plugin as it's working flawlessly for me and lets me do many things I've been wanting but there's just one issue. I don't know if it's already been addressed but this mod seems to conflict with other mods that check on block destroys.

    For example, I've had the mcmmo and jobs plugins on the server pretty much since creation and they haven't conflicted at all even though mcmmo and jobs are checking the same blocks for when they get destroyed. But when I added in OtherBlocks, any block that I change the drop of suddenly doesn't trigger those checks in mcmmo and jobs stopping people getting paid for things they break or skilling up for them.

    I really appreciate you reading this and possibly taking the time to give me an answer no matter how naive I'm being with the problem. Thank you!
     
  17. Offline

    RugRats

    Oh really? I have all 3 of thoughs plugins and not one error :O. My users say they work great.
     
  18. Offline

    Zarius

    Glad you're liking it. This is a good point and one I've been trying to get around. I think the only solution is for Bukkit to support cancelling the drops on a block as they do with creatures. Currently we 'fake' the drop by cancelling the destruction event and turning the block to air, therefore other plugins see the event as cancelled and take no action.

    If you want this fixed, please sign up at the Bukkit issue tracker and add a comment for this issue here.

    It's ok for any block unless you cancel the default drop (eg. change grass drop to grass). When default drop doesn't occur it means that the event is cancelled and other plugins down the line don't take action. Creating a method for plugin dev's to cancel just the drop and not the block destruction would allow this to be fixed - see the issue I linked to in previous post :)

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

    sagethor

    @Zarius

    Unsure if I have asked this before - I want to make logs drop charcoal upon burning. Do I insert DAMAGE_FIRE as a tool, then?

    EDIT - Argh, is there color support for messages? I tried using &2 for green...

    EDIT EDIT - Nevermind the last edit.:p
     
  20. Offline

    Zarius

    Unfortunately DAMAGE_FIRE only applies to entities at the moment, I don't think there's anything set up for burning blocks yet but it's on my todo list.

    Yes, colors are supported - I'm guessing you figured it out or read a few posts up :)

    Version 1.0 released!

    Major features (if you haven't been watching the beta versions):

    * more lightweight - the plugin now only checks through drops applicable to the block being broken, entity killed, etc (previously it quickly scanned through every drop in the config file for matches, now it uses a hashtable to directly get only the right drops).
    * some small bug-fixes/consistency, drop: DENY stops leaf decay (but doesn't work with other drops because leafs can keep decaying), exclusive: option should work for entities but I haven't tested this.
    * permissions/permissionsexcept option - this is more powerful than the current permissiongroups option. See the example in top post
    * include-files option to include separate config files
    * a bunch of extra config examples included as "include-files"
    * "defaults" parameter for separate config files (eg. you can specify a default world and it will apply to every drop in that file - can save a lot of typing :)) - see included example files for usage
    * bugfix: /obr bug (didn't work without permissions turned on, now will use ops if no permissions)
    * bugfix: sheep dropdata fixed - you can now drop coloured sheep, if you so desire (dropping items from sheep is still broken until Bukkit releases a new recommended build)
    * bugfix: PLAYER drops now default to dropping inventory - use drop: NODROP to disable player inventory drops

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  21. Nice new stuff on the release!

    Does this support multiple conditional drops?
    Meaning: Can it drop this OR this OR this OR this, but not this AND a chance of this AND a chance of this AND a chance of this?
     
  22. Thanks for PLAYER (any) drops. Thanks to this people can now be infected by zombies or spiders and sometimes their bones still running around when fire burned their flesh away [skeleton]
    And of course a lot of random drops. The empty-furnace-bug is fixed by the way.
     
  23. Offline

    phrstbrn

    Can you change your event priority to be configurable? Since your plugin cancels the BlockBreakEvent, other plugins (such as mine, Jobs) see that the BlockBreakEvent was canceled when checking for the outcome of the event. There is currently a conflict with my plugin which can't be fixed without either breaking compatability with other plugins.

    However, allowing the user to change the priority for both plugins would allow the user to workaround any conflicts they might have.
     
  24. Offline

    sagethor

    @Zarius

    Wait, it's actually implemented? I just saw something in your "To-Do" list or something about it.

    Not sure how it'd work - I updated to the latest version, and the messages still show the ampersand and the number/letter for the color I wanted.
     
  25. Offline

    Skirmisher

    You're supposed to use the § character, not the ampersand.

    Yay, someone has a more insane amount of plugins than me! :p

    Even I know it's a default MC thing :p

    What, no group drops? D:
    The permissions thingy looks epic. I might use it sometime.
     
  26. I'm not certain after looking over this, is it possible to set off a creeper style explosion event from non-creepers with this mod?
     
  27. Offline

    sagethor

    @Skirmisher

    Not quite sure what you mean by that. I replaced all the & with §, and it just had an error pertaining to special characters being not allowed.
     
  28. Offline

    Skirmisher

    What threw the error specifically? I've known some things to throw errors because of that char in the config.
     
  29. Offline

    Zarius

    phrstbrn: priority changing is already in there - top of the global config file :)

    Yes, a lot of plugins. Surprisingly I still very selective :)

    Colors: I can understand some people being confused - permissions obviously replaces the &# with the color symbol. I can probably add that in too.

    Group drops have been pushed back to 1.5 as they're not working - if anyone can come up with a viable YAML format for then let me know :D This doesn't work:

    Code:
    ##### This is not valid YAML :(
        SAND:
            - dropgroup: mapandcompass
              chance: 0.5
                - tool: ALL
                  drop: MAP@0
                  chance: 100
                - tool: ALL
                  drop: COMPASS
            - tool: ALL
              drop: STICK
              chance: 1
            - tool: ALL
              drop: SAND
              chance: 100
    

    Not quite the same - no hissing/explode on proximity, can only make them explode on death using event: EXPLOSION.

    Check out the example config for leaves - golden apples should have that character. What program are you editing the text files in?

    Oh - just thought of something - you probably need to make sure the message is enclosing in quotation marks.
     
  30. Offline

    sagethor

    @Zarius

    No, I just got it working now. And yeah, I probably did need that weird A character. Downloaded some more crap on my computer, and now my Desktop's a rather crowded place. Thanks for the quick support though! :)
     
  31. Offline

    Zarius

    No worries - I've just made it support "&c" etc too :D I'm thinking later I might add &{blue} &{red} etc because I keep forgetting the numbers :D
     

Share This Page