[INACTIVE][MECH] BlockDrops v2.31 - Add and customize the items anything drops! [185+]

Discussion in 'Inactive/Unsupported Plugins' started by Snowl, Jan 25, 2011.

  1. Offline

    Snowl

    BlockDrops - Add and Customize the items your blocks ANYTHING drops!
    Version: 2.31
    By Request of http://forums.bukkit.org/threads/custom-drops-please.1198/#post-24213

    Ever wanted your dirt to drop a chainmail helmet? Want your sand to drop diamonds? Here's the answer!

    BlockDrops is a plugin that allows you to customize what your vehicles/blocks/mobs drop.

    Features (open)

    Features:
    • *Infinite* Block Drops per block
    • Any block is customize-able
    • Percentage System
    • Drop damaged blocks (different dyes dropped, different cloths)
    • Drop on break of boat/minecart
    • Drop on Creeper Explode
    • Drop on mob death



    Thanks to http://forums.bukkit.org/threads/kitplugin-v1-02-dispense-kits-to-your-players.1201/ for the properties help.

    Available blocks/mobs/vehicles to drop from:
    Blocks (open)

    All blocks, past and future.
    Monsters (open)

    • CreeperExploded
    • Spider
    • Skeleton
    • Zombie
    • Player
    • Cow
    • Chicken
    • Giant
    • Ghast
    • Pig
    • Creeper
    • Sheep
    • Slime
    Vehicles (open)


    • Boat
    • Minecart
    • PoweredMinecraft
    • StorageMinecraft


    How to use BlockDrops:
    How to Use (open)

    Create a file in the directory where CraftBukkit is, called "blockdrops.properties". This is where you adjust what drops what.
    Open up blockdrops.properties
    Add your custom drops. The format for adding drops is
    [Block/Monster/Vehicle];[Block/Item you want to drop]:[Chance for drop (Range 0.0001 to 1.0)]

    Extra options (only for blocks) are
    [Block/Monster/Vehicle];[Block/Item you want to drop]:[Chance for drop (Range 0.0001 to 1.0)]:[Damage the item has (Range from -127 to 127. Normal is 0)]:[Block/Item held to make Block/Item drop]
    You require the damage option if you have the Block/Item option, but both are optional.

    To make a Vehicle/Block/Mob not drop it's normal blocks add [Vehicle/Drop/Mob]=0 to override it.

    An example blockdrops.properties:
    Code:
    #blockdrops.properties
    #Overwrite stone's drops
    1=0
    #Always drop a cake
    1;92:1.0
    #Drop a broken wooden pickaxe 0.1% of the time
    1;270:0.001:100
    #Make a note block drop a boat
    25;333:1.0
    #Make a creeper drop a stone
    Creeper;1:1.0
    #Make a boat return a boat
    Boat=0
    Boat;333:1.0
    

    Changelog (open)
    Changelog:
    Version 2.31:
    • Fixed the WorldGuard and any other protected blocks issue.
    Version 2.3:
    • Fixed a bug where breaking a block but not breaking it at the last millisecond caused it to drop the item
    • Fixed a bug where breaking a block while protected by WorldGuard made it drop the item
    • Added creation of blockdrops.properties on startup
    Version 2.2:
    • Added overwrite for mobs
    Version 2.1:
    • Fixed version issues
    • Fixed Override issues
    Version 2.0:
    • Added dropping from every mob and animal, PoweredMinecraft and StorageMinecraft
    Version 1.5:
    • Added dropping from a boat or minecart when destroyed (besides when broken by itself)
    Version 1.45:
    • Added drops when using a certain tool
    Version 1.4:
    • Fixed a critical bug that would crash the client, stop saving of players data and NPE's after prolonged usage (again PropertiesFile >_<)
    Version 1.3:
    • Added damage for blocks so you can drop different wool colours and wool dyes (An example drop with damage is 1:351:1.0:11
    Version 1.2e:
    • Fixed a bug where propertiesfile overwrit the file.
    • Uploaded new version where fake lag is introduced to fix a bug.
    Version 1.2d:
    • Fixed a bug where destroying a block that had it's normal drop overwritten caused the next block to break slightly faster with a shovel.
    • Changed overwrite setting to [BLOCK]=0
    Version 1.2c:
    • Actually fixed a bug where destroying a block that had its normal drop overwritten destroyed a block next to it properly
    Version 1.2b:
    • Fixed a bug where destroying a block that had its normal drop overwritten destroyed a block next to it
    Version 1.2:
    • Adding 0:0.0 now overrides the normal blocks drop.
    Version 1.1:
    • You can now customize what a creeper drops once it explodes.
    Version 1.0:
    • Infinite block drops per block
    • Drops now drop at the block
    Version 0.7:
    • Bugfixes and in-ability to spawn air (as that corrupts the world)
    Version 0.6:
    • Percentage system implemented
    Version 0.5:
    • One custom drop per block
    Version 0.1:
    • Dropping blocks working
    • Initial Release
     

    Attached Files:

  2. Offline

    GameFAQsRolo

    WorldGuard bug squashed again. Great job. Thank you for the lightning fast response. I went ahead and tested it on CB #312. I can't test on my live server, but that will be getting updated anyway.
     
  3. Offline

    Snowl

    :p Thats good :D
     
  4. Request: can you make it so monsters only drop stuff when killing by players?

    The thing is, i got about 10 player sitting afk in their monster spawner trap. and they sell the loot for other kinds of stuff. i hate when ppl dont do any work, and get unlimited stuff.

    -san
     
  5. Offline

    Snowl

    I have to recode it and even then you lose the ability to over ride the current drop that they drop. I'm waiting for it to be intergrated atm.
     
  6. Offline

    TheDarkness73

    Is it possible to make it drop its normal drop if it doesn't drop the modified item, and make it so it only drops the block that its set too? So that they cant just do it over and over again. Or make it so they lose the item if it fails? Or drop the normal block if you dont have the item in hand that you need to make it drop the item? Is it also possible to edit how many a mob drop, or just change it so that it just replaces feathers with sponges, and keep the percentage and number dropped the same?
     
  7. Offline

    QQCucumber

    I think you'll be happy to see this finally in:

    Code has been updated by Meaglin .
    • [​IMG]
      Meaglin

      Implementation of BlockBreakEvent (version f77e79e55bac124632a9b01e88cd50c4e6c4b415)​
     
  8. Offline

    GameFAQsRolo

    This error popped up a couple times last night on my server with CB #320.
    Code:
    Feb 13, 2011 2:15:52 AM org.bukkit.plugin.SimplePluginManager callEvent
    SEVERE: Could not pass event BLOCK_DAMAGED to BlockDrops
    java.lang.NullPointerException
            at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:29)
            at com.Snowl.bukkit.blockdrops.BlockDropsBlockListener.onBlockDamage(Blo
    ckDropsBlockListener.java:88)
            at org.bukkit.plugin.java.JavaPluginLoader$22.execute(JavaPluginLoader.j
    ava:231)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:60)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:214)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:381)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.a(SourceFile:232)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:317)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:232)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
     
  9. Offline

    Snowl

    Try using [Block/Monster]=0 at the top
    Need to wait for it to be coded in now :(
     
  10. Offline

    TheDarkness73

    What If I want it so its the block doesnt drop if the other block drops?
     
  11. Offline

    TheMap

    Edit: I deleted blockdrop properties and it doesn't do it anymore. I suppose I had too much going on in there and had a semi colon in a colons place?
    --- merged: Feb 14, 2011 5:36 PM ---
    Still trying , its not working. Everytime I add lines to the properties it causes my tools not to break.
     
  12. Offline

    anon

    How to make a sheep drop a red cloth when die?
     
  13. Offline

    wilsonc91

    Plugin doesnt seem to want to load for me when I started the server. Any suggestions? It created the properties file, I edited it but the drop rates aren't changing.
     
  14. Offline

    Ultra695

    When I run my server, I get spammed by error

    SEVERE: Could not pass event ENTITY DEATH to blockdrops (etc etc, I can't post actuall error because log doesn't recod them)

    This is my config file, the error goes away when i clear it so i'm guessing the problem is in here, but I can't find it.

    Code:
    1=0
    1;4:.5
    1;15:.01
    1;14:.005
    1;263:.02
    12=0
    12;12:.5
    17=0
    17;17:.5
    56=0
    14=0
    14;14:.25
    15=0
    15;15:.35
    16=0
    16;263:.5
    2=0
    2;2:.05
    2;3:.95
    3=0
    3;3:.5
    3;2:.01
    18;260:.05
    59=0
    59;296:1.0
    82=0
    82;337:1.0
    78=0
    Pig=0
    Pig;319:.5
    Pig;319:.1
    Cow;319:.5
    333=0
    333;333:1.0
    Creeper;297:.1
    Skeleton;297:.1
    Zombie;297:.1
    Spider;297:.1
    Creeper;265:.1
    Skeleton;265:.1
    Zombie;265:.1
    Spider;265:.1
    Creeper;266:.05
    Skeleton;266:.05
    Zombie;266.05
    Spider;266:.05
    Creeper;350:.15
    Skeleton;350:.15
    Zombie;350:.15
    Spider;350:.15
    Skeleton;261:.1
    Skeleton;262:1.0
    Skeleton;262:.5
    Skeleton;262:.1
    Ghast;49:1.0
    Ghast;49:1.0
    Ghast;49:1.0
    Ghast;264:.75
    Ghast;264:.25
    Ghast;87:.5
    Ghast;88:.5
    Ghast;89:.5
    Ghast;86:.5
    On another note, small slimes(that can't attack you) are invincible, I have no idea whats causing this, any suggestions?
     
  15. Offline

    Snowl

    Replace .5 with 0.5
     
  16. Offline

    Ultra695

    Thats it? Not .75 to 0,75 or .25 to 0.25? should I have a 0 in front of everything? or just .5?
     
  17. Offline

    Snowl

    a 0 infront of everything
     
  18. Offline

    strupan

    is there a mob spawner block in here? i would like my mob spawners to drop diamonds and stuff
     
  19. Offline

    Lap

    You can use any block, including the mob spawner.

    One thing I didn't see answered was if the zombie pigmen can have their drops customized as I don't see that in the list.
     
  20. Offline

    Snowl

    It doesn't trigger ENTITY_DEATH so i cant put it in
     
  21. Offline

    Windwaker

    Lol... i got here just because i typed "rawr" into the search bar...
     
  22. Offline

    ICanHasSoap

    REQUEST
    Could this be somehow tied to the permissions plugin by Nijikokun so I could make blocks drop different stuff for different classes?
     
  23. Offline

    Lap

    Wait, what does "it" refer to? If it's the pigmen shouldn't we just file a bug report to the bukkit team?
     
  24. Offline

    anon

    Is there a way to drop coloured wool?
     
  25. Offline

    burntcustard

    I know you've had quite a few requests recently, but I've got another one. And this ones good.

    Could you make it so that it's possible to have a chance of a *group* of blocks being dropped" I want 1 in every 200 stone blocks to drop a few bones and uncooked meat, and a half broken pickaxe and helmet. Would be cool yes? I'd also like spiders to sometimes drop several redston.. like one for each eye.
     
    DiscipleGeek likes this.
  26. Offline

    DiddiZ

    Yep, you have to set the demage.
    Code:
    21;351:1:4
    I use that to drop lapis lazuli, but it's the same thing with wool
     
  27. Offline

    Euphoriant

    Put in multiple entries for each drop. I dont think you could make it so a whole set of items will drop as is, unless they are all set to 100% drop rate. The best way I imagine you could get around this without an update would be to set certain drops to equal rates, so they at least have some chance to drop together.

    This is a good request, though. The old plugin for hMod could do this sort of thing by simply inputting multiple entries into the same drop like so: 1;4,4,4,4,352,352,352:0.05 <--stone drops 4 cobble and 3 bones 5% of the time.

    Seems like this wouldn't be too hard to implement, but I'm no coder.
     
  28. Offline

    Tosmatobeef

    Works fine for me, except I can't make mobs drop anything :( help!!!
    I'm typing "creeper;266:1" for a 100% chance of gold dropping, and nothing happens when i kill one.
     
  29. Offline

    Snowl

    Use Creeper instead of creeper
     
  30. Offline

    strupan

    EXCUSE ME, but for some reason, my stupid dirt some times drop glow powder and gravel some times drop gun powder before I even found this plugin, wtf? So I downloaded this plugin hoping to fix the loot by adding this


    # Dirt
    2;3:1
    3;3:1

    but it seems that your mod does not take out the effect of other loots ;( because my players are still getting glow powders from stupid dirt some times!


    Any suggestions?
     
  31. Offline

    Snowl

    type 2=0 and 3=0
     

Share This Page