[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



    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
        # Simple glass drop fix
          - drop: GLASS
        # Players drop Zombies on death, 50% of the time
          - 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
          - tool: ANY_SWORD
            time: NIGHT
            drop: WEB
            chance: 10%
        # Trees drop apples (or cocoa from birch trees)
          - drop: APPLE
            chance: 5%
          - 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.


    Newest changelog details here.

    Main author: @Zarius
    Contributors: @Celtic Minstrel, raws
    Original author: @cyklo
  2. Offline


    Just trying to come up with possible solutions its a very tricky problem right now :) Would you want planted trees to be considered as generated by the world?
  3. Offline


    Bug report for 1.9.1 alpha: You can only place blocks by placing it on the block beneath it it won't work if your aiming at the side of the block.
  4. Offline


    It was a plugin generated world (SphereWorlds) so I figured that's got something to do with it. I haven't specifically disabled weather and haven't really looked into it yet - but yeah, lightning would be cool with that particular event/drop.

    Basically you'd want anything that a player hasn't placed to be considered "natural", so trees & also a plugin such as NeoMeteorites which leaves chunks of ore in the ground should be consider natural.

    Tricky part is that for 100% accuracy you'd have to track _all_ block placement so that "natural" placement overrides non-natural. eg. if a player places a bunch of logs, tnt blows them up and then another player plants a tree at the same spot - the tree should override the prior player placed logs and be considered natural.

    Hmm... that's a big one :) Side-effect of me trying to cancel the tilling on the sides I imagine - will see if I can come up with a solution, otherwise till cancelling will have to be left out.
  5. Offline


    Ok cool, then ya I think the only reasonable thing would be to mark what blocks are "player created" and act accordingly. Do you think there is an easy way to tie into BB or logblock for this? Maybe make it an optional dependency. I mean if you can do it it cuts down on redundancy and time to program your own block storage. :)
  6. Offline


    well the onleftclick and onrightclick events work just fine, but the block break events still aren't registering. i'm using the 1.9 build, and updated my essentials plugins, and started removing them one by one until only 3 jars remained.
    i can definitely say the conflict is with the EssentialsGroupBridge.jar.
    apparently the groupbridge.jar is what emulates the permissions plugin. without it many of my permissions-only plugins stop working, but otherblocks STARTS working (albeit without any permission checks)

    after downgrading otherblocks to version 1.8 and it works just fine, btw. i set the permissions flag to true, and apply permissions nodes where needed, and it WORKS.

    so something has changed in the way you're handling permissions between 1.8 and 1.82? is it possible to re-add the support from 1.8?
  7. Offline



    Odd that clickleft/right events work as they use the same code. Do creature drops work (ie. just block break that's broken)?

    edit: ok, have replicated the issue - can see how EssentialsGroupBridge pretends to be Permissions - trying to track down why blockbreak stops working.


    Does the group your players are in have build permissions in the groupmanager config? My tested revealed that EssentialsGroupManager doesn't seem to honour the "build" option in the permissions file. The default "plugins/GroupManager/worlds/world/groups.yml" file put me in the "default" group where it has "build: false" however I could still build in the world.

    In permissions if this "build: false" exists for your group then you cannot build, hence OtherBlocks not doing anything. Setting this to "build: true" worked and with a little testing everything seems to be working fine.

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


    oh my freaking god.
    that solved it.
    yes, that value was set to false because it never seemed to do anything, so i left it at default and never even considered it as a possibility. in fact, this is actually the first time it has even come up.
    it's supporting the permissions setting in groupmanager perfectly, although not the permissiongroups setting.
    I'll test around with this some more, but putting nodes in the groups works just as well for what i'm doing.

    thanks again for your help and support with this issue.
  9. Offline


    Of those that have tried the alpha - any problems? Might release it as a full version soon then work on the additional features needed for the old sheep shearing.
  10. Offline


    Nope no problems? I've got like 20 people on most of the time and there always doing stuff and they report me any weird things that happen and so far no problems only the stuff I pointed out to you already
  11. Offline


    Only one issue I spotted was the Special Leaf decay event, clashes with World guard's leaf event flags. Leaves all over my world decayed x.x When I added special leaf decay event dropping stuff or not dropping. Seems that the leaf decay event (similar to the issue with the build/break permissions not being honoured) is not honouring the leaf decay flag in a region(s). The thing was I had it set to only work in a specific small region - and it impacted the entire world.

    Also another thing I have noticed, unforutnately it is intermittent, but my messages for certain events are not showing up after a while (when they DO work), but I do get the drops!

    So it works fine after a reload, then after a while I stop getting , "You have killed a Zombie, 6.53 ZP for you!" but when I check money before and after I do get it.

    Sorry I have not gone into great detail, so no debug, or verbose messages. I have had very very little time to do anything. If someone else gets this problem too, would be great to give more details. Problem is the intermittent issue - so I can't really flag you down on this because I know how hard it is to fix a bug without some way to replicate it consistently - unless you happen to know what the problem could be. Getting drops and not the message in a typical

    With this:
    I get the message at the start, then it stops.

    Example of monster setting (open)

            - tool: ALL
              drop: NOTHING
            - tool: ALL
              drop: FEATHER
              quantity: 1-2
              chance: 50
              drop: FEATHER
              exclusive: 1
              quantity: 1-2
              chance: 10
            - tool: DAMAGE_FIRE
              drop: CREATURE_SKELETON
              chance: 50
              exclusive: 1          
            - tool: AIR
              drop: MONEY
              quantity: 4.5-8.1
              height: ">64"
              message: "&7Zombie was killed with barehands!  &6Reward &4%q&6 ZP."
            - tool: DIAMOND_SWORD
              drop: MONEY
              quantity: -7.5~22.5
              height: ">64"
              message: "&7Zombie slain with diamond sword! &eGambling... &6Result: &4%q&6 ZP."    
            - tool: BOW
              attackrange: ">34"
              height: ">63"
              drop: MONEY
              quantity: 6-15
              message: "&7Zombie was sniped!  Nice shootin' Tex!  &6Reward &4%q&6 ZP."
            - tool: BOW
              attackrange: "<35"
              height: ">63"
              drop: MONEY
              quantity: 4.5-8.1
              message: "&7Zombie was embedded with arrows! &6Reward &4%q&6 ZP."
            - tool: ALL
              height: ">63"
              toolexcept: [AIR, DIAMOND_SWORD, BOW]
              drop: MONEY
              quantity: 3-7.5
              message: "&7You have butchered a zombie! &6Reward &4%q&6 ZP."

    Thanks again for the plugin, hope maybe you know what's going on :)

    Bukkit build #1000 still, and using 1.81.
    Only plugin that I have installed since it was working was Citizens 1.0.9d.
    I have yet to see if this happens on my dev server as well, but I haven't had time, I will post again in weekend if you still are unsure.
  12. Offline



    I wasn't aware of the leaf decay flag - will look into compatibility with it.

    As for the message issue that's an odd one - the message does run at the end of the drop though (so the drop occurs before the message) so it's stopping in the middle for some reason, I'll probably need to put some more debug messages in, send you the debug versio and ask you to give me a log file at some point.
  13. Offline


    sure, but it's intermittent, right now I just ran a quick test... one player got the message, and another did not. (I did not either). Then another time I reloaded, I got the message, and they didn't. (while some others did) If that is confusing to you, it baffles me too. :) At least the drops are still working at least. But it is perculiar, let me know if you have a debug version you need me to run. (can do it tomorrow late, after work - like 7am your time)
  14. Offline


    [WARNING] [OtherBlocks:1.9-alpha2] PerformActualDrop - Error: target type unknown
    I'm getting that if i set that boats drop boats with Tool ANY, and if i change it to NOTHING it doesn't drop anything, but i don't get the error.

    - tool: ALL
    drop: BOAT
  15. Offline


    Thanks for that. Will test it out and look into a fix tonight.
  16. Offline


    This will reintroduce BlockDrops for me!
    Many thanks, Z!
  17. Offline


    Found the problem Zarius, took a little thinking - I realised now that Citizens is the cause of the messages not being given.

    I can reproduce this bug easily.

    You have to have my Zombie killing setup in your otherblocks settings (for consistency)

    Step 1: Cut a hole in the bo.. wait wrong step, sorry :) Log in. Kill something, you get money and a message.
    Step 2: Create an NPC with your name.
    Step 3: Spawn a zombie and kill, if you have my zombie settings. You should get the money and a message (if you didn't get a message for some reason on this step, which you should, just hit /reload).
    Step 4: Log out, log in and kill again, this time no message should come, but you should get money.
    Step 5: Rename the NPC to something else
    Step 6: Kill and now you get a message again
    Step 7: Rename back to you, you still get message, log out log in, no message.

    Turns out having an NPC named after the person on the server, causes it to intercept the message. NPC seems to mimic a player's name/presence to some degree. Seems that otherblocks might not be able to tell the difference.

    Hope this helps :)

    Using Citizens 1.0.9d and 1.81 of your plugin.
  18. Offline

    Celtic Minstrel

    Well, considering that NPCs are players, that's not so surprising. (They're players controlled by the server, basically.)
  19. Offline



    Thanks heaps for the debugging. I should be able to fix this eventually - requires a bit of a rewrite in the player code.

    Currently it just saves your name then later asks the server for the player with that name. Hence if you've logged out the NPC will then be the first in the server list with that name. I should be able to rewrite the code to use a separate class that stores the player itself rather than the name.
  20. Offline

    Celtic Minstrel

    Actually, I don't believe that'll work. As I understand it, when you log out the player object is disposed of, meaning that if you store the player object and then log out and in (or die and respawn), there will be a new player object and the one stored will just be an orphan, no longer referenced by the internal mechanics of the server.

    I haven't really delved into it in great detail, so I could be wrong; I do know that people have said you can't rely on reference comparison to determine if two players are equal, though.
  21. Offline


    @Zarius: Since there is a difference in how NPCs are handled and players, maybe you can investigate how Herochat differentiates a player and NPC, since HC-code knows the difference between a player and an NPC; perhaps that could solve your problem, since message essentially pm's the player?

    Best of luck with this! I do look forward to some up to date documentation as well! I'd like to use your plugin a bit more completely - right now I'm half guessing with intuitive feel - with a bit of outdated examples... I feel I can do much more if I knew all the different possible ways it can be utilized - how to properly use a drop group, or know when to use -tool or -dropgroup. Please, take a breather after this and catch this up, I bet a lot of your loving followers are missing out on at least half of the awesome features!

  22. anyone else getting normal saplings from leaf-decay from redwood trees?

    im using this config:
            - drop: AIR
            - drop: SAPLING
              chance: 1
              world: world
            - drop: APPLE
              chance: 1
              world: world
            - drop: CREATURE_SPIDER
              chance: 0.5
              world: world
            - drop: GOLDEN_APPLE
              chance: 0.1
              world: world
  23. Offline


  24. Offline


    I'm loving the plugin! Wondering if we could get a reload command for it. That'd be extremely useful!
  25. Offline


    That reloads

    Found another small problem :)

    Remember the discussion we had about Regions not being honoured? Well I just discovered that if you specify a drop setting for any tile (that drops anything other than default) much like the last time. PERMISSIONS don't get honoured.

    I have a Visitors group which have NO build rights, no matter what. And that gets overridden if the block they destroy has any other drop other than default (and they have build rights in that region).

    I have a blanket build allow in the wilderness, so this means visitors could break leaves, and people's glass etc.

    Let me know if you need me to test an update :)

  26. Offline


    Generally wouldn't be a problem, as the player damages the creature just before it dies therefore the player object is allocated and then immediately checked in another function (onEntityDeath).

    You're right though, if there's a delay in the checking it could be dangerous.

    Yeah, the documentation needs some updating - more examples are welcomed :) Will work on the drop groups page later - been busy with work and kids.

    Yup, that config will drop normal saplings. Will work on code that drops the correct sapling if no datavalue if specified. For now the workaround is in the "leaf_overhaul" config module (it specifies a drop for each type of leafdecay).

    Looks ok - would be nice to have an easier way to do this, will think about it but not sure what we can do whilst still keeping it flexible.

    Are you using permissions or essentialsgroupbridge? Or superpermsbridge?
  27. Offline


    Does anyone know of a way to completely stop saplings from dropping from any and all trees?
  28. Offline


    Ok! I recently found this plugin, and I will not deny my eyes lit up like a child in a candy store hahaha :p I've been wanting to have a plugin like this for months, and only just now discovered it, to my glee.

    I spent all of last night (over 14 bloody hours!!!) configuring, and adding codes, and drops, and variables, and blah blah blah trying to create some very unique, diverse drop tables to excite and entice players to think outside of the box, etc etc.

    Well, I tossed the code into my config (globalconfig.yml or whatever), where it specifies. I basically copy and pasted other examples, as my code so I would not screw up. Yet, when I try to load it, I get nothing. No errors, no failed messages, just 'hooked into worldguard' that's it.

    After disabling all my custom material, etc etc, and reinstalling fresh, I turned on ONLY a default file, which lets you smelt gold ore with a pickaxe made of gold, etc etc, as a test. This time, it showed messages of the drop %'s and such in the background! So I logged in, created some ore and a gold pickaxe, and...! The blocks are invulnerable. I cannot break them with a goldpickaxe, yet any other pickaxe not specified, CAN break them normally.

    I've included my config below as I tried to use it (wall of bloody text, and still not done, I was just laying out the basics to have a foundation to work off of).

    We use the following plugins:
    Permissions 3.1.6
    iconomy 5.01
    commandbook 1.5.2
    and multiverse 1.7.2
    and the latest Otherblocks (aka 1.82)

    I disabled ALL plugins except permissions, and otherblocks, got 0 messages. Did the same with various combination, same results. I'm at my wits bloody end with this, argh! HELP ME! :p

    ...damn it. No idea how to make a spoiler tag. So just gonna try to upload the darn file. :p

    Please note this is an older version of the file, as I changed it, then deleted it, then changed it, and deleted it trying to fix all this... so not sure.

    Attached Files:

  29. Offline


    Sorry Zarius, my bad, forgot to say it. But I am sure I did mention in previous posts, I use Permissions 3.15(6 now I think)
  30. Offline


    There's a lot of yaml errors in there - you should have been getting errors when OtherBlocks starts up or reloads. There are messages missing a quotation mark at the end, spacing issues (ie. CREATURE_SPIDER starting with 9 spaces instead of 8), a line with "chance: 1: 1" that fails to parse, etc. Test the file out at http://yaml-online-parser.appspot.com/ and make sure there are no errors before trying it again.

    Thanks for the config though - that's a _huge_ overhaul :) I'm running through it because I think it can be written much more concisely (and I might make some plugin changes to make it easier) - will post an updated file soon.

    Hmm... I haven't tried Permissions 3 yet - just permissions 2, didn't think there'd be much of a difference.
  31. Offline


    When i download the plugin, will I have all the default drops in the configuration file already?? Because I only want to change a few drops.

    EDIT: Just realised what a stupid question this is. :p

Share This Page