[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

    Rofang

    In your documentation, you list MONSTER_EGGS as an item, but I was under the impression that was the name for the stone block that breaks to produce silverfish.
     
  3. Offline

    Celtic Minstrel

    Yup, that's correct; fixed. :D
     
  4. Offline

    RugRats

    @Zarius
    Since the resent updates how can I repair this to work with the new version :D
    Code:
        CLICKRIGHT-2: # GRASS
            - drop: NOTHING # start with a blank slate - ie. don't drop anything unless we say so
              tool: ANY_HOE
            - drop: SEEDS
              tool: ANY_HOE
              quantity: 1
              chance: 42
              face: [UP]
            - drop: NOTHING # this allows the ground to be tilled
              replacementblock: SOIL
              tool: ANY_HOE
              face: [UP]    # for up face only (ie. not if you click on the side)
        CLICKRIGHT-3: # DIRT
            - drop: NOTHING
              tool: ANY_HOE
            - drop: DEFAULT
              tool: ANY_HOE
              face: UP
     
  5. Offline

    Zarius

    I haven't seen any block/item/entity for exp orbs yet...

    This should work (with a couple of bugs):

    Code:
      GRASS:
        - action: RIGHT_CLICK
          tool: ANY_HOE
          face: [UP]
          drop: SEEDS/1/42%
    
        - action: RIGHT_CLICK
          tool: ANY_HOE
          face: [UP]    # for up face only (ie. not if you click on the side)
          drop: NOTHING # this allows the ground to be tilled
          replacementblock: SOIL
    
      DIRT:
        - action: RIGHT_CLICK
          tool: ANY_HOE
          drop: NOTHING
    
        - action: RIGHT_CLICK
          tool: ANY_HOE
          face: UP          
          drop: DEFAULT
    
    If you make a separate include file you can set action: RIGHT_CLICK in the defaults and not have to keep typing it.

    Bugs are that face: UP doesn't seem to test properly and the seeds appear lodged in the ground (which is correct as it's the dirt block they are dropping from but we had a work-around previously, will work on incorporating that into 2.0).

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

    AndyFox42

    I am getting this every time I kill a monster:
    Code:
    2011-09-17 05:08:24 [WARNING] Task of 'OtherBlocks' generated an exception
    java.lang.NullPointerException
    at com.gmail.zariust.bukkit.otherblocks.OtherBlocksDrops.performActualDrop(OtherBlocksDrops.java:1486)
    at com.gmail.zariust.bukkit.otherblocks.OtherBlocks.performDrop_Passer(OtherBlocks.java:540)
    at com.gmail.zariust.bukkit.otherblocks.DropRunner.run(DropRunner.java:24)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:439)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    When I reload or restart, the plugin loads normally and has no errors. This is version 1.96.
     
  7. Offline

    Rofang

    I look forward to you guys consolidating your info pages and linking to them from the OP, because I have a hard time keeping track of which resources are where. The BukkitDev page essentially includes what's in the wiki, but BukkitDev has all the new OD2.0 and MC1.8 stuff, while the wiki has the Advanced YAML page (though it's not linked from anywhere as far as I see). Dropgroups are somewhat explained here and there, but I don't see a single great explanation of them in one place, and the slash-based quantity/chance shortcut syntax seems to be mentioned only in the 2.0 Progress page.

    Granted you're working on more important things than streamlined documentation right now, but maybe a quick link to all of those things in the OP would help? The OP is pretty long and has some of those links peppered here and there (the BukkitDev link is all but hidden), but there's no single place to look for reference material links.
     
  8. Offline

    RugRats

    I guess I got to get to work!
    EDIT: Thanks for the feedback!
     
  9. Offline

    Celtic Minstrel

    Ooh yes, we could add an ExperienceDrop class...
    Code:
    REDSTONE_ORE:
        - drop: DEFAULT
        - drop: XP@5
          chance: 7%
     
    Legolas75893 and Rofang like this.
  10. Offline

    Legolas75893

    Ohh hot damn do I want.
     
  11. Offline

    Zarius

    Is there an API to drop XP yet?

    Can you post your config - are you trying to drop money? What economy plugin are you using?
     
  12. Ideas on how to fix? Cracked stone brick has same name as noncracked.

    Code:
      SMOOTH_BRICK:
          - drop: NOTHING
          - tool: ANY_PICKAXE
            drop: SMOOTH_BRICK
            quantity: 1
            chance: 100
          - tool: ANY_PICKAXE
            drop: 98:2
            quantity: 1
            chance: 5
            exclusive:
    
     
  13. Offline

    m5k

    Any possibility to add the fishing catch event? I want certain perms groups getting better loot from fishing.
     
  14. Offline

    Zarius

    Instead of 98:2 use SMOOTH_BRICK@1 (mossy) or SMOOTH_BRICK@2 (cracked)

    It is likely I'll add this eventually :)
     
  15. Offline

    Celtic Minstrel

    There's no API specifically for experience, but the generic World.spawn function supports spawning experience orbs.
    I'll fix this once sunkid's materials update pull request is accepted. (Unless Zarius beats me to it.) It'll probably end up being SMOOTH_BRICK@STONE|COBBLESTONE|MOSSY_COBBLESTONE. In the meantime, you can use the numbers as Zarius said.
     
  16. Offline

    Rofang

    Cobblestone smooth brick? You just blew my mind with that label.
     
  17. Offline

    Celtic Minstrel

    It wasn't my idea; ask sunkid. Personally I think it's a bit of a stretch.
     
  18. Offline

    Zarius

    Hmm... odd labels - I'd say it should be SMOOTH_BRICK@NORMAL/CRACKED/MOSSY (which I've added as valid data values).

    Version 2.0-beta-3 - Download

    * improve fix_undroppables (1.8 support, new stairs drop stairs, breaking thin glass hurts with bare hands)
    * add loc-offset (eg. loc-offset: x/y/z) - adds location offset for drops/events/effects
    * renamed randomiseloc to loc-randomise
    * add NORMAL/MOSSY/CRACKED for SMOOTH_BRICK
    * fix for synonym drops (eg. ANY_AXE)
    * fix NPE for DAMAGE_FALL

    @RugRats

    For the seeds from tilling, try this:

    Show Spoiler
    Code:
      GRASS:
        - action: RIGHT_CLICK
          tool: ANY_HOE
          drop: DENY  # deny any tilling at first, then allow on UP face only below
    
        - action: RIGHT_CLICK
          tool: ANY_HOE
          face: [UP]
          drop: SEEDS/1/42%
          loc-offset: 0/1/0  # this offsets the drop (and events/effects) by +1Y to stop seeds getting stuck in ground
    
        - action: RIGHT_CLICK
          tool: ANY_HOE
          face: [UP]    # for up face only (ie. not if you click on the side)
          drop: NOTHING # this allows the ground to be tilled
          replacementblock: SOIL
    


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

    RugRats

    Thanks :D

    @Zarius
    Any reason why this doesn't work?
    Code:
        GLASS_PANE:
            - tool: ANY
              drop: GLASS_PANE
              quantity: 1
            - tool: [AIR, GLASS, GLASS_PANE]
              drop: NOTHING
              damageattacker: 1-2
              message: "Ouch! That hurt."
              chance: 20
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  20. Offline

    Zarius

    @RugRats - Because bukkit has called it THIN_GLASS. Check the fix_undroppables file in Beta 3.

    I might look into making a synonym for it.
     
  21. Offline

    RugRats

    Thanks :D

    @Zarius
    I've got TNT blocked on my server with worldguard meaning it shouldn't explode... but this makes it explode :( OtherDrops 2.0 Beta 3 to be exact.

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

    Zarius

    Hmm, this shouldn't be changing the effect of existing explosion triggers (eg. TNT, creepers). I'd understand the "event: explosion" not respecting worldguard (and it probably shouldn't either, since if the admin has added this to the config they want the explosion).

    Will look into this and test tonight.
     
  23. Offline

    Celtic Minstrel

    Agreed, though CRUMBLING is a close contender.

    Also, with the new blocks we could consider adding things like ANY_GLASS, ANY_FENCE, ANY_STAIRS as synonyms.
     
    Rofang likes this.
  24. Offline

    AndyFox42

    iConomy 6, and yes I am trying to make them drop money. My config calls a few of the included yml's (fix undroppables, gold tools basic, and leaf overhaul) as well as this one I made myself.

    My yml, based off one of the included ones:
    http://pastie.org/2556026

    MC 1.8.1
    CB 1149

    If you want to yell at me because it's not an RB of Bukkit and tell me I shouldn't be posting in your thread if I'm running a non-recommended build I will understand :(

    Perhaps I should try your 2.x beta?
     
  25. Offline

    Zarius

    Newest build shouldn't matter (i'm running a new build myself). 1.96 should support iConomy 6, I'll have a look at your config. In the meantime try the newest beta.
     
  26. Offline

    AndyFox42

    I have updated to your newest build, beta 3. I put my custom drops into the main drops yml, and (I think) set it up to call those other 3 from included. Now, when I kill a mob, I am no longer getting the error in my console. I am also, however, not getting any of the custom drops or money for the kills. It's like the plugin isn't even there. Am I doing something wrong with my config?

    Config:
    http://pastie.org/2556232

    I have also noted this is now showing up in the console. It's not an error, but I'm not sure what it means either:

    Console:
    http://pastie.org/2556219
     
  27. Offline

    Zarius

    Oh dammit - I removed that debug message but probably didn't rebuild the beta release before posting :( Will fix as soon as I can when I get home in about an hour and a half - will also test your config tonight and see if it works for me.
     
  28. Is this possible allready with this otherdrops ?

     
  29. Offline

    Zarius

    Okay, beta 4 is almost ready to go

    * fixed the entity drops issue (including money)
    * remove the "location" debug message
    * add new aliases:
    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),
    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

    Anything I'm missing before I post the new build?

    Hmm... you'd need a plugin to add a furnace recipe for the 4 sticks to wood plank, but the rest seems doable:

    Code:
      LOG:
        - tool: HANDS
          drop: DENY
          damageattacker: 1
          message: "Ouch - that hurt.  Try breaking the leaves - they're softer!"
    
      LEAVES:
        - tool: HANDS
          drop: STICKS
          chance: 0.5%  # do you really want this low?  player has to destroy 200 leaves for 1 stick?  Perhaps 2 sticks with 5% chance?
    
      LOG:
        - tool: WOOD_AXE
          drop: DENY
          damagetool: 20
          message: "That didn't work - guess this wooden axe is just decorative..."
    
      STONE:
        - tool: WOOD_PICKAXE
          drop: DENY
          damagetool: 20
          message: "Hmm... the stone is too hard for your wooden pickaxe - perhaps try something stronger?"
      GRAVEL:
        - tool: ANY_SHOVEL
          drop: COBBLESTONE
          chance: 1%  # one in a hundred chance of cobblestone, making a stone pickaxe needs about 300 gravel dug up?
    
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 15, 2016
  30. Sometimes percentage is written as a part of 1 = 100 %

    Thanks for the reply.
     

Share This Page