DropSwap
Kalem's
DropSwap
Kalem's DropSwap plugin is a Bukkit server mod that monitors creature deaths and block breaking, looks at the drops, then swaps items and quantity.
____
Updated for Bukkit 1.5.1 R0.1
Tested and working with Bukkit-1.5.2-R0.1 (Build #02754)
____
Features:
- Select creatures/blocks to monitor
- Specify drops to monitor
- Swap existing drops (Have spiders drop web instead of string!).
- Add new drops (Have zombies drop feathers again!).
- Remove drops (No more rotten flesh!).
- Give a range for the minimum and maximum number of additional/swapped items to drop.
- Set the chance for an add/swap/remove attempt to be successful.
____
Simple to set up:
After putting dropswap.jar in you server's plug-in folder, reload your server to create the default config.yml file. By default, DropSwap will add feathers to Zombie drops 50% of the time, and will turn Spider drops of string into Spider drops of web.
To modify DropSwap, just edit the config.yml file in the plugins/DropSwap folder using the following options:
LOGGING SETTINGS
- INFO - Show all information to the console
- SEVERE - Reduce logging to only errors (default)
[Must be upper case]
PERMISSION SETTINGS
PERMISSIONS: REMOVED! Causing too many complications and kept me from keeping plug-in up to date.
DROPSWAP SETTINGS
- ENTITY|MATERIAL:SUB, ACTION: <DROP ITEM>:SUB, <SWAP ITEM>:SUB, <CHANCE>, <MIN>, <MAX>
- ENTITY: the string name of the monster/creature/animal to modify (required)
(use ALL for ENTITY to include all creatures including farm animals, pets, etc)
NOTE: ENTITY must be the string name of the creature
(use ANY(no sub-type) for MATERIAL to include any block including leaves, grass, flowers)
NOTE: MATERIAL can be the string name or the integer ID of the block
- SUB: Separated from the blocks by a COLON(:), the SUB-ID allows selection of sub-types (optional - integer only)
- ACTION: choose from additem|swapitem|removeitem (required)
- DROP ITEM: original item that entity drops (required for swapitem|removeitem)
- SWAP ITEM: item that is swapped for original item (required for additem|swapitem)
- CHANCE: a floating number (decimal required) for chance that add/swap/remove will occur (required if using max or min/max)
- MIN: the minimum number of swap items to allow (must come before max if used, 1 is min if not used)
- MAX: the maximum number of swap items to allow (required if min is used, can be equal to min)
____
Config.yml Example
dropswap:
- ALL, additem, GOLD_NUGGET, .10
- SPIDER, swapitem, STRING, WEB, 1.0, 1
- ZOMBIE, additem, FEATHER, .50
- ZOMBIE, removeitem, ROTTEN_FLESH, 1.0
- SQUID, additem, RAW_FISH, 0.8
- GLASS, additem, GLASS, 1.0
- LOG:2, swapitem, 17:2, 17:3, 0.5
____
Future:
- Suggestions welcome
____
I'd love to hear from you
Kind and constructive feedback is appreciated. Tickets will be responded to as soon as I can. No plug-in compatibility has been tested.
____
Cheers,
- Kalem
@_700_
The name of items is always one word. Try adding an underscore between the words if you want to make a guess. Or just use the item data value instead:
Gold nugget is GOLD_NUGGET or 371
Go to http://www.minecraftwiki.net/wiki/Data_values for more information about data values.
@thudog77
There is no test for the state of a monster when it dies or what kills it. If you want a creeper egg, do the following:
- CREEPER, additem, 383:50
or
- CREEPER, additem, MONSTER_EGG:50
The data value of MONSTER_EGG is 383. The sub-type (aka 'damage') determines the type of monster egg.
Of course you can choose to swap item instead of additem as well as add a chance, min,and max.
Go to http://www.minecraftwiki.net/wiki/Data_values for more information about data values.
How would I add items that have two words? (gold nugget glowstone dust etc...)
How would i get a charged creeper to drop a creeper egg?
@minepro97
@Guarana_SUI
Should be working now. Sorry the logging was so difficult to figure out. Default is now SEVERE.
@Guarana_SUI
Set logging from "ALL" to "SEVERE" to stop the spamming. I have the same problem, I had this plugin working with: - DIAMOND_ORE, swapitem, DIAMOND, IRON_ORE, 1.0
Then I updated it and now it will not work at all.
Can any one actully get this plugin to work? im trieing to change/remove the sonw_ball drop from the snowblock.
- SNOW_BLOCK, swapitem, SNOW_BALL, SNOW, 4.0
the only thing thats work is
- SNOW_BLOCK, additem, SNOW, 1.0
also the consol is getting spammed like hell evry time a player breaks a block, this is absolutly stupid, and makes checking conosl during the game absolutly usless. becaus it just get spammend iwth DropSwap all the way. Imagen with 100+ player online...
Hi, I'm trying to make endermen drop eyes of ender, but it isn't working, here's the config line;
- ENDERMAN, swapitem, ENDER_PEARL, ENDER_EYE
@Deadlock989
Hello deadlock,
That is correct and as designed. When players use TNT, lava, water, or pushing mobs to their death. There is no reasonable way to identify that the action was taken by a player and not just a natural part of the game.
I could consider adding a flag to turn off all non-player related drops. This means that when a player DOES have permission to kill a mob, doing so by indirect means will cancel the drop. I imagine this has undesired affects as well.
- Kalem
Finding that permissions is being ignored in cases when animals/mobs die of "natural causes" (falling, fire damage). They drop the DropSwap drops even if permissions checking is enabled.
Hi man, I love your pugin. I found a bug about swapdrop not working. When I use this code, the cavespiders still drop string:
- CAVESPIDER, swapitem, STRING, WEB, 1
additem and removeitem work fine. Also im getting quite a few errors like these:
[Server] SEVERE [DropSwap] onEntityDeathEvent - EXCEPTION: null
Idk if this is any harm, but it annoyes me a little when the console is spammed with it.
the removeitem thing doesent work.
- LOG, removeitem, 17, 1.0
logs still droping logs.
@don97322
Hi Don,
That seems to have fixed it. Thank you very much.
@Deadlock989
Hello Deadlock,
Thank you for finding this error. I believe it is fixed for DropSwap 2.0.3. The problem what that I was not clearing the original item stack when adding new items. Please test again and let me know about any other problems you encounter.
The odd thing is - it doesn't happen for sheep. Only pigs and cows. I'm getting 4 chops from a pig and either 4 or 6 steaks from a cow. It happens with zombies and creepers but not pigzombies.
@Deadlock989
Hello. Can you give me the config.yml line that I could use to reproduce this?
Thanks.
Seem to be getting double "vanilla" drops from animals with additem drops?
Many thanks for that last update :D
Updated to 2.0.2 to fix bugs:
- Fixed additem not working
- Fixed retaining drops when no swap or remove is found
Updated log formatting