[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

    ClearTranquil

    Thanks a lot :)
     
  3. Offline

    Zarius

    Cool - glad it's working for you :) I'm thinking of renaming the usepermissions option to "use_otherblocksactive_permission" and making it affect the otherblocks.active permission only - or even removing it entirely. There's no reason to disable the "permissiongroup" option - this should always work no matter the usepermissions settings - will fix that.
     
  4. Offline

    m5k

    Do as you wish. By the way, our server will be running a 450+ line config file :D
    Oh, one last question. How do I correctly set up multiple drops for one entity. I currently have this:
    Show Spoiler
    Code:
         CREATURE_SLIME:
         - tool: ANY
           drop: LEATHER_HELMET
           chance: 5
           permissiongroup: Hunter
    
         - tool: ANY
           drop: LEATHER_CHESTPLATE
           chance: 5
           permissiongroup: Hunter
    
         - tool: ANY
           drop: LEATHER_BOOTS
           chance: 5
           permissiongroup: Hunter
    
         - tool: ANY
           drop: LEATHER_LEGGINGS
           chance: 5
           permissiongroup: Hunter
    
         - tool: ANY
           drop: IRON_HELMET
           chance: 5
           permissiongroup: Hunter
    
         - tool: ANY
           drop: IRON_CHESTPLATE
           chance: 5
           permissiongroup: Hunter
    
         - tool: ANY
           drop: IRON_BOOTS
           chance: 5
           permissiongroup: Hunter
    
         - tool: ANY
           drop: IRON_LEGGINGS
           chance: 5
           permissiongroup: Hunter
    

    Haven't tested it yet though, not sure if it will work.

    EDIT: Tested, works with this format.

    By the way, is it possible to disable configured item drops if you're killed by a non-player? I have this set up:
    Code:
         PLAYERGROUP@Fox:
         - tool: ANY
           drop: DEAD_BUSH
           quantity: 2
           permissiongroupexcept: [Fox, Slayer, DarkArcher, Thief, Tunneler]
    
    These groups are "the bad guys" of the server and the dead bush is sort of a pvp token (you exchange it for epic items like chainmail through npcs). Now as you can see, they can't get the bonus by killing each other, however if they're killed by anything but the defined groups they still drop the dead bush. Even if they write /kill, fall down, or get shot by a skeleton. Is there any way to make them drop it only when killed by the assigned groups?

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

    Zarius

    That's a very creative use of the plugin :)

    For the moment you can use tool: [ANY_SWORD, BOW, ARROW] or a list of objects you want to include but then if you didn't include say "APPLE" they wont drop the item if killed by a player with an apple. Could also try toolexcept: [DAMAGE_FIRE, DAMAGE_FALL, etc with all "damage" values from the Material and Creatures list]. I would like to add a DAMAGE_PLAYER_ATTACK option eventually.
     
  6. Offline

    m5k

    Thanks, will use that for now.
     
  7. Offline

    Zarius

    You're still awake? :) Don't know if I made it clear but I recommend the toolexcept option.
     
  8. hey, i want my crops to somehow drop 1 random dye, how do i do this?
     
  9. Offline

    Zarius

    Random color drops aren't yet possible but are definitely on the todo list. Got a couple of big changes first which I hope will make configuration more flexible.
     
  10. Offline

    Celtic Minstrel

    Ranges aren't possible, then?
     
  11. Offline

    Zarius

    Unfortunately not for the drop's color value. They are currently read only for the block value (eg. CROPS@RANGE-1-6 drop: etc) if that makes sense.
     
  12. Offline

    Butterquark

    Thanks, that seems to work. As in there are no errors. I'll test it next time I'm in game.
     
  13. Offline

    Celtic Minstrel

    According to the post just above yours, it won't work. On the other hand, it'll probably work in a future version even if it doesn't now.
     
  14. Offline

    Zarius

    Nope, that should work - the example butterquark posted doesn't look like he's going for random dye - just brown (cocoa).
     
  15. I dont think stuff can drop CREATURE_CREEPER@POWERED :(

    i get this on startup:

    Code:
    2011-07-05 13:36:40 [SEVERE] java.lang.IllegalArgumentException: No enum const class org.bukkit.entity.CreatureType.CREEPER@POWERED
    2011-07-05 13:36:40 [SEVERE]     at java.lang.Enum.valueOf(Enum.java:196)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.entity.CreatureType.valueOf(CreatureType.java:7)
    2011-07-05 13:36:40 [SEVERE]     at com.sargant.bukkit.otherblocks.OtherBlocks.loadConfig(OtherBlocks.java:405)
    2011-07-05 13:36:40 [SEVERE]     at com.sargant.bukkit.otherblocks.OtherBlocks.onEnable(OtherBlocks.java:581)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:857)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:358)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:281)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    2011-07-05 13:36:40 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:290)
    2011-07-05 13:36:40 [SEVERE]     at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:480)
    2011-07-05 13:36:40 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:465)
    2011-07-05 13:36:40 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    2011-07-05 13:36:40 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  16. Offline

    Celtic Minstrel

    Well, if he used what was posted rather than the note below it, yes.

    @po5 – Presumably not supported yet.
     
  17. Offline

    Zarius

    Should be fine but drop doesn't support object@data yet. You need to use drop: object and color: data - does that make sense? I'm working on a fix that should allow drop data to be specified the same way as the original object (as per your example above).
     
  18. Offline

    !Phoenix!

    In your examples in the config.sample.yml you use "PIG@SADDLED" instead of "CREATURE_PIG@SADDLED", maybe you should fix that :)
    Nice Plugin!
     
  19. Offline

    Zarius

    Ah, thanks for that - will be fixed next version.

    New version:


    Version 0.9.8 (2011/07/07)
    • previous beta stable
    • added dropitem@dropdata support (inc. range for random)
    • fix treespawn for blockbreak
    Weird example of the day:
    Code:
            GRASS:
                - tool: ALL
                  drop: CREATURE_CREEPER@POWERED
                - tool: ALL
                  drop: WOOL@RANGE-0-15
                  event: [TREE]
    
    Note: creeper must be before tree - otherwise it wont spawn. This causes a random wool color to drop, and a tree with a powered creeper stuck (momentarily) in it to appear. Beware! The creeper may escape & explode :D

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

    Skirmisher

    Getting an error when running /obr on v0.9.8:
    Code:
    [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'otherblocksreload' in plugin OtherBlocks v0.9.8
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:298)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:711)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at com.sargant.bukkit.otherblocks.OtherBlocks.onCommand(OtherBlocks.java:147)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    The plugin still works fine though.

    So, can we have group drops now? :D
     
  21. Offline

    Zarius

    Thanks for that, will look into it tonight. Group drops coding is in progress but a larger undertaking :D As is integer data values (eg. for adding itemcraft blocks).
     
    icephantom likes this.
  22. Offline

    Skirmisher

    What will the syntax be like for the group drops?
     
  23. Offline

    Zarius

    I'm thinking something like this:

    Code:
    configversion: 2.0
    
    otherblocks:
      main:
        GRASS:
          - dropgroup: mygroup
            chance: 50%
            exclusive: true   # this means that if this drop is selected no others will occur
            - tool: ANY
              drop: MAP
            - tool: ANY
              drop: COMPASS
          - tool: ANY
            drop: STONE
      mycritters:
        <some stuff about creature drops>
      mycritters.ranger:
        <specific ranger stuff>
      mycritters.hunter:
        <specific hunter stuff>
      mycoal:
        <some stuff about mining drops>
      leafdrops:
        <generic leafdrop stuff>
    
    aliases:
      hunters: [main, mycritters, leafdrops]
      miners: [main, mycoal, leafdrops]
    
    In this case grass will have a 50% chance of the "mygroup" drop which consists of 100% chance of both map & compass - due to the "exclusive" option no other (default or stone) drops occur. If the chance for "mygroup" is not rolled then the block will drop stone.

    If the "exclusive" option is not set then the grass will always drop stone and 50% of the time drop "map & compass" in addition to the stone.

    This config change also assists with permissions. Here are some permissions examples:
    otherblocks.dropgroup.main
    otherblocks.dropgroup.mycritters
    otherblocks.dropgroup.mycoal
    or even the aliases:
    otherblocks.dropgroup.alias.hunters
    otherblocks.dropgroup.alias.miners

    By using the . in your group names you could include all subgroups, eg.:
    otherblocks.dropgroup.mycritters.*
     
  24. Is there a way that ANY Player drops something?
     
  25. Offline

    Fadingdeath

    Can somebody help me? I'm running a server with OtherBlocks enabled, and I can't seem to get it to work, my .YML config is below.
    Show Spoiler
    Code:
    priority: highest
    verbosity: low
    enableblockto: false
    userpermissions: false
    
    otherblocks:
        GLASS:
        - tool: ALL
          drop: GLASS
          quantity: 1
        CREATURE_CREEPER:
        - tool: ALL
          drop: TNT
          quantity: 0-4
          chance: 45
        - tool: ANY_SWORD
          drop: CREATURE_CREEPER@CHARGED
          quantity: 0-2
          chance: 10
        CREATURE_CREEPER@CHARGED
        - tool: ALL
          drop: TNT
          quantity: 25
        BOAT:
        - tool: ALL
          drop: BOAT
          quantity: 1
        CREATURE_GIANT:
        - tool: ALL
          drop: GOLD_INGOT
          quantity: 1-2
        - tool: ALL
          drop: IRON_INGOT
          quantity: 2-4
        - tool: ALL
          drop: IRON_HELMET
          quantity: 1
          chance: 10
        - tool: ALL
          drop: IRON_CHESTPLATE
          quantity: 1
          chance: 10
        - tool: ALL
          drop: IRON_BOOTS
          quantity: 1
          chance: 10
        - tool: ALL
          drop: IRON_LEGGINGS
          quantity: 1
          chance: 10
        - tool: ALL
          drop: DIAMOND
          quantity: 1-2
          chance: 15
        - tool: ALL
          drop: TNT
          quantity: 3-9
        - tool: ALL
          drop: DIAMOND_PICKAXE
          quantity: 1
          chance: 7.5
        - tool: ALL
          drop: IRON_PICKAXE
          quantity: 1-3
          chance: 40
        - tool: ALL
          drop: STICKY_PISTON
          quantity: 0-3
        - tool: AIR
          drop: DIAMOND_BLOCK
          quantity: 1
          chance: 10
        - tool: ALL
          drop: PISTON
          quantity: 0-3
          chance: 80
        - tool: ALL
          drop: BUCKET
          quantity: 0-2
          chance: 15
        - tool: ALL
          drop: OBSIDIAN
          quantity: 3-12
          chance: 35
        - tool: ALL
          drop: SPIDER_WEB
          quantity: 0-5
          chance: 37.5
        - tool: ALL
          drop: COAL
          quantity: 4-8
          chance: 100
        - tool: DIAMOND_SWORD
          drop: CREATURE_ZOMBIE
          chance: 100
        - tool: DIAMOND_SWORD
          drop: CREATURE_CREEPER
          chance: 20
        SPECIAL_LEAFDECAY:
        - drop: APPLE
          chance: 1.75
          quantity: 0-2
        - drop: GOLDEN_APPLE
          chance: 0.25
          quantity: 0-1
        - drop: STICK
          chance: 15
          quantity: 1
        - drop: WOODEN_PLANK
          chance: 7.5
          quantity: 1-2
        - drop: CREATURE_CHICKEN
          chance: 2
          quantity: 1-4
        - drop: GOLDEN_AXE
          chance: 0.02
          quantity: 1-3
        CREATURE_ZOMBIE:
        - tool: ALL
          drop: CREATURE_ZOMBIE
          chance: 65
        GRASS:
        - tool: AIR
          drop: GRASS
          quantity: 1

    I am pretty sure I set up the plugin correctly, but nothing seems to take effect.
     
  26. Offline

    Skirmisher

    What is the console output from OtherBlocks at startup?
    The correct way to specify a charged creeper is CREATURE_CREEPER@POWERED, not CREATURE_CREEPER@CHARGED.

    Does just using PLAYER work? I don't know if it does, but it's worth a try.
     
  27. Offline

    sagethor

    @Zarius
    Been twiddling with the plugin and I'm not sure about DAMAGE_ENTITY_ATTACK - I'm trying to customize drops creepers give, but I also want to keep the functionality of getting Musical Discs when creepers are killed by Skeletons. Any ideas?

    Thanks!
     
  28. Offline

    Zarius

    As skirmisher said - check the console errors. There are a bunch of issues here, doesn't pass yaml test either as you missed the ":" after the charged creeper.

    WOODEN_PLANK, GOLDEN_AXE, SPIDER_WEB, PISTON and STICKY_PISTON are all non-valid names - please check the wiki in the top post or the help file in the otherblocks folder for the correct names (eg. just WOOD, WEB, GOLD_AXE).

    Also, I made the same mistake with the creeper you did :D Firstly make sure you're using CREEPER@POWERED and secondly (my mistake too) don't have a "CREEPER" drop powered creepers unless you also want powered creepers dropping powered creeepers. Rather use CREEPER@UNPOWERED to drop the powered creeper.

    Just PLAYER should work - if it doesn't I'll need to fix it.
     
  29. Offline

    StormForum

    Help me please this is my config and it wont work. I believe I'm doing this correctly, could you please tell me if it's my problem or just something with command prompt or whatever.

    otherblocks:
    LEAVES@BIRCH:
    - tool: ALL
    drop: APPLE
    chance: 5
    SPECIAL_LEAFDECAY:
    - drop: APPLE
    chance: 10
    CREATURE_ZOMBIE:
    - drop: CREATURE_ZOMBIE
    chance: 25
    CREATURE_ZOMBIE:
    - drop: CREATURE_ZOMBIE
    quantity: 1
    chance: 25
     
  30. Offline

    Zarius

    The spacing is important, try:
    Show Spoiler
    Code:
    otherblocks:
      LEAVES@BIRCH:
        - tool: ALL
          drop: APPLE
          chance: 5
      SPECIAL_LEAFDECAY:
        - drop: APPLE
          chance: 10
      CREATURE_ZOMBIE:
        - tool: ALL
          drop: CREATURE_ZOMBIE
          chance: 25
    
     
  31. Offline

    sagethor

    @Zarius
    You seem to have missed my post. Mind scrolling up 4 posts? :)
     

Share This Page