[INACTIVE][ADMIN/GEN] DropEdit v1.4.4 - Get different drops when destroying blocks [818]

Discussion in 'Inactive/Unsupported Plugins' started by NuxlyStardust, Apr 1, 2011.

  1. Offline


    DropEdit - Get different drops when destroying blocks
    Version: v1.4.4 (05/21/2011)
    Tested on: 798

    This is my first plugin. It allows you to define what your players get when
    they destroy certain types of blocks with a given tool.

    A good use for it is to allow your players to get sponge or nether blocks
    without having to use portals.

    This plugin was inspired by Jerry's NetherBlocks. I wanted the ability to
    add more blocks without having to edit the code every time. If you only want to use blocks from the Nether on a server where it can't be accessed, I recommend you to use his plugin instead, which will be more lightweight as its use is more specific.

    I would like to thank sk89q for his help, and all of you for your support and for reporting bugs.

    • Make anything drop from broken or burned blocks, or decaying leaves.
    • A random number of items can be dropped.
    • You can define what percentage of chance players have to get a certain item.
    • Support for wool color and dye type.
    • Support for Permissions.
    • Support for CraftbukkitUpToDate.
    • Compatible with WorldGuard.
    How to configure:
    All details are given on the Wiki. A sample config file is joined with the plugin.

            id: 348
            min: 1
            max: 3
            chance : 100
                - *
                - GlowstoneDust
    With this setup, if you destroy (break) a grass ('2') block with a
    gold shovel ('284'), you will always (chance: 100) get
    1 to 3 (min: 1; max: 3) of glowstone dust (id: 348).

    For each item, only the "id" key is required, all other are optionals.

    The event here is "break". You can also use "burn", and "decay". These last two don't require a tool, so the list of items must appear in the block's section.

    Event > Block
    The block here is '2'. You can set it to '*', to refer to any block.
    You can also restrict the event to certain damage value by separating the two values with a comma. For example, '35,11' is a blue wool block.

    Event > Tool
    If you set the tool to * (or '*', both will work), the specified item will be dropped regardless of the tool used to destroy the block.
    Just like with the block, you can set a damage value.

    Item > Durability
    "durability" is optional (Default: 1). It allows you to select the wool color of type of dye
    you want.

    Item > Groups
    "groups" is optional (Default: '*'). It allows to define custom drops that will apply only for given groups. You need the Permissions plugin for that. This feature has been tested on Permissions 2.5.5.
    If Permissions is not installed, this field will be ignored.
    A list is expected, so you should use the list notation (as showed in the example above) even if you want to specify only one group.

    Item > Message
    "message" is optional (Default: none). It allows you to define a message that will be sent to the player. I strongly recommend that you use it only for very rare items, and only for the "break" event. Otherwise, the chat will overflow with messages from the plugin.

    Important: The configuration file structure has changed in v1.4.0, do not forget to update your config.yml file.

    Latest version - Source Code - Wiki
    Old versions: 1.4.3 - 1.4.2 - 1.4.1 - 1.4.0 - 1.3 - 1.2 - 1.1

    Permissions Plugin

    Getting help & reporting problems:
    I 'll be glad to help you if you're having difficulties using my plugin, just post your questions in this thread.
    I will be able to help you faster if you provide the following:
    • A precise description of your problem, and explanations on what you are trying to do.
    • Your config file (if it is too long to post here, use codepaste.net).
    • A quick list of the other plugins you are using. Certain problems can be caused by conflicts between plugins.
    • Any particular output of my plugin visible in the logs (exceptions or other messages).
    Before you post, make sure that you are using the latest version of my plugin. The most recent version is indicated at the top of this post. I can't offer support for old versions. Also check that you are using the Bukkit's latest recommended build.

    Known Issues:
    • You will not always get items from burning blocks because they may be destroyed by the fire.
    • Exceptions will be thrown if the Permissions config file doesn't contain any group. This is a problem in the Permissions plugin, I can't do anything about it.
    • You can't use it to get spawners when you break them. If you need to work with spawners, I suggest CreatureBox.
    I can't tell for sure when the next version will be available.
    • iConomy support
    Information for developers:
    Used events: BLOCK_BREAK (High), BLOCK_BURN (High), LEAVES_DECAY (High)
    This plugin will not cancel any event.
    You can simulate any of these events using the appropriate methods in the plugin class (breakBlock, burnBlock, blockDecays).

    Version 1.4.4 (05/21/2011)
    • Added "message" parameter, be careful with it (Requested by m5k).
    Version 1.4.3 (05/05/2011)
    • Fixed potential compatibility problem with the next versions of WorldGuard (thanks to sk89q)
    • Added methods to the main plugin class to allow other plugins to interact with DropEdit.
    Version 1.4.2 (05/02/2011)
    • Fixed compatibility problems with WorldGuard (Reported by JacKlink01).
    • Fixed potential compatibility problems with other plugins, Residence is likely working now.
    Version 1.4.1 (04/27/2011)
    • Fixed a bug that caused the Minecraft client to crash if the config file contained invalid YAML syntax. Yes, really.
    • Works with 733.
    Version 1.4.0 (04/24/2011)
    • Changed config file structure.
    • Added leaves decay event.
    • Added ability to restrict blocks and tools to a certain damage value.
    • Added support for CraftbukkitUpToDate (will be ready soon).
    • Added properly working way to make multiple items drop for the same event.
    • Tested on 684. Works.
    • Created a Wiki: https://github.com/NuxlyStardust/DropEdit/wiki
    Version 1.3.4 (04/14/2011)
    • Updated for 677.
    Version 1.3.3 (04/12/2011)
    • Fixed a bug that prevented the plugin from dropping multiple items of the same type.
    Version 1.3.2 (04/09/2011)
    • Fixed a bug that caused undefined blocks not to drop anything. (Reported by DjinnRutger)
    Version 1.3.1 (04/08/2011)
    • Fixed a bug that caused the iron hoe not to get damage when used to break blocks.
    • Fixed a bug that prevented the plugin from dropping multiple different items.
    • The config file structure has changed ! Make sure to update your file. This structure is temporary and will be replaced by a more tidy one in the next version.
    Version 1.3.0 (04/05/2011)
    • Added ability to make block drops a certain item regardless of the tool used. (Idea by Andrew0085)
    • Added ability to restrict drops to more than one group. (Requested by Andrew0085 and SpyDaniel)
      • Replaced "group" by "groups" in the configuration, do not forget to update your file !
    Version 1.2.1 (04/03/2011)
    • Fixed a bug that caused hoes to be unbreakable. (Reported by Leemur)
    Version 1.2.0 (04/03/2011)
    • Added ability to restrict drops to certain groups. Uses the Permissions plugin.
    Version 1.1.0 (04/02/2011)
    • Added ability to select what item is dropped when a block is destroyed by fire.
    • Added support for dyes/wool color.
    Version 1.0.1 (04/02/2011)
    • Renamed project to DropEdit.
    Version 1.0.0 (04/01/2011)
    • First build.
    [​IMG] - Thanks a lot for your support !
  2. Offline


    Yea I've noticed that only the outer blocks of leaves drop something. You may also notice that it does not always work when you break blocks of ice that are close to the land.
    It's an issue with the server and I've yet to find why it does this, so there's nothing much I can do about it.
    I suggest that you increase the amount of leaves blocks that should drop, to compensate.
  3. Offline


    Ok thx. My server aint ready anyway, so i'll wait on a fix.
  4. Offline


    The config is a little bit confusing for me. If somebody here could lend me a hand that would be great. All I need to do is:

    "Instead of reeds dropping reeds, drop sugarcane, when destroyed with an iron block "

    I'm using bukkitpiston.
  5. Offline


  6. Offline



    At the moment, when broken with a piston it drops the "block" form of it, id 83. I need the item , id 338

    In other words

    "when block 83 is broken, give 338 instead of 83"
  7. Offline


    Well there's no event that is called when a... piston destroys a block so I can't add that feature sorry.
  8. Offline


    I'm not talking about a piston specifically.

    I'm just talking about when the read is broken by anything. Changing it from reed (block, id 83) to sugar cane (item, id 338)

    And the piston is an iron block btw. But it doesent matter. I mean by anything
  9. Offline


    If I set up leaf decay to occasionally drop something else, will I also have to reconfigure it to drop saplings again? Or does it not overwrite the sapling drops when adding custom decays?
  10. Offline


    There are only specific events, like for when a block is destroyed a player, by fire, or because it decays. There's no event that is called when a block is broken no matter how.

    If I remember correctly, you'll have to configure it to drop saplings.
  11. Offline


    Hi Nuxly, I'm back :( Do you have any time to check on my problem?
  12. Offline


    Is this plugin compatible with the latest recommended build? (818)
  13. Offline


    Sorry but I really don't have time to work on it right now.

    Yup, it doesn't use much advanced stuff from cb so there's no reason it would stop working over time.
  14. Offline


    Greets NuxlyStardust.

    Just using your plugin, it's great! Just a question, I don't know if it is a feature request or I just don't understand YAML enough.

    I am trying to make it so that if you destroy stone, you have a chance to drop Moss Stone.

    At the moment I have it so there is a 5% chance that this will occur, however it will drop both a stone AND moss stone. Is it possible that if it does drop moss stone that it will not drop a stone?

    Is it possible to have if conditions in YAML? or possible written into the mod. This would be great that if you could destory a stone block that is next to water, chances are you will get a moss stone. OR if the light level is < a # you could also get a moss stone.

    I know its a big question but I think this mod has so much potential :) Already just using it for the chance at extra moss stone :)

  15. Offline


    Hey :)
    This feature has already been requested but I don't have the time to implement it right now, sorry :/
    goverlie likes this.
  16. Offline


    Hi, quick question, not sure if it's already been asked. Could the chance percentage be a decimal, like 0.1%? I can't test this, so I'd like to know before I put the plugin on my server. Thanks.
  17. Offline


    Quick reply, thanks Nuxly.
  18. Offline


    Nop, didn't think anyone would need so much precision o_o
  19. Offline


    Thanks for the fast response, I think this would be a nice addition. I was thinking along the lines of 1 in 1000 stone you could get a diamond or something. 1 in 100 would be far too common.
  20. Offline

    Lunar Delta

    This has issues with Log Block. Any block that has its drop edited can't be rolled back. (The destruction of the block is still logged, however).
  21. Offline


    Is DropEdit still working with b860? :)
  22. Offline


    Its ready?

    P.S after testing we found this plugin a little bugged. Items with chance 20% drops 6 from 10 average. Try use own-writting random number generator?
  23. Offline

    Simon Welker

    This is great! And I like that it has a very easy to understand wiki on Github.

    One question though: Could you add Residence support, so admins could set for a residence to drop nothing when mined? (e.g. for a Spleef Arena, this would be great...)

    Thanks in advance!
  24. Offline


    I'm not sure if it is 860 doing it, but none of the blocks I set in the config are dropping, not even stone or wood stairs. I wanted to use this to replace a bunch of mods on my server for special drops (appletree and dropplugin specifically). It seems though that none of it is working. It throws no errors, but it doesn't drop the block I specify, and it is still dropping the old block.

    Here is my config file:

            id: 53
            id: 67
            id: 6
            durability: 0
            min: 1
            max: 1
            chance: 20
            id: 6
            durability: 1
            min: 1
            max: 1
            chance: 25
            id: 6
            durability: 2
            min: 1
            max: 1
            chance: 25
            id: 260
            min: 1
            max: 1
            chance: 1
            id: 322
            min: 1
            max: 1
            chance: 0.1
            id: 280
            min: 1
            max: 2
            chance: 5
            id: 31
            durability: 2
            min: 1
            max: 1
            chance: 1
            id: 351
            durability: 3
            id: 351
            durability: 3
            min: 1
            max: 1
            chance: 5
               - Apple
               - GoldenApple
               - AppleSapling
               - Stick
               - Fern
               - Stick
               - SpruceSapling
               - Stick
               - BirchSapling
               - GoldenApple
               - Stick
               - Stick
               - Stick
               - CocoaChance
               - Apple
               - GoldenApple
               - AppleSapling
               - Stick
               - Fern
               - Stick
               - SpruceSapling
               - Stick
               - BirchSapling
               - Cocoa
                - WoodenStairs
                - WoodenStairs
                - WoodenStairs
                - WoodenStairs
                - WoodenStairs
                - StoneStairs
                - StoneStairs
                - StoneStairs
                - StoneStairs
                - StoneStairs
    I forgot list of plugins, sorry:

    DropEdit - this one
  25. Offline


    Howdy all, as this plugin hasn't been updated in a month and the developer hasn't logged in (according to the last seen bit) for 3 weeks I thought I might answer a couple of queries for things that the OtherBlocks plugin does.

    OtherBlocks can do a basic separate drops config, working on a feature to make this easier but currently you could try this in OtherBlocks:

                - tool: ALL
                  drop: NOTHING
                - tool: ANY_PICKAXE
                  drop: COBBLESTONE
                  chance: 95
                - tool: ANY_PICKAXE
                  drop: MOSSY_COBBLESTONE
                  chance: 5
    The conditions thing sounds really cool, I'll probably implement simple lightlevel, adjacent and ylevel conditions in the short term and possibly look into more complicated and/or/not statements later. Thinking of something like this:
                - tool: ALL
                  drop: MUSHROOM
                  lightlevel: <4
                - tool: ANY_PICKAXE
                  drop: DIAMOND
                  ylevel: <20
                  chance: 0.1
                - tool: ANY_PICKAXE
                  drop: MOSSY_COBBLE
                  adjacent: WATER
                  chance: 5

    This should be ok in OtherBlocks with the ALL tool:

                - tool: ALL
                  drop: SUGAR
    Not currently possible to make this occur for pistons only though - will look into the event that occurs with them.

    This seems like a problem that I just fixed in OtherBlocks - basically leaf data for a generic tree might be "0" but the "fourth bit" in the data byte is set whenever it needs to check for decay (eg. just after a leaf next to it has been broken) and then the data is "8". You need to take this into account whenever the block=LEAVES.

    OtherBlocks can support a percentage down to about ten decimal places - though I'm not sure anyone would bother that far I've used 0.006 in my own configs for golden drops, like to keep them rare :D

    If there is no further activity on this plugin please consider taking a look at OtherBlocks.
  26. Offline


    I do kind of find advertising on other people's threads to be in poor taste, and if the plugin was updated for 818, it hasn't been a month. 818 hasn't been out that long. However, if it is no longer being updated, then I thank you. Do be careful, but I will give your plugin a shot. I just find redoing my config a little bothersome.
  27. Offline


    This plugin has more functionality than otherblocks, however it's conflicting with mcmmo. Players do not gain exp from mining the edited drops.
  28. Offline


    It may support 818 however I assume that's just a thread update as the last version released in the top post was on the 21/5/2011. Nuxly still hasn't been active on the forum since June 03.

    Whilst I do agree that advertising on other threads is generally not done I don't feel that answering a few queries that haven't been answered in days to weeks (Lunar Delta's query was two weeks old) and pointing out an alternate (I did not proclaim to be better) plugin is an issue. Note that I also provided pointer to fix the leaves bug in the case that Nuxly does return.

    I would also be quite happy for someone to post similarly in my thread (posting "my plugin is better" is in poor taste but posting "here's an alternate plugin and here are differences" would be fine by me).

    I do realise that DropEdit has support for permission groups plus WorldGuard and possibly Residence support (haven't tested this plugin though) however OtherBlocks supports mobs, vehicles, paintings, iConomy & boseconomy, conditions such as world, time & weather plus new events.

    Given this I find it a little odd to say that DropEdit has more functionality. I'd certaintly agree it has different and to some people more important functionality. I wouldn't say that OtherBlocks is better than this plugin nor would I say that this plugin is better than OtherBlocks.

    Can you please describe (for the benefit of others that may wish to compare the two plugins) what other functionality you see differs?
  29. Offline


    Yeah, like I said, I am actually glad you did. I am using yours now, and am happy with it. I've already voice my opinion on some of the features you have, so I won't go back into them. While DropEdit was easier for me to use, it's a one time setup really for my needs. It was faster for me to set up in Otheblocks than to wait for an update here.

    Again, thank you. You helped me out of a bind. Although, to DropEdit's creator. Now that I have made the switch, I am not likely to come back. Please keep your plugins functional, as I would still be using yours otherwise.
  30. Offline


    Will you update to 1.7_02?
    KanzenIgiari likes this.
  31. Offline


    is this plugin unsupportet?

Share This Page