[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

    cyklo

    Just had a look at what GoldenTools does. It does hook into what a block drops, so if it's running at a higher priority than OtherBlocks then it will override the behaviour of OtherBlocks.
     
  3. Offline

    Soul Reaper

    ah so it does. any way to allow you plugin to override?
     
  4. Offline

    Kaseki

    I'm having so much fun with this mod. I've got a config.yml which is over 2500 lines long. However... this spams the crap out of my console when I load it up. Any errors as far as plugins that load before otherblocks, I have to check the log to see.

    Any possibility you could add a flag to the config to let me suppress the successful block drops and only have it say anything if there's an error in one of them?
     
  5. Offline

    cyklo

    A nice, quick thing to fix. Just uploaded 0.4.2 which lets you do this. Above the "otherblocks:" line in the config file, there is now a "verbosity: normal" line (optional - you can add this yourself). If you change this to "verbosity: low", it will hide most of the messages.
     
  6. Offline

    Kaseki

    Thanks! You're awesome.
     
  7. Offline

    Daveyo

    does this support percentages?
     
  8. Offline

    strupan


    I second this, hopefully you add percentage drop and also a drop for ANY tools or hand to get the drop. May this be the new BlockDrop plugin since David kind of stopped the development of it ;(
     
  9. Offline

    Soul Reaper

    Anti Grief has a feature to let you change its priority. can you do something similar with this?
     
  10. Offline

    LudicrousYoshi

    .tar ? I download it, but my computer doesnt have anything that reads .tar Is there any other form I can download it as? I tried .zip but it says it is corrupt when I try to open it...
     
  11. Offline

    cyklo

    It already does through the "chance: 100" or whatever parameter.
    Any tool - use "tool: ALL"
    No tool - use "tool: AIR"

    I assume you're using Windows. http://www.7-zip.org/

    Added priority adjustment in 0.4.3 (check the new lines at the top of the config.sample.yml file). Not sure if it'll solve the problem, but you can give it a try.

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

    AegisZephyr

    I've tried several different configurations but how exactly do you get different color dyes to drop?
    So far I've tried
    LEAVES:
    - tool: ANY
    drop: DYE_BROWN
    quantity: 10
    chance: 1
    LEAVES:
    - tool: ANY
    drop: DYE.BROWN
    quantity: 10
    chance: 1
    LEAVES:
    - tool: ANY
    drop: DYEBROWN
    quantity: 10
    chance: 1
    Am I missing something in particular? I'm pretty sure I'm doing something wrong here.
    Thanks in advance.
     
  13. Offline

    cyklo

    Code:
    otherblocks:
        LEAVES:
            - tool: ANY
              drop: DYE
              color: BROWN
              quantity: 10
              chance: 1
    
     
  14. Offline

    AegisZephyr

    Thank you so much! Love the plugin and keep up the good work.

    EDIT:
    I'm getting this error with that config now:
    [WARNING] Error while processing block LEAVES: No enum constant org.bukkit.Material.DYE
     
  15. Offline

    Soul Reaper

    thanks will be testing shortly :D
     
  16. Offline

    cyklo

    Apparently I've not enabled the "DYE" shortcut for drops, but I have for tools. For now, INK_SACK will work instead.

    However, I've also just found that the colour data for wool and dye are completely backwards to each other. So look for the colour of the dye you want here (http://www.minecraftwiki.net/wiki/Data_values), and use the wool colour name that corresponds to the same Hex value (e.g. brown dye would be LIGHT_BLUE). I shall fix this properly later.
    --- merged: Feb 27, 2011 1:59 PM ---
    0.4.4 allows the DYE keyword for dropped items. It also fixes the incorrect colours when dyes are dropped.

    Also, you can now use either ANY or ALL. Both do the same thing.
     
  17. Offline

    Krispy

    Is there any way to not override the default drops but add onto them?
     
  18. Offline

    cyklo

    Re-add the default drop with "tool: ALL" and "chance: 100". If it's a selective drop to start with, unfortunately you'll have to not use "ALL" but specify each tool individually.
     
  19. Offline

    Krispy

    Hmmm, that'll be quite cumbersome for some blocks. I'm guessing the way you set up the plugin it wouldn't be possible to just toggle off it automatically overriding the default drop.
     
  20. Offline

    cyklo

    Unfortunately yes, otherwise there's no logical way of specifying multiple drops per block while still leaving the original drop as an on/off toggle. However, the block will drop its regular drop for any unspecified tools.

    I will soon be adding the ability to specify a "group" of tools though to make this much less cumbersome, so hang on a couple of days. Something like:
    Code:
        BLOCK:
            - tool: [THIS_TOOL, THAT_TOOL, ALSO_ANOTHER_TOOL]
              drop: ORIGINAL_DROP
              chance: 100
    
    Something like that.
     
  21. Offline

    Krispy

    That'll be excellent, thank you.
     
  22. Offline

    gazius

    Can someone clarify whether you can alter what mobs drop when killed? If you can, could an example be provided?

    Could an example for the dye also be provided?
     
  23. Offline

    Kaseki

    I've written a Python script which will output your otherblocks config.yml as big ugly HTML table.
    You can edit CSS styles to make it look nice and then use it on a MineCraft website, for example.

    Get it here: otherblocksTable.7z

    I've written it in Python 2.6 (probably works with other versions of python as well, but ymmv) and it requires the PyYAML module which you can get here: http://pyyaml.org/

    Kill a pig with a gold sword, 3 * 50% chance for grilled pork:
    Code:
        CREATURE_PIG:
            - tool: GOLD_SWORD
              drop: GRILLED_PORK
              chance: 50
            - tool: GOLD_SWORD
              drop: GRILLED_PORK
              chance: 50
            - tool: GOLD_SWORD
              drop: GRILLED_PORK
              chance: 50
    
    As for the dyes, this would make a lapis block yield 16 blue dyes when harvested with a gold pickaxe:
    Code:
        LAPIS_BLOCK:
            - tool: GOLD_PICKAXE
              drop: DYE
              color: BLUE
              quantity: 16
    
     
  24. Offline

    Mimsy

    I can't get slimes to spawn from digging dirt. Using the exact same code, cows spawn just fine. CREATURE_SLIME, just like it says. I even tried going down to bedrock 'cause normally they can't spawn so high. Any clues?
     
  25. Offline

    Aro2220.com

    Oh wait...you've already done this. SWEET!!!
     
  26. Offline

    cyklo

    Unfortunately not... Ghasts also appear to have the same problem. Just checking you're not on peaceful?

    EDIT: can you get other hostile mobs (zombies/spiders) to spawn?
    --- merged: Feb 28, 2011 12:57 PM ---
    Added in 0.4.5, same syntax as in my original reply:

    Code:
    otherblocks:
        STONE:
            - tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
              drop: STONE
              quantity: 1
              chance: 100
    
     
  27. Offline

    RUtaq

    I have a newb question.

    I know this MOD allows you to add and customize what drops when a Block is broken but is there a way to prevent the Default items that Minecraft drops.

    For example:

    I wanted to stop Saplings from dropping from leaves and instead give a small chance of finding an apple and if the player is not using an Item give then a chace to find a stick.


    Code:
    
      LEAVES:
                - tool: ALL
                  drop: APPLE
                  quantity: 1
                  chance: 1
                - tool: AIR
                  drop: STICK
                  quantity: 1
                  chance: 10
    
    
    When I tested this out it worked great, except that about 1 out of 12 Leaves would still drop a Saplings as well as a chance at an Apple or Stick if the player was not holding an item.

    Is there an option to disable the Minecraft default drop for a particular Block and instead only drop what has been specific in the config.yml ?
     
  28. Offline

    enkryptor

    OtherBlocks does override it. Try to move your "ALL" option to the end of the list.
     
  29. Offline

    cyklo

    BEFORE YOU DO THIS, UPGRADE TO 0.4.6 OR FOLLOWING THESE INSTRUCTIONS WILL BREAK YOUR MAP

    Something has to drop with 100% certainty for OtherBlocks to override the default behaviour, otherwise it drops back to whatever Minecraft wants to do. So to do this, you need to drop AIR with 100% chance to stop the sapling from being dropped:

    Code:
    otherblocks:
        LEAVES:
            - tool: ALL
              drop: APPLE
              chance: 5
            - tool: ALL
              drop: AIR
              chance: 100
    Make sure you have upgraded or dropping AIR in versions below 0.4.6 will break your map!
     
  30. Offline

    enkryptor

    Can I just do "chance: 0" for any default drop?
     
  31. Offline

    cyklo

    A "chance: 0" statement doesn't do anything.
     

Share This Page