[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

    I've updated the pre-release to v4. By default mob arena drops are false, but I added this option:

    Code:
      SKELETON:
        - drop: DIAMOND
          dropinmobarena: true
    
    @Joy - will this work for you?
     
  3. Offline

    Celtic Minstrel

    I don't much like that. <_< Unless it's intended to be temporary.
     
  4. Offline

    RugRats

    It's not unfortunately :(
     
  5. Offline

    Celtic Minstrel

  6. Offline

    Zarius

    Well it's still only a pre-release, I'm happy to change it. Other options are add a single override in the config yml file or ignore any custom drops in the arena and leave that functionality for mob arena to implement.

    Thoughts?
     
  7. Offline

    Celtic Minstrel

    Not sure... some possibilities would include somehow tossing it into the "regions" condition, adding a new pluggable "flags" condition and asking MobArena to support it (less reliable, but if MobArena doesn't support it you could still make a "sample" bridge plugin for the functionality), a single global option (less flexible but also less verbose), pluggable conditions (a major undertaking)... any other ideas? (Also I'm not sure what your second idea above even is.)
     
  8. Offline

    Zarius

    I like the idea of pluggable conditions (I'd considered in the past allowing other plugins to add conditions via an API).

    Adding it into the regions condition or single global option still has the same problem of starting the slippery slope of burdening this plugin with support for too many others.

    My second idea above was that we leave it as per pre-release 3 (mobarena mobs are simply ignored) and the MobArena plugin could be requested to add custom drops to mobarena creatures (though this lacks the flexibility of OtherDrops configs).
     
  9. Offline

    Celtic Minstrel

    Yeah, that idea's not a good one. I suppose then we'll have to design an API for pluggable conditions. I'll give this some thought and get back too you (probably in the PM); if you have any thoughts of your own let me know.
     
  10. Offline

    Weltall 7

    Is it possible to set the drops when a block is burned (e.g. drop charcoal when a log is burned)? If not, could you add it in 2.0?
     
  11. Offline

    Zarius

    Most likely possible but the drop would just get burnt up.
     
  12. My configuration is right, and everything seems to be working except apples, any chance of a patch for this?
     
  13. Offline

    Robert Pendell

    Apples work for me. Can you post your config so we can see?
     
  14. Offline

    nathanaelps

    I've been thinking about this, as well, and (in my mind) would require a few steps, probably outside the scope of OB: When wood/log/stair burns, it turns into wool:black. When wool:black is harvested (with axe, pick), it drops charcoal. This would mean that I'd have to remove all black sheep (or just let them drop charcoal :D) and I'd have to subvert the recipe for making black wool (use coal instead of an ink sac to make black wool. Ink sac makes dark gray?), but... Dang, that'd be *sooo awesome*. If OB can't handle it, MAYBE SOMEBODY SHOULD WRITE IT AS A PLUGIN.

    But don't look at me... It's somebody else's responsibility! (I don't want it badly enough to learn Java.)

    EDIT: I just saw that there's a config param: replacementblock. I may need to play with that.
     
  15. Offline

    Rofang

    Too bad there isn't a simple plugin to prevent items from burning up under certain conditions, because that's really your only obstacle, isn't it? Alternately, there's this plugin.
     
  16. Offline

    nathanaelps

    Oh, also, I see on the wiki that the permissiongroups config parameter is for Permissions v2.x, and not for Superperms or for Permissions v3.x Is this accurate? If so, will/when will this be updated?

    Addendum number 2. And a half:

    I note that at the top of ob-fix_undroppables.yml that there's a little section:

    Code:
    defaults:
        - biomes: ALL
          worlds: worldname
    
    This doesn't seem to do anything. Is it not implemented? (yet?) Do I have some sort of spelling mistake? Or am I just an idiot who overlooked something obvious?

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

    I dont know if this is the correct place to post it, but i am using PreciousStones to protect some areas, and apparantly it cant protect blocks which drops have been modified by OtherBlocks. I mean anyone is able to destroy them and get the corresponding drop.

    I am using OB 1.95 and CB1060 and latest Precious Stones
     
  18. Offline

    Celtic Minstrel

    With superperms in 2.0, permissionsgroups will check if the player has the permission group.<group-name>; this is the same way WorldEdit and WorldGuard handle groups with superperms.
     
  19. Offline

    Zarius

    What exactly is the problem with apples? You can't drop apples from any block at all or only from leaves? Please post your config and version of OtherBlocks used.


    Hmm... could be possible to make "special" black wool that drops coal. If I recall correctly you can set wool to it's color+16 and it still shows the same color but has a different data value so you would configure that to drop charcoal. Again, this is just speculation and not tested.

    Got a lot on my plate at the moment trying to get 2.0 out but drops from fire is on the todo list for after that :)


    Try placing the priority for OtherBlocks to "highest"? This might allow it to work properly.

    Should be working ok in 1.95 unless I broke it :/ Will try and test it out later.
     
  20. Offline

    DontMakeWaves

    I would like to make it so, when a creeper explodes , another one spawns in it's place; that way, players have to kill creepers to get rid of them. Is there a way to do this with "otherblocks"?
     
  21. Offline

    Legolas75893

    This is probably the best idea I've heard on this thread since you posted the thread.
     
  22. Offline

    Zarius

    Not in OtherBlocks, but perhaps in version 2 (now named OtherDrops) - don't know if it works yet but I do want this feature (ie. configurable drop/event on creeper explosion).

    Best among many great ideas I hope ;)

    @Legolas75893

    I tested my theory, unfortunately if you drop wool with value 45 it resets back down to 13 :( So seems there's no way to tag a block with a special data value (apart from tracking the blocks in your own list which is a lot more work).

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

    Weltall 7

    I'd really like to test 2.0, but it already gives an error while loading the drops file:

    Code:
    2011-09-03 17:29:22 [INFO] [OtherDrops:2.0-prerelease4] Loaded global config (plugins\OtherDrops\otherdrops-config.yml), keys found: [verbosity, priority, usepermissions, enableblockto, rootconfig, events] (verbosity=5)
    2011-09-03 17:29:22 [INFO] [OtherDrops:2.0-prerelease4] Loading file: otherdrops-drops.yml
    2011-09-03 17:29:22 [SEVERE] Error occurred while enabling OtherDrops v2.0-prerelease4 (Is it up to date?): null
    java.lang.NullPointerException
    	at com.gmail.zariust.otherdrops.subject.ToolAgent.isEqual(ToolAgent.java:42)
    	at com.gmail.zariust.otherdrops.subject.ToolAgent.equals(ToolAgent.java:54)
    	at java.util.HashMap.put(Unknown Source)
    	at com.gmail.zariust.otherdrops.OtherDropsConfig.parseAgentFrom(OtherDropsConfig.java:589)
    	at com.gmail.zariust.otherdrops.OtherDropsConfig.loadConditions(OtherDropsConfig.java:294)
    	at com.gmail.zariust.otherdrops.OtherDropsConfig.loadBlockDrops(OtherDropsConfig.java:280)
    	at com.gmail.zariust.otherdrops.OtherDropsConfig.loadDropsFile(OtherDropsConfig.java:260)
    	at com.gmail.zariust.otherdrops.OtherDropsConfig.loadConfig(OtherDropsConfig.java:177)
    	at com.gmail.zariust.otherdrops.OtherDropsConfig.load(OtherDropsConfig.java:117)
    	at com.gmail.zariust.otherdrops.OtherDrops.onEnable(OtherDrops.java:215)
    I use my own config & none of the includes.
    beginning of config (tell me if you need more):
    Show Spoiler
    Code:
    include-files:
    aliases:
    defaults:
    otherdrops:
        STONE: #1
            - tool: ANY_PICKAXE
              toolexcept: GOLD_PICKAXE
              drop: COBBLESTONE
            - tool: GOLD_PICKAXE
              drop: STONE
            - tool: ANY_PICKAXE
              drop: DIAMOND
              chance: 0.1
              message: "Du hast einen Diamanten gefunden!"
            - dropgroup: coal
              tool: ANY_PICKAXE
              drops:
                - drop: COAL
                  quantity: 1-2
                - drop: GRAVEL
              chance: 5
              exclusive: 1
            - drop: BONE
              chance: 1
            - tool: ANY_PICKAXE
              drop: GRAVEL
              chance: 10
              exclusive: 2
            - tool: ANY_PICKAXE
              drop: IRON_ORE
              chance: 2
              exclusive: 3
            - tool: ANY_PICKAXE
              drop: GOLD_ORE
              chance: 0.5
              exclusive: 4
     
     
  24. Offline

    Celtic Minstrel

    How did you test it, and at what stage did it reset?
     
  25. Offline

    Legolas75893

    I don't care about it having a special damage code, I'm fine with normal black wool. But can you make it so that certain events can replace blocks? Like the tree burning one(actually a good idea)
     
  26. Offline

    TheMap

    What is the ETA on superpermbridge? Im anxiously awaiting it so I can open my new server.
     
  27. Offline

    nathanaelps

    Isn't this very much like what the config param replacementblock does?
     
  28. Offline

    Legolas75893

    Does replacementblock work when a block is burned?
     
  29. Offline

    nathanaelps

    I'm probably missing something obvious, but I'm not getting it to work. I've tried everything I can think of... I do have userpermissions: false right now... Would this *maybe* have something to do with it? Is there anything that should show up in the console log when I /obr that I could use as reference?

    Oh, right. Not last I checked. Not because replacementblock doesn't work, but because there wasn't a way to check for a burning block.

    I *knew* this was looking too easy. :D

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

    Zarius

    Code:
      SAND:
          - drop: NOTHING
            replacementblock: WOOL@45
    
      WOOL@45:
          - drop: COBBLESTONE
    
      WOOL@13:
          - drop: APPLE
    
    It seems that 45 gets translated to 13 as soon as the data is set because you'll always get an apple from the resultant wool block. I was hoping to use higher wool colour values like the leaves where they set the "decay" data bit.

    That config works fine but looks like the "toolexcept: GOLD_PICKAXE" bit isn't working, I'll look into this. Removing the toolexcept line gets rid of the error and the other stuff should work except dropgroups (aren't working properly yet). I added both these bugs to the todo list.

    I should be able to get it into the 2.0 pre-release in a few days (it might already work, we're just working on cleaning up the permissions system).

    @Legolas75893 & @nathanaelps correct: there is already "replacementblock" however this only triggers on blockbreak & entitydeath events - haven't tapped into the blockburn event yet but it's doable.
     
    nathanaelps and Legolas75893 like this.
  31. @Zarius
    Excellent plugin! this will replace StairsDrop, MobLoot and AppleTree for me. But i do have two problems with it.

    1. When i specify a block in config, such as wood, dirt, sand, glass it will bypass Towny protections, on all priority settings. How can i fix this?

    2. When using PLAYER, how do i specify death by specific creature, say a zombie?
     

Share This Page