[INACTIVE][MECH] CustomDrops v1.3 - Edit drops when breaking blocks [953]

Discussion in 'Inactive/Unsupported Plugins' started by captainawesome7, May 28, 2011.

  1. Offline

    captainawesome7

    CustomDrops - Customize Those Item Drops!
    Version: 1.3
    CustomDrops lets you change what blocks drop what items. That's pretty much it.​

    Usage:
    Config (open)

    The file drops.txt will be created in plugins/CustomDrops/, just edit the file to add custom drops. The file looks like this:
    Code:
    drops:
        '3':
            amount: 1
            id: 3
            durability: 0
    
    Obviously the only one included drops the same as it normally would. To add a block just copy and paste the example and change it to your needs.

    Commands (open)

    There is only 1 command:
    • /cdreload - Reloads the configuration file

    Features:
    • Edit the drops for blocks!
    • You can also use this to nerf tnt!
    • You can also drop nothing!
    Video By Meister:
    Video Demo (open)



    Downloads
    The source code is included in the .jar (me/captain/CustomDrops/)

    Planned Changes
    None
    Changelog:
    Version 1.3
    • Changed config to YAML
    • Added reload command
    • Added durability
    • Fixed WorldGuard regions not working
    Version 1.2
    • Changed the way it drops items, looks much more natural
    • (before I just set the amount of the itemstack, not it spawns separate itemstacks)
    Version 1.1
    • Added the ability to drop nothing with:
    • 1=0;0
    Version 1.0
    • Original Release
    [​IMG] To me to support my plugins :)
     
    Taranis01 likes this.
  2. Offline

    DreadKyller

    I like the idea behind this plugin. Just one suggestion or question? IIf you do not already have it could you make a property for if someone doesn't even want to have it drop something? because dropping air would not work because it causes a server error.
     
  3. Offline

    captainawesome7

    @DreadKyller Sure, wait a few minutes.

    @DreadKyller there you go, just set the id to 0 to drop nothing, like this:
    (When you break stone it doesn't drop anything with this):
    1=0;0

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

    DreadKyller

    Ok, I not using this, but it was just a suggestion. btw, good plugin
     
  5. Offline

    captainawesome7

  6. Offline

    Meister



    made a video for you, hope you will put it in the main post ;)
     
  7. Offline

    captainawesome7

    @Meister Thanks, put it in the op :)
    Nice to see its working on whatever 1.6.4 build of MC that was :D
     
    Meister likes this.
  8. Offline

    Meister

    it's 1.6.5 ;) running the latest bukkit version 815 i think.
     
  9. Offline

    captainawesome7

    @Meister ooh nice! (I didn't even know 1.6.5 was out lol, im a 1.5_1 kind of guy :p )
     
  10. Offline

    DreadKyller

    this plugin looks nice
     
  11. Offline

    Taranis01

    yes, it sounds good :)

    could you add a value for the Item is used when breaking a block? I dont wanna let them break Diamond with their hand if i change the drop!
    maybe also different drops depending on what youre using for breaking the block?
    and also different IDs per Drop, so you can get (for example) 1 Dirt and 1 Seed for breaking Grass.
     
  12. Offline

    DreadKyller

    good point, if you could add min tool strength that would be great. something like:

    1=1;1;WeakestMaterialName;TypeOfTool

    only these things would not be needed, like optional.

    Also if you could add support for MATERIAL_NAMES as well as just the item Id
     
  13. Offline

    captainawesome7

    @DreadKyller I can definitely do the very last thing, as for the rest, maybe :p
     
  14. Offline

    Daniel Few

    @captainawesome7
    You wouldn't be able to add an option for them to go straight to inventory instead of dropping would you, like I requested in my forum post?
    -DanJames
     
  15. Offline

    captainawesome7

    @Daniel Few No. That isn't how it works :/
    I can help you with the pugin if you want to develop it urself.
     
  16. Offline

    Daniel Few

    @captainawesome7 could i use your code and just edit it for my server?
     
  17. Offline

    captainawesome7

    @Daniel Few the code for this plugin has almost nothing to do with what you want (besides the basic structure).
     
  18. Offline

    RugRats

    Compat with worldguards superpick please?
     
  19. Offline

    captainawesome7

    @RugRats I cant edit his code...
     
  20. Offline

    DimsenJonas

    Lol nice plugin! This what i searched for my freebuild server, i've set tnt's drops to 64 fish LOL :D
     
  21. Offline

    nathanaelps

    Feature request: (Or maybe Impossible-Idea-To-Laugh-At?)

    Very simply: Multiple/random drops on a per tooltype basis.

    On my server, I'd love to have complete control over the breaking and dropping of various blocks. After considering it for awhile, I've come to the conclusion that this would mean control over:
    1. What blocks break (BlockID)
    2. How quickly (Time)
    3. With which tools, dropping (ToolItemID)
    4. How many (HowManyToDrop)
    5. of Which items (DropBlockOrItemID)
    Of course, I don't know if all of these are possible. If I knew enough about Java to tell you how--or even if--this is possible, I'd write the plugin myself. (And then give it nuclear-powered binoculars, a mind of pure evil, and a heart... a human heart. So it's probably good that I'm just a dreamer, not a coder.)

    In any case, I envision a config file something like this:

    Faux config:
    ----
    #Comment Line. Important for all config files! This is already featured, though.
    #BlockID=(HowManyToDrop)DropBlockOrItemID;ToolItemID@Time
    #Where any of the IDs may be a comma-separated list and no fields are required except BlockID and DropBlockOrItemID
    1=(1-2)1;[email protected] #It takes .4 seconds to break stone with a diamond pickaxe. It will drop 1-2 stone when one does so.
    1=(0-1)4;256@3 #It takes 3 seconds to break stone with an iron shovel, and it will drop 0-1 cobblestone.
    24=24;278 #It takes the default time to break sandstone with a diamond pickaxe, and drops 1 sandstone block.
    24=(0-1)24;257,270,274,285 #It takes the default time to break sandstone with any other pickaxe, and it drops 0-1 sandstone block
    47=(0-3)340;278@3 #It takes 3 seconds to break a bookcase with a diamond pickaxe, and it drops 0-3 books.
    47=340,(2)280;257@3 #It takes 3 seconds to break a bookcase with an iron pickaxe, and it drops 1 book and 2 sticks.
    41=(0-2)322;260@8 #It takes 8 seconds to break a gold block with an apple, and it drops 0-2 golden apples.
    1,4,24=12;0@3 #It takes 3 seconds to break stone, cobblestone, or sandstone with ones bare hands, but only drops sand
    ----

    Anyway, that would be awesome. I hope it's possible, and not too troublesome. I totally understand if my dreams are bigger than practical... It's happened before.

    They kept telling me that the Plutonium binoculars were just TOO dangerous.
     
  22. Offline

    Pythros

    Umm.. I have configured this to my pleasing and the blocks that don't drop as I wanted are stairs, they still drop either plank cobblestone, or boats.

    I get this:
    Code:
    
    04:35:52 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'cdreload' in plugin CustomDrops v1.3
            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:312)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:480)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:465)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.command.ColouredConsoleSender cannot be cast to org.bukkit.entity.Player
            at me.captain.CustomDrops.CDBB.onCommand(CDBB.java:49)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 6 more
    
    When I upload this:
    Code:
    drops:
        '2':
            amount: 1
            id: 2
            durability: 0
        '53':
            amount: 1
            id: 53
            durability: 0
        '47':
            amount: 1
            id: 47
            durability: 0
        '67:0':
            amount: 1
            id: 67
            durability: 0
        '67:1':
            amount: 1
            id: 67
            durability: 1
        '67:2':
            amount: 1
            id: 67
            durability: 2
        '67:3':
            amount: 1
            id: 67
            durability: 3        
        '333':
            amount: 1
            id: 333
            durability: 0
     
  23. Offline

    captainawesome7

    '67:0': That doesn't work
     
  24. Offline

    Pythros

    MMk... I was trying to figure out why my stairs aren't dropping. Even woodstairs (47) don't drop. Nor do boats... Ideas?
     
  25. Offline

    zenyl

    Ehh... this plugin doesn't do anything at all... It doesn't change block drops...
     
  26. Offline

    captainawesome7

    Guess who's doing it wrong?
     
  27. Offline

    zenyl

    Ehh... The creator of google? :p
    But do you know why it doesn't work?

    Code:
    drops:
        '2':
            amount: 1
            id: 2
            durability: 0
    Edit: It seems to work, but when using the "/cdreload", it disables the plugin...
     
  28. Offline

    Pythros

    Um... Also... this bypasses WorldGuard's regions.......... No longer using this...
     
  29. Offline

    po24

    can i make it so it only drops the item 1 out of every 10 times or something?
     
  30. Offline

    king_life

    WorldGuard regions are not working and I'm using 1.3
     

Share This Page