[INACTIVE][MECH] OtherBlocks v0.7.4 - Customize drops in combo with everything else [617]

Discussion in 'Inactive/Unsupported Plugins' started by cyklo, Feb 11, 2011.

  1. Offline

    cyklo

    OtherBlocks - Customize what broken blocks and dead mobs drop!
    Version: 0.7.4
    Download: Jar File | Source Code
    Like this plugin? [​IMG]

    Main author: @cyklo
    Contributors: @Celtic Minstrel

    See the Wiki page for full details on how to set up OtherBlocks

    If you are getting errors with the word "snakeyaml" in it, your config file isn't properly formatted.
    Test it on this website.


    OtherBlocks is a plugin that lets you apply rules to what blocks drop when destroyed, depending on what tool you used. It is inspired by decino's goldenNether plugin.

    You can set rules in the configuration file to match any item with any block and give it a different drop item. For example, you could allow gathering of Glowstone Dust on the overworld by breaking Redstone ore with a golden pickaxe. Or you could allow ingots to be mined directly from their ores if you use Flint and Steel. Or you could invoke Isaiah Mustafa and decree "THE LEAVES ARE NOW DIAMONDS!"

    To install, simply decompress the contents to your plugins directory. Then, copy otherblocks/config.sample.yml to otherblocks/config.yml and edit away!

    Don't forget - to see how to edit the config file, check out out the Wiki!



    Changelog (open)

    Version 0.7
    • Added new drop types DEFAULT and NOTHING (0.7.4)
    • Fixed: creature drops don't work in specific worlds (0.7.4)
    • Added new mob types: CREATURE_GIANT, CREATURE_MONSTER, CREATURE_WOLF (0.7.3)
    • Will no longer throw problems with new types of mob when out of date (0.7.3)
    • Can specify creatures as the tool of death for mobs (0.7.2)
    • Can specify damage events as the tool of death for mobs (0.7.2)
    • Can specify data (colour) values for when you kill a sheep (0.7.2)
    • Fixed: doesn't work on CB 561+ (0.7.2)
    • Can specify data values for SPECIAL_LEAFDECAY events (0.7.2)
    • Large internal changes (0.7.2)
    • Fixed: number of spawned mobs did not obey config file (0.7.1)
    • Fixed: NullPointerException on mob item drop (0.7.1)
    • "color:" works for more than just wool and dyes, now works for wood, half-height blocks, crops etc. (0.7)
    • Synonyms, allowing you to specify groups such as "ANY_REDSTONE_ORE" and "ANY_PICKAXE" (0.7)
    • Can now specify data value of blocks you are dropping from, e.g. "CROPS@RIPE" (0.7)
    • Can now drop a number of items in a range (0.7) (by Celtic Minstrel)
    • Can now drop "CONTENTS" of containers, e.g. dispensers, furnaces (0.7) (by Celtic Minstrel)
    Version 0.6
    • Added SPECIAL_LEAFDECAY tag. See the wiki. (0.6.2)
    • Back-end changes to build process (0.6.1)
    • Multiworld support! Now you can customize drops on a per-world basis (0.6)
    Version 0.5

    • Now you can change what a mob drops when it is killed by a player! (0.5)
    Version 0.4

    • Fixed the map-break AIR bug (0.4.6)
    • Now specify multiple tools at the same time with syntax [TOOL_A, TOOL_B] (0.4.5)
    • Fixed incorrect colours of dropped dyes (0.4.4)
    • Added "ANY" as synonym for "ALL" (0.4.4)
    • Adjustable priority (0.4.3)
    • Can hide boot messages with "verbosity: low" (0.4.2)
    • Quantity and Damage bugfixes, works with Beta 1.3 (0.4.1)
    • Oh god, now you can spawn creepers (and other mobs) (0.4)
    • Fractional percentage chances such as 0.01% are valid (0.4)
    Version 0.3

    • Conforms to new plugin standards and breaks backwards compatibility (0.3)
    Version 0.2

    • Can now drop multiple items per block (0.2.5)
    • Fixed bug introduced in 0.2.3 (0.2.4)
    • Can now specify color of dropped item for wools and dyes (0.2.3)
    • Once again (and hopefully for the last time) fixed durabilities (0.2.2)
    • Changed to lowest priority, hopefully for better compatibility (0.2.2)
    • Fixed durability bug (0.2.1)
    • Change to config.yml format (0.2)
    • Can now specify multiple drops per block, based on different tools (0.2)
    Version 0.1


    • Added "ALL" selector for tools (0.1.3)
    • Workaround for bug in Bukkit whereby durability and max stack size are mixed up (0.1.3)
    • Added drop probability (0.1.2)
    • Customizable damage on block destruction (0.1.1)
    • First release (0.1)
     
    Steve Cole, g_BonE and tension69 like this.
  2. Offline

    thejon

    Something I noticed playing with this last night; and it may just be really poor RNG luck on my part, but I couldn't get anything "non natural" to drop with a chance set less then 10.

    I had, for example, both redstone_ore and glowing_redstone_ore set to have a chance of 5 to drop lapis_ore. I broke, between two players, somewhere around 60 or so redstone blocks, and got redstone dust 100% of the time. I changed the config to reflect a chance of 10, and it behaved as expected.

    Again, this may just be a random number thing; and it just never falling on 5 or less for me. Not really sure how to test aside from just building a wall of 100 blocks and breaking each, then counting what you ended up with.

    Either way; this is still a fantastic plugin; and I think you're doing a super job with supporting it.
     
  3. Offline

    grinch843

    I 2nd That [​IMG]
     
  4. Offline

    Drength

    If only it could spawn pigs instead of dropping things...that would be fun to spring on players. Or maybe creepers...
     
  5. Offline

    cyklo

    Just uploaded v0.2.5 which can do that. Simply specify multiple rules for a block, but also specify that you want the original block dropped with 100% certainty, e.g.

    Code:
    otherblocks:
        SAND:
            - tool: ALL
              drop: SAND
              chance: 100
    
            - tool: ALL
              drop: WATCH
              chance: 1
    
            - tool: ALL
              drop: STICK
              chance: 5
    At the moment, you can't specify probabilities with any finer grain of control than 1%.
     
  6. Offline

    bong

    Really nice plugin. with different tools produces, multiple drops and chances its great for customizlation. I can replace a few other plugins with this one.
    But the links are not working for me. [​IMG]
     
  7. Offline

    cyklo

    Added a Dropbox-based mirror, which I shall try to keep up-to-date.
    --- merged: Feb 21, 2011 5:44 PM ---
    v0.3 now requires a build of CraftBukkit of 405 or newer. 0.2.5 is still available for older versions.
    --- merged: Feb 22, 2011 12:30 AM ---
    Hah, now you can spawn mobs in Version 0.4. Set your GRASS to a 0.01% creeper chance for some nasty surprises!

    To spawn a mob, consult the list at http://cliqr.org/ad and prefix with "CREATURE_", e.g.

    Code:
    otherblocks:
        SAND:
            - tool: ALL
              drop: CREATURE_CREEPER
              chance: 2
     
  8. Offline

    sibilla6

    Rather than spawning mobs, can this mod change what will drop after you kill mobs? Like, it'd be really fun if a Creeper explodes you could have slimes coming out of it. Sure in that case it's different than if I actually kill the Creeper but you get the idea. Also, can this mod modify the drops of vehicles such as the boat and minecart?
     
  9. Offline

    enkryptor

    I want this feature too (customize monsters' drop). That'll make OtherBlocks a perfect tweaking tool (now I use iMonster for that).
     
  10. Offline

    cyklo

    Mobs, yes, it's something that shall be done. However, Bukkit is currently lacking the ability to flag up a "minecart broken" or "boat broken" event, so those can't currently be implemented. Other plugins have managed to get around this by hooking directly into the Minecraft code, but it's not very clean and I'm avoiding doing it.

    I think they're trying to assemble minecarts, boats and mobs all under one banner of "entities" and having some kind of "on entity destruction" event, so I was hoping to wait until the API had this functionality.
     
  11. Offline

    enkryptor

    What about new blocks in 1.3? The list is a bit obsolete..

    By the way I've tested changing the boat drop, it used to be work fine..
    Code:
    BOAT:
                - tool: GOLD_AXE
                  drop: WOOD
                  quantity: 5
                - tool: ALL
                  drop: BOAT
    What am I doing wrong?

    By the way, version 0.4 doesnt seem to be working with the latest (432) CB build:
    Code:
    2011-02-23 21:37:30 [SEVERE] Could not pass event BLOCK_BREAK to OtherBlocks
    java.lang.NoSuchMethodError: org.bukkit.World.dropItemNaturally(Lorg/bukkit/Location;Lorg/bukkit/inv
    entory/ItemStack;)Lorg/bukkit/entity/ItemDrop;
            at com.sargant.bukkit.otherblocks.OtherBlocksBlockListener.onBlockBreak(OtherBlocksBlockList
    ener.java:57)
            at org.bukkit.plugin.java.JavaPluginLoader$31.execute(JavaPluginLoader.java:282)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at net.minecraft.server.ItemInWorldManager.d(ItemInWorldManager.java:112)
            at net.minecraft.server.ItemInWorldManager.b(ItemInWorldManager.java:77)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:359)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  12. Offline

    cyklo

    I shall get to all of this once I finally get Minecraft to log in...
    --- merged: Feb 23, 2011 7:13 PM ---
    Right...

    That is a link to the Bukkit source code. It is as obsolete as Bukkit itself is. Any named block Bukkit can handle, OtherBlocks can handle.

    Just tried it myself and it doesn't work for me. Basically, boats and minecarts aren't blocks, Minecraft treats them more like mobs. However, Bukkit doesn't have the proper hooks yet (they don't "die" in the same way as other mobs), so I can't override the drops for boats or minecarts.

    Version 0.4.0.1 is a rebuild against (CB432-B412). No code changes, but now works with 1.3 as far as I can tell.
     
  13. Offline

    enkryptor

    Neither do for me... strange. I swear I used to get boat back somehow.

    However, it seems quantity is always 1 now regardless of config.
     
  14. Offline

    cyklo

    I am a bad and somewhat haphazard developer. Should be fixed in 0.4.1.
     
  15. Offline

    alimarin

    I just tried out this plugin, finally got it to load the plugin without errors but now it's not dropping anything, what did i do wrong?

    Code:
    otherblocks:
    
    IRON_ORE:
    
    - tool: ALL
      drop: IRON_ORE
      quantity: 4
      chance: 33
    
    GOLD_ORE:
    
    - tool: ALL
      drop: GOLD_ORE
      quantity: 3
      chance: 33
    
    COAL_ORE:
    
    - tool: ALL
      drop: COAL
      quantity: 5
      chance: 40
    
    DIAMOND_ORE:
    
    - tool: ALL
      drop: DIAMOND
      quantity: 5
      chance: 20
    
    LAPIS_ORE:
    
    - tool: ALL
      drop: INK_SACK
      quantity: 5
      damage: 4
      chance: 40
    
    REDSTONE_ORE:
    
    - tool: ALL
      drop: REDSTONE
      quantity: 10
      chance: 30
    
    STONE:
    
    - tool: ALL
      drop: GOLD_ORE
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: IRON_ORE
      quantity: 1
      chance: 3
    
    - tool: ALL
      drop: COAL
      quantity: 1
      chance: 5
    
    - tool: ALL
      drop: DIAMOND
      quantity: 1
      chance: 1
    
    - tool: ALL
      drop: SULPHUR
      quantity: 1
      chance: 1
    
    - tool: ALL
      drop: FLINT
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: CLAY_BALL
      quantity: 1
      chance: 5
    
    - tool: ALL
      drop: BONE
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: GLOWSTONE_DUST
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: REDSTONE
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: INK_SACK
      quantity: 5
      damage: 4
      chance: 40
    
    - tool: GOLD_PICKAXE
      drop: STONE
      quantity: 1
      chance: 100
    
    GRASS:
    
    - tool: ALL
      drop: FEATHER
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: BONE
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: STICK
      quantity: 5
      chance: 10
    
    - tool: ALL
      drop: SEEDS
      quantity: 1
      chance: 4
    
    - tool: ALL
      drop: SUGAR_CANE
      quantity: 1
      chance: 4
    
    - tool: ALL
      drop: FLINT
      quantity: 1
      chance: 2
    
    DIRT:
    
    - tool: ALL
      drop: STICK
      quantity: 1
      chance: 4
    
    - tool: ALL
      drop: BONE
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: FLINT
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: CLAY_BALL
      quantity: 1
      chance: 2
    
    - tool: ALL
      drop: LEAVES
      quantity: 1
      chance: 5
    
    LEAVES:
    
    - tool: ALL
      drop: APPLE
      quantity: 1
      chance: 10
    
    - tool: ALL
      drop: GOLDEN_APPLE
      quantity: 1
      chance: 1
    
    - tool: ALL
      drop: STICK
      quantity: 3
      chance: 20
    
    - tool: ALL
      drop: LEAVES
      quantity: 1
      chance: 100
    
    LOG:
    
    - tool: ALL
      drop: STICK
      quantity: 4
      chance: 30
    
    - tool: ALL
      drop: SLIME_BALL
      quantity: 1
      chance: 2
    
    SAND:
    
    - tool: ALL
      drop: FLINT
      quantity: 1
      chance: 3
    
    - tool: ALL
      drop: SANDSTONE
      quantity: 1
      chance: 5
    
    GLASS:
    
    - tool: ALL
      drop: GLASS
      quantity: 1
      chance: 25
    
    SKELETON:
    
    - tool: ALL
      drop: BOW
      quantity: 1
      chance: 20
    
    - tool: ALL
      drop: ARROW
      quantity: 12
      chance: 12
    
    SPIDER:
    
    - tool: ALL
      drop: STRING
      quantity: 5
      chance: 20
    
    CHICKEN:
    
    - tool: ALL
      drop: BONE
      quantity: 2
      chance: 25
    
    - tool: ALL
      drop: FEATHER
      quantity: 6
      chance: 25
    
    - tool: ALL
      drop: EGG
      quantity: 1
      chance: 45
    
    COW:
    
    - tool: ALL
      drop: LEATHER
      quantity: 4
      chance: 25
    
    - tool: ALL
      drop: BONE
      quantity: 4
      chance: 25
    
    CREEPER:
    
    - tool: ALL
      drop: SULPHUR
      quantity: 5
      chance: 20
    
    GHAST:
    
    - tool: ALL
      drop: SULPHUR
      quantity: 5
      chance: 20
    
    PIG:
    
    - tool: ALL
      drop: BONE
      quantity: 3
      chance: 30
    
    - tool: ALL
      drop: PORK
      quantity: 2
      chance: 40
    
    PIG_ZOMBIE:
    
    - tool: ALL
      drop: GOLD_SWORD
      quantity: 1
      chance: 20
    
    - tool: ALL
      drop: GRILLED_PORK
      quantity: 2
      chance: 40
    
    SHEEP:
    
    - tool: ALL
      drop: BONE
      quantity: 3
      chance: 30
    
    ZOMBIE:
    
    - tool: ALL
      drop: BONE
      quantity: 4
      chance: 25
     
  16. Offline

    enkryptor

    What do you mean "not dropping anything"? You get nothing but air, or you get standard MC drop from mining?

    To my knowledge, customizing monster drop doesn't work at present.
     
  17. Offline

    cyklo

    The plugin prints advice messages to the terminal when it runs. If you're seeing something like:
    Code:
    [INFO] OtherBlocks: no values found in config file!
    
    Then it's because whitespace is important, and you should indent your file EXACTLY as shown in the example configuration.
     
  18. Offline

    enkryptor

    Have downloaded the build today, but it doesn't seems to be working either.
    What I wrote in my config:
    Code:
    SANDSTONE:
          - tool: GOLD_PICKAXE
            drop: SAND
            quantity: 4
    
    When I dig sandstone with a golden pickaxe, I get 1 sand instead of 4.

    However, the plugin itself said it is 4.0.1, not 4.1.
     
  19. Offline

    cyklo

    Bah... link was still pointing to otherblocks_0_4_0_1.tar.gz. Fixed, or direct download from http://dl.dropbox.com/u/782651/minecraft/otherblocks_0_4_1.tar.gz
     
  20. Offline

    Soul Reaper

    Is it possible to group multiple tools together? It gets real tedious when your trying to make random items appear in stones for all the pickaxes. I'm just using ALL to save some time xD

    edit: strangely some of my golden tools don't do what i want them too.
    Code:
        GRASS:
            - tool: GOLD_SPADE
              drop: GRASS
              quantity: 1
              chance: 100
    
            - tool: GOLD_PICKAXE
              drop: GRASS
              quantity: 1
              chance: 100
        STONE:
            - tool: GOLD_PICKAXE
              drop: STONE
              quantity: 1
              chance: 100
    
            - tool: DIAMOND_PICKAXE
              drop: COBBLESTONE
              quantity: 1
    
            - tool: IRON_PICKAXE
              drop: COBBLESTONE
              quantity: 1
    
            - tool: STONE_PICKAXE
              drop: COBBLESTONE
              quantity: 1
    
            - tool: ALL
              drop: BONE
              quantity: 1-4
              chance: 10
    
            - tool: ALL
              drop: STRING
              quantity: 1-4
              chance: 10
    
            - tool: ALL
              drop: SULPHUR
              quantity: 1-5
              chance: 8
    The golden pickaxe works for the grass, however it will not give me stone from stone. the shovel(spade) doesn't give me grass.
     
  21. Offline

    enkryptor

  22. Offline

    Kaseki

    This is a great mod. I've got a request a for future version.

    Could you allow item numbers in addition to item names as valid item drops?
     
  23. Offline

    cyklo

    To answer everything in one go...
    Coming soon - lists of tools.
    Just tried your config, and it works for me, EXCEPT that the "quantity: 1-4" syntax doesn't work yet. It has to be just one number. As for pickaxes and spades dropping the right things, they're working. Make sure you're using the latest version (0.4.1) and that the server.log file is showing all the right messages when OtherBlocks loads, e.g. "[INFO] OtherBlocks: GOLD_SPADE + GRASS now drops 1x GRASS with 100.0% chance".
    They're hooking directly into the net.minecraft.* classes - which is (a) susceptible to disruptive changes every time a new Minecraft Server version is integrated into Bukkit, as the variables may not keep the same name or do the same thing, and (b) legally dubious. I am writing this plugin using only the Bukkit open API, in the hope that even if I am unable to work on it for a while it shouldn't suddenly break with a new server build. I have tried asking the Bukkit developers a few times to implement the proper hooks.
    Any reason? I find the actual tool/block names are much more legible than arbitrary numbers.
     
  24. Offline

    Kaseki

    Feel free to ignore what I said--I was feeling lazy at the time and didn't feel like typing every block name out. I wrote a script to do it for me so it's all good now. (For reference, I was making chests have a chance of dropping every item if destroyed with a golden axe)
     
  25. Offline

    Shadowsquire

    I'm currently running otherblocks 0.4.1 and craftbukkit #430. I'm getting this in the server log when I start the server

    Code:
    2011-02-24 23:07:38 [INFO] OtherBlocks: DIAMOND_PICKAXE + REDSTONE_ORE now drops 1x LAPIS_BLOCK with 65% chance
    2011-02-24 23:07:38 [INFO] OtherBlocks: DIAMOND_PICKAXE + GLOWING_REDSTONE_ORE now drops 1x LAPIS_BLOCK with 65% chance
    2011-02-24 23:07:38 [INFO] OtherBlocks: DIAMOND_PICKAXE + COAL_ORE now drops 1x DIAMOND with 1% chance
    2011-02-24 23:07:38 [WARNING] Error while processing block: LEAVES
    2011-02-24 23:07:38 [WARNING] Error while processing block: BOOKSHELF
    2011-02-24 23:07:38 [WARNING] Error while processing block: MOB_SPAWNER
    2011-02-24 23:07:38 [WARNING] Error while processing block: GLOWSTONE
    2011-02-24 23:07:38 [WARNING] Error while processing block: GLASS
    2011-02-24 23:07:38 [INFO] OtherBlocks: DIAMOND_PICKAXE + GOLD_ORE now drops 1x GOLD_INGOT with 100% chance
    2011-02-24 23:07:38 [INFO] OtherBlocks: DIAMOND_PICKAXE + IRON_ORE now drops 1x IRON_INGOT with 100% chance
    2011-02-24 23:07:38 [WARNING] Error while processing block: SAND
    2011-02-24 23:07:38 [WARNING] Error while processing block: BOAT
    Here's my config.yml
    Code:
            REDSTONE_ORE:
                - tool: DIAMOND_PICKAXE
                  drop: LAPIS_BLOCK
                  quantity: 1
                  chance: 65
            GLOWING_REDSTONE_ORE:
                - tool: DIAMOND_PICKAXE
                  drop: LAPIS_BLOCK
                  quantity: 1
                  chance: 65
            COAL_ORE:
                - tool: DIAMOND_PICKAXE
                  drop: DIAMOND
                  quantity: 1
                  chance: 1
            LEAVES:
                - tool: ANY
                  drop: APPLE
                  quantity: 1
                  chance: 33
            BOOKSHELF:
                - tool: ANY
                  drop: BOOKSHELF
                  quantity: 1
            MOB_SPAWNER:
                - tool: ANY
                  drop: MOB_SPAWNER
                  quantity: 1
                  chance: 50
            GLOWSTONE:
                - tool: ANY
                  drop: GLOWSTONE
                  quantity: 1
            GLASS:
                - tool: ANY
                  drop: GLASS
                  quantity: 1
            GOLD_ORE:
                - tool: DIAMOND_PICKAXE
                  drop: GOLD_INGOT
                  quantity: 1
            IRON_ORE:
                - tool: DIAMOND_PICKAXE
                  drop: IRON_INGOT
                  quantity: 1
            SAND:
                - tool: DIAMOND_SHOVEL
                  drop: CLAY_BALL
                  quantity: 1
                  chance: 4
            BOAT:
                - tool: ANY
                  drop: BOAT
                  quantity: 1
    Is there something I'm doing wrong?
     
  26. Offline

    enkryptor

    "ANY" != "ALL" i suppose
     
  27. Offline

    Soul Reaper

    log says those things but still not working. I do have golden tools installed, maybe that conflicts with this, hmm
     
  28. Offline

    enkryptor

    Why do you need GoldenTools aside with OtherBlocks?
     
  29. Offline

    cyklo

    As enkryptor said, it's "ALL", not "ANY". Also, even though it says it's OK, you can't currently set "BOAT".

    Yes. OtherBlocks runs at the lowest priority. If you get it misbehaving, please check you're not running other plugins which try to do the same thing as they will dominate.

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

    Shadowsquire

    lmfao. Wow. Can't believe I missed that. I feel like an idiot now. Thanks guys! =P

    EDIT: EDIT: Nevermind... I really think I'm an idiot now.
     
  31. Offline

    Soul Reaper

    For better gold tools. The mod only changes speed and durability of tools though, don't see how it affects what you get from blocks.
     

Share This Page