[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)
        [email protected]:
          - drop: APPLE
            chance: 5%
        [email protected]:
          - drop: [email protected]
            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

    Skirmisher

    Hi Zarius! Remember me? :p
    You've got quite the feature load in this plugin, lol.
    What's with the name change? And is there any plan on BigBrother support? (Just asking ;))
     
  3. Offline

    Zarius

    I'll take a look at that tonight - you're running 2.0-beta1 I assume?

    Definitely plenty of features - the trick is making them easy to use and documenting it all :D

    The name change is to better reflect the purpose of the plugin - customising drops, not blocks :) I'd been thinking about it for a while and thought that version 2.0 was a good time to do it.

    BigBrother support has been in for a while now - should be working fine in 1.96 or 2.0-beta1, let me know if there are any issues.

    I'd just assumed that defaults was broken and was going to try and fix it :D @Celtic Minstrel - perhaps we should allow the dash to be used too, I might look into that tonight (in a few hours) if you don't beat me to it :)

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

    kahlilnc

    Yeah I am
     
  5. Offline

    Celtic Minstrel

    They should drop what they had unless you explicitly specify drop: NOTHING with a chance of 100; however, everything that is not a player also doesn't drop their default drops if there are any drops defined with a chance of 100, so perhaps the special case for players got lost.
    Well yes, that's what I also assumed when I was trying to get my wool config to work. :p And then I showed the config to krinsdeath, and he drew my attention to the hyphen, and I did a double-take and thought "That's not supposed to be there!"
    Personally, I don't think it's worth it; however, if you want to, it would basically be [if defaultsNode is null, then try getNodeList("defaults") and if it is not null and non-empty, get the first element of the list and assign it to defaultsNode]. Obviously that's just pseudo-code.
     
  6. Offline

    kahlilnc

    I don't have drop: NOTHING
    Here is my config.
    http://pastiebin.com/?page=p&id=4e6e8d404c34c
    I am using the 2.0 beta thing as well. D:
    Here is my error everytime I kill a player.
    Code:
    2011-09-13 08:31:08 [SEVERE] Could not pass event PLAYER_INTERACT to OtherDrops
    java.lang.NullPointerException
        at com.gmail.zariust.otherdrops.subject.BlockTarget.<init>(BlockTarget.java:42)
        at com.gmail.zariust.otherdrops.event.OccurredDropEvent.<init>(OccurredDropEvent.java:164)
        at com.gmail.zariust.otherdrops.listener.OdPlayerListener.onPlayerInteract(OdPlayerListener.java:40)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:314)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:139)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:805)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:128)
        at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:35)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:478)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  7. Offline

    XXXtheGreat

    I seem to get spammed by error messages every time someone breaks a block, and it doesn't change on low verbosity. It says something about Spout and BigBrother, so, are there any compatibility issues with those?
     
  8. Offline

    Zarius

    Can you please post the exact error message?
     
  9. Offline

    XXXtheGreat

    Yeah, I was trying to be lazy and not have to type it out. XD
    ...Aaaaand I just found out how to copy from CMD. That's embarrassing.

    Code:
    05:51:46 [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.ja
    va:277)
            at com.gmail.zariust.otherdrops.OtherDrops.performDrop(OtherDrops.java:3
    15)
            at com.gmail.zariust.otherdrops.listener.OdBlockListener.onBlockBreak(Od
    BlockListener.java:85)
            at org.bukkit.plugin.java.JavaPluginLoader$37.execute(JavaPluginLoader.j
    ava:497)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:157
    )
            at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:121
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:481)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :140)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :478)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  10. Offline

    Celtic Minstrel

    Ah, it's trying to log to BigBrother and failing for some obscure reason. As a last resort, uninstalling BigBrother would fix it. Maybe Zarius can come up with some less extreme suggestions though.
     
  11. Offline

    Zarius

    The spout part is irrelevant as it's just saying that spout initiated the event (which is normal).

    This looks like a version issue - which version of BigBrother are you running? It's either an older version and needs upgrading or you're using the newest version and I need to update the BigBrother support.
     
  12. Offline

    TheMap

    Otherdrops is interfering with region control and worldguard. If I set an area so that no one can build there they can still break blocks and they usually respawn and receive a message "you cannot build here" but the blocks are not respawning anymore since 2.0.

    So people can now break blocks in non build regions.

    I would also like to note that this did not happen with previous versions of OtherBlocks/Drops
     
  13. Offline

    Zarius

    Doh... I feel so stupid now. Found the problem - it was a one line bug introduced in version 1.9 or so and carried over to 2.0. I fixed the bug in 1.96 but didn't fix the 2.0 version (didn't realise the same bug was in there - doh).

    Please download beta2 when it's uploaded for a fix.

    For now I've made players always drop their inventory (even if drop: NOTHING is set) until we find a way to get drop: NOTHING to work.

    The zombies/money issue was because you have a PLAYER: block twice in your config - once at the top and again at the bottom. The bottom one overrides the top so you end up only getting money. You need something like this:

    Code:
      PLAYER:
        - tool: ALL
          drop: CREATURE_ZOMBIE
        - drop: [email protected]
    
    Note to all: you cannot repeat the same block in the same file or the second block will override the first - nothing I can do about it. Blocks with the same name can exist in separate files and should add together fine.

    2.0 beta 2 released - see top post.

    * fix worldguard bug (not respecting build rights), fix player drops, od-dyewool module, other minor bugfixes

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

    Rofang

    If I want to get a leg up on OtherDrops for 1.8, should these Bukkit item names apply verbatim to OD eventually?

    New item names (open)

    MONSTER_EGGS
    SMOOTH_BRICK
    HUGE_MUSHROOM_1
    HUGE_MUSHROOM_2
    IRON_FENCE
    THIN_GLASS
    MELON_BLOCK
    PUMPKIN_STEM
    MELON_STEM
    VINE
    FENCE_GATE
    BRICK_STAIRS
    SMOOTH_STAIRS
    MELON
    PUMPKIN_SEEDS
    MELON_SEEDS
    RAW_BEEF
    COOKED_BEEF
    RAW_CHICKEN
    COOKED_CHICKEN
    ROTTEN_FLESH
    ENDER_PEARL
     
  15. Offline

    Zarius

    Yup :) I've also updated the dev.bukkit pages - see blocks and items.
     
  16. Offline

    Rofang

    Cool, thanks. And CREATURE_SILVERFISH and CREATURE_ENDERMAN?
     
  17. Offline

    Zarius

    I didn't see them in the bukkit docs yet but feel free to try it out.
     
  18. Offline

    Rofang

    Oh, yeah, I just made those up. I'll try them after a recommended build comes out.
     
  19. Offline

    Celtic Minstrel

    Those won't work in the present build since the CreatureType enum has not yet been updated. :(

    I suspect we will need a special case to block silverfish from dropping from MONSTER_EGGS, if someone wants to do that for some reason.
     
  20. Offline

    Rofang

    Not that I remotely know what I'm talking about, but does this page provide some clue about the Bukkit team's use of the terms Silverfish and Enderman? And ExperienceOrb?

    Also, why a special case for MONSTER_EGGS (which I assume is the silverfish stone)? Wouldn't a standard OD override work on that block?

    Edit: Also wondering how an Enderman's carried block is stored in-game and whether it's anything that OD would touch on. Because, man, something needs to be done about Enderman dying and taking your chest with it. If not via OD, then some other plugin.
     
  21. Offline

    Zarius

    Yup, that looks like the right page but if you click on "enumerations" in the top right you'll see that Silverfish and Enderman haven't been added to the CreatureTypes.

    Yeah, I agree that Enderman should drop whatever they're carrying - will look into that (if it's possible - probably with drop: CONTENTS) when I start running on 1.8 more (done a little testing with 1.8 - seems ok so far).
     
  22. Offline

    Celtic Minstrel

    I'm not entirely sure; you might be right. It's the first block that drops anything other than an item in vanilla Minecraft, though. I think the issue could occur if you want to cancel the silverfish spawn but make it drop something else instead.

    I'm not sure how it's stored in-game, and the API for managing that isn't yet in Bukkit. I'm also not sure whether they store the block only or also its contents (ie the contents of your chest may be lost as soon as they pick it up, or it may be stored until they put it back down). Once the CreatureType enum is updated I'll likely do some testing to see which is the case.
     
  23. Offline

    Rofang

    Just to kill some time speculating because I don't have much else to do right this moment... Several people report that they take chests, but one person here (edit: also another here) claims the items all drop as soon as the chest is picked up. That does seem like a Mojang thing to do rather than try to make the Endermen remember everything in the container.

    Point taken about the uniqueness of the silverfish block.
     
  24. Offline

    Zarius

    I would expect that it would work the same as we have now - if you customise a drop it cancels the block_break event therefore no silverfish spawn. Of course this is only how it _should_ work, we'll see after testing :)
     
  25. Offline

    Celtic Minstrel

    As I said, I'm not sure. :)
     
  26. Offline

    Rofang

    I didn't see this question answered in the documentation: When using the shortcuts for specifying drop, quantity, and percentage (i.e. STONE/1-3/100%), can I leave off the percentage if it's 100% (i.e. STONE/1-3), or does the shortcut functionality always expect a trio of values? (I'd test it myself, but my server's offline until the next rb).
     
  27. Offline

    nathanaelps

    Mm. So, I guess this counts as a 'bug report', but it's the kind of bug that you don't even really notice until it bites you. It's a mosquito report. Yeah. The 'defaults:' section has the hyphen in the od-fix_undroppables.yml file that downloaded with OtherDrops. IDK right off if it's wrong in any of the other files.
     
  28. Offline

    Celtic Minstrel

    @Rofang – I think it might always expect the trio, actually, but if so that's a bug; it should work with just two values, either STONE/1-3 or STONE/30% or even STONE/30%/1-3.

    EDIT: A quick look at the source code reveals that what I described does seem to be how it works.

    @nathanaelps – Thanks for noticing, I've fixed them.
     
    Rofang likes this.
  29. Offline

    Zarius

    Is this evil? :D

    Code:
      STONE:
        - world: adventure
          drop: CREATURE_SILVERFISH
          chance: 0.1
    
    (works fine)
     
  30. Offline

    Celtic Minstrel

    Right, because now the enum has been updated. :D
     
  31. Offline

    R4Z0R49

    Hi guys,

    Anyway to get exp orbs to also give/take coins/money?
     

Share This Page