[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

    Ah, yes - I've seen that. I much prefer seeing the proper percentage :)
     
  3. Offline

    nemanja

    Ok I want to set it so only a Miner and a Tunneler can get coal, so I've set it up like this:

    Code:
        COAL_ORE:
            - tool: ANY
            - drop: AIR
        COAL_ORE:
            - tool: ANY_PICKAXE
            - drop: COAL
            - chance: 100
            - quantity: 1
            - permissionsgroups: Miner, Tunneler
    But when I tested it, I could still get COAL with other classes. I tried switching COAL_ORE: with tool any and drop air with the miner/tunneler one, but then no class doesn't get any drop from coal_ore. I have Bukkit build 1149, and otherdrops 2.0 beta 3. I tested if something is wrong with number of spaces and all, but it's not. Thanks.

    EDIT: oh and i use PermissionsBukkit 1.2 if it's something there
     
  4. Where do i add the
    Code:
    od-fix_undroppables: yes
    how do i enable example files ?
     
  5. Offline

    Zarius

    Gotta be careful - your second COAL_ORE will override the first (or vice-versa, since the list is un-ordered). Also I'm looking to phase out permissionsgroups (it's not as flexible and I don't think it works with the new permissions plugins) - try this instead:

    Code:
        COAL_ORE:
            - drop: AIR
    
            - tool: ANY_PICKAXE
              drop: COAL
              permissions: [miner, tunneller]  # then add otherdrops.custom.tunneller or otherdrops.custom.miner to the groups
    
    Note: permissions doesn't seem to work out the moment, trying to get it working.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  6. Im not sure the help file is updated, how do i enable configs ?
     
  7. Offline

    Zarius

    Just remove the comment (#) sign from the line you want to enable, or add "-<filename>" to the "include-files:" section of "otherdrops-drops.yml".

    Beta4 Release (Download)

    Version 2.0-beta4 (2011/09/20)
    * fixed the entity drops issue (including money)
    * fix permissions
    * add ob-stop_mob_farms.yml (not yet working)
    * update help docs
    * remove the "location" debug message
    * add new aliases (let me know of any other common alternate names)
    Show Spoiler

    # format: ALIAS(OFFICIAL_BUKKIT_NAME)

    GLASS_PANE(THIN_GLASS),
    WOODEN_SPADE(WOOD_SPADE), WOODEN_AXE(WOOD_AXE), WOODEN_HOE(WOOD_HOE), WOODEN_PICKAXE(WOOD_PICKAXE), WOODEN_SWORD(WOOD_SWORD),
    WOODEN_PLATE(WOOD_PLATE), PLANK(WOOD), WOODEN_PLANK(WOOD), WOOD_DOOR(WOODEN_DOOR),
    STONE_PRESSUREPLATE(STONE_PLATE), WOOD_PRESSUREPLATE(WOOD_PLATE), WOODEN_PRESSUREPLATE(WOOD_PLATE),
    HANDS(AIR), HAND(AIR),
    TALL_GRASS(LONG_GRASS),
    DANDELION(YELLOW_FLOWER), ROSE(RED_ROSE), RED_FLOWER(RED_ROSE),
    MOSS_STONE(MOSSY_COBBLESTONE), MOSSY_COBBLE(MOSSY_COBBLESTONE),
    GUNPOWDER(SULPHUR), SULFUR(SULPHUR),
    TRAPDOOR(TRAP_DOOR),
    SLAB(STEP), DOUBLE_SLAB(DOUBLE_STEP),
    CRAFTING_TABLE(WORKBENCH),
    FARMLAND(SOIL),
    VINES(VINE),
    STONE_BRICK(SMOOTH_BRICK),

    * extra comments in fix_undroppables

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  8. Code:
    LOG:
        - tool: HANDS
          damageattacker: 1
          drop: LOG
          chance: 10
          message: "AAA-Ouch - that hurts."
    Code:
    2011-09-19 17:20:26 [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:172)
        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:164)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:135)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:823)
        at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:36)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:91)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
     
  9. Offline

    Celtic Minstrel

    You don't put a hyphen on every line; the hyphen indicates the start of one set of parameters, and then the next hyphen starts a new set. That's why it doesn't work; because of the drop: COAL there, you'll always get coal even if you break it with your hands.

    Permissions groups are not really recommended; however, in order for them to work, you need to give the permission 'group.Miner' to the Miner class, and then remove that permission from any group that directly inherits from the Miner group. The same goes for Tunneler. Also, when you have multiple items, you need to put them in [square brackets]; that config actually states you must be in the "Miner, Tunneler" group, I believe.

    A better way would be to use "permissions: coal", and then give both Miners and Tunnelers the permission 'otherdrops.custom.coal'.

    Actually, you need the space after the hyphen, so "- <filename>".
     
    nemanja likes this.
  10. Offline

    nemanja

    that works! Thank you so much! Spent hours trying to figure out whats wrong... But I understand now where I was wrong and why. Thanks again ^_^

    EDIT: and to Zarius, that you too for helping, although your suggestion caused so no class drops no ore. Thanks for helping though ^_^
     
  11. Offline

    AndyFox42

    I have updated to the new beta 4, but still no worky for me :(

    Code:
    13:08:02 [SEVERE] Could not pass event ENTITY_DEATH to OtherDrops
    java.lang.NullPointerException
    at com.gmail.zariust.otherdrops.drop.MoneyDrop.performDrop(MoneyDrop.java:64)
    at com.gmail.zariust.otherdrops.drop.DropType.drop(DropType.java:75)
    at com.gmail.zariust.otherdrops.event.SimpleDropEvent.run(SimpleDropEvent.java:293)
    at com.gmail.zariust.otherdrops.event.CustomDropEvent.perform(CustomDropEvent.java:506)
    at com.gmail.zariust.otherdrops.OtherDrops.performDrop(OtherDrops.java:352)
    at com.gmail.zariust.otherdrops.listener.OdEntityListener.onEntityDeath(OdEntityListener.java:110)
    at org.bukkit.plugin.java.JavaPluginLoader$61.execute(JavaPluginLoader.java:670)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.EntitySkeleton.a(EntitySkeleton.java:116)
    at net.minecraft.server.EntityLiving.die(EntityLiving.java:514)
    at net.minecraft.server.EntitySkeleton.die(EntitySkeleton.java:34)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:455)
    at net.minecraft.server.EntityMonster.damageEntity(EntityMonster.java:44)
    at net.minecraft.server.EntitySkeleton.damageEntity(EntitySkeleton.java:30)
    at net.minecraft.server.EntityHuman.d(EntityHuman.java:720)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:905)
    at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:91)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
     
  12. Offline

    RugRats

    @Zarius if you could please fix the TNT issue... I'd be very happy. It is confirmed this plugin because I have tested it with just WorldGuard and OtherDrops on build 1149.
     
  13. Offline

    Celtic Minstrel

    What's the TNT issue?
     
  14. Offline

    RugRats

    If I have TNT disabled in WorldGuards config otherdrops overrides it and makes it work anyways.
     
  15. Offline

    Zarius

    For some reason it's not hooking into your iConomy plugin :/ I tested your config here and works fine - think I'm running iCo5 though so I'll see if there's a problem with using iCo6.

    From the way you had written your config I assume that is what you wanted :D If you wanted an _additional_ coal for those groups you use:

    Code:
        COAL_ORE:
            - drop: DEFAULT  # drop whatever would normally drop
    
            - tool: ANY_PICKAXE
              drop: COAL          # then give an extra coal to just the miner/tunneller groups
              permissions: [miner, tunneller]  # add otherdrops.custom.tunneller or otherdrops.custom.miner to the groups
    
    Not sure why you got that error but it's on PLAYER_INTERACT and not BLOCK_BREAK so wont stop your config from working. I did notice however that tools don't accept the new aliases (ie. hands) - this will be fixed in next build. Also you probably want to put drop: NOTHING in there first, eg.

    Code:
         LOG:
          - tool: HANDS
            drop: NOTHING  # stop the default drop from occurring for hands
          - tool: HANDS
            damageattacker: 1
            drop: LOG
            chance: 10
            message: "AAA-Ouch - that hurts."
    
    Yes, will look into this soon.

    @RugRats - TNT issue fixed in next version (pre-release with TNT fix here)

    @AndyFox42

    Confirmed bug: iconomy6 isn't loading for some reason. Version 5 works fine, will try and fix issues with version 6 tonight.

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

    AndyFox42

    Cool, thanks for all your help tracking down this bug. I love your plugin, and I can't wait to have it upand running again. It's one of the things that make my server unique, and the players can't wait to have it back.
     
  17. Offline

    Celtic Minstrel

    @RugRats – I realize Zarius says he already fixed it, but it seems odd that TNT would have ignored the WorldGuard permissions; what was the config that caused the bug? I don't see it posted in the last two pages, though I might have missed it.
     
  18. Offline

    RugRats

    There wasn't any config. OtherDrops with no configed drops/ or with drops (in my case no drops affecting tnt) overrides WorldGuard tnt-blocked=true config setting.
     
  19. Offline

    nemanja

    Ok question number 2, lol. What is the code for shearing if there is one? So I can limit what players get when they shear sheep.
     
  20. Offline

    Celtic Minstrel

    So what you're saying is that if you had OtherDrops with no drops defined, and WorldGuard with TNT enabled, you could light the TNT on fire and it would explode.

    ...actually, I can see now how that could happen, since WorldGuard would probably be catching the explosion event just like OtherDrops is.

    @nemanja – Depends whether you mean the effect or the action. This code segment will approximately replicate default behaviour (it'll always drop white wool rather than the colour of the sheep):
    Code:
      SHEEP@UNSHEARED:
        - action: RIGHT_CLICK    # this is a drop that occurs when right-clicking the sheep, not when killing it
          tool: SHEARS           # drop only occurs if the player is using shears
          event: SHEAR           # sheep loses its wool
          drop: WOOL
          quantity: 1-3
    If you can tweak that to fulfill your need, perfect. If you have further questions, go ahead and ask.
     
  21. Offline

    RugRats

    with TNT disabled in the worldguard config otherDrops makes it work yes.
     
  22. Offline

    Celtic Minstrel

    I was asking in case it was a hint of some deeper issue, which fortunately doesn't seem to be the case. :)
     
  23. Offline

    slimpyman

    in the help file it says you are to use the "ANY" for tools but in all the examples, i see "ALL"... hmm. btw, i changed the grass drops to "ROTTEN_FLESH" and im not really getting anything but occasional seeds. using 1150 1.8.1

    by the way, whos maintaining this plugin at the moment? zarius? or is it you celtic?
     
  24. Offline

    Zarius

    In regards to the TNT it was a simple one-liner "if (event.isCancelled()) return;" - didn't get a chance to commit it to the repository before I had to head off to work.

    I'm thinking about making a data value of @THIS so we could use WOOL@THIS and it would drop the same colour wool as the sheep.

    ANY and ALL are the same - they just mean any tool can be used. Grass or tall grass? Can you post the config you used? Something like this?

    Code:
      TALL_GRASS:  # or GRASS  for the grass block
        - drop: ROTTEN_FLESH  # don't need "tool: ALL" line as it's the default
    
     
  25. Offline

    slimpyman

    dye@brown is cocoa beans? btw, you support this mod right? im wondering who i donate a few of my minimum wage dollars too :)
     
  26. Offline

    Celtic Minstrel

    Heh, I was thinking the same thing. I think however it's tricky enough that we shouldn't work on it until after 2.0 is out.
     
  27. Offline

    TheMap

    Worlds do not seem to be working properly, the .yml world specific drops seem to override all the drops in every world. For example I have 8 worlds, 2 of which are not supposed to drop anything. But all 8 worlds do not drop anything.
    Part of my config for one world.

    Code:
    defaults:
        - biomes: ALL
          worlds: HAVEN
          # time:
          # weather:
          # permissiongroup:
          # permissiongroupexcept:
    
    otherblocks:
    
        STONE:
            - tool: ANY
              drop: AIR
              chance: 100
    
        DIRT:
            - tool: ANY
              drop: AIR
              chance: 100
        WOOD:
            - tool: ANY
              drop: AIR
              chance: 100
    
     
  28. Offline

    Celtic Minstrel

    Remove the hyphen in the defaults section.
     
  29. Offline

    TheMap

    I don't think it was the hyphen as it worked before 1.8. I did remove it but it did nothing to solve the issue of every world now adopts "Haven" as the drop defaults which is not to drop anything on break.

    Here is another error that seems strange because in my config I have;
    # 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

    # Set this to false if you are having problems with permissions
    usepermissions: true

    And Im getting this in console.

    Code:
    04:47:48 [INFO] [OtherDrops:2.0-beta4] Permissions not enabled in config.
    04:47:48 [INFO] [OtherDrops:2.0-beta4] Using Bukkit superperms.
    04:47:48 [INFO] [OtherDrops:2.0-beta4] OtherDrops loaded.
    
     
  30. Offline

    bubblybill

    Got a little money drop problem
    2011-09-20 09:58:58 [INFO] [OtherDrops:2.0-beta4] PerformDrop - potential drops found: [BREAK on CREATURE_SPIDER, BREAK on CREATURE_SPIDER] tool: PLAYER@Bubblybill with DIAMOND_SWORD@499
    2011-09-20 09:58:58 [INFO] [OtherDrops:2.0-beta4] PerformDrop: dropping [email protected]
    2011-09-20 09:58:58 [SEVERE] Could not pass event ENTITY_DEATH to OtherDrops
    java.lang.NullPointerException
    at com.gmail.zariust.otherdrops.drop.MoneyDrop.performDrop(MoneyDrop.java:64)
    at com.gmail.zariust.otherdrops.drop.DropType.drop(DropType.java:75)
    at com.gmail.zariust.otherdrops.event.SimpleDropEvent.run(SimpleDropEvent.java:293)
    at com.gmail.zariust.otherdrops.event.CustomDropEvent.perform(CustomDropEvent.java:506)
    at com.gmail.zariust.otherdrops.OtherDrops.performDrop(OtherDrops.java:352)
    at com.gmail.zariust.otherdrops.listener.OdEntityListener.onEntityDeath(OdEntityListener.java:110)
    at org.bukkit.plugin.java.JavaPluginLoader$61.execute(JavaPluginLoader.java:670)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.EntityLiving.a(EntityLiving.java:534)
    at net.minecraft.server.EntityLiving.die(EntityLiving.java:514)
    at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:455)
    at net.minecraft.server.EntityMonster.damageEntity(EntityMonster.java:44)
    at net.minecraft.server.EntityHuman.d(EntityHuman.java:720)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:905)
    at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:91)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    its not crashing just not dropping money and the above is in the server log
    1.8.1 mc
    1153 craftbukkit build
    the config for the money drop is
    otherdrops:
    CREATURE_SPIDER:
    - tool: ANY
    drop : MONEY
    quantity: 1-3
    message: For services to the kingdom the King grants you, %q
    Oh iconomy 6
     
  31. Offline

    Zarius

    @bubblybill

    Yeah, sorry about that - I know about the iConomy 6 issue and trying to work it out at the moment.
     

Share This Page