Enchantments
Enchantments
- Note: As of 2.8-beta2 you can enable "enchantments_use_unsafe to allow any enchantment on any tool; and, you can enable enchantments_ignore_level to allow enchantment levels above the normal max level.
When you specify an enchantment on an item, the format looks like this (<> means required, [] means optional):
<ItemName>@[DamageValue]!<EnchantmentName1>#[EnchantLevel1]!<EnchantmentName2>#[EnchantLevel2] etc.
An example would look like this:
GOLD_SWORD@!DAMAGE_ALL#2!FIRE_ASPECT#5 (A gold sword with sharpness II and fire aspect V)
The default enchantment level is 1, if not specified.
As tools
Enchantments can be used as a tool condition - eg:
SKELETON: - tool: DIAMOND_SWORD@!DAMAGE_ALL # this means it will only perform this drop if an appropriately enchanted diamond sword is used drop: DIAMOND
As drops
Enchantments can also be dropped by adding them after the tool, weapon or armour's data value. Even if you add no data value you still need the "@" symbol before adding the enchantment with the "!" symbol - eg.
ZOMBIE: - drop: DIAMOND_SWORD@!DAMAGE_ALL#4!FIRE_ASPECT#2/1/1% # this will drop 1 enchanted weapon (damage all level 4 and fire aspect level 2) with a 1% chance of drop
Values you can use (check here for Bukkit's most up-to-date list):
Enchantment name | Tool | Startlevel | Maxlevel |
---|---|---|---|
ARROW_DAMAGE | BOW | 1 | 5 |
ARROW_FIRE | BOW | 1 | 1 |
ARROW_INFINITE | BOW | 1 | 1 |
ARROW_KNOCKBACK | BOW | 1 | 2 |
DAMAGE_ALL | WEAPON | 1 | 5 |
DAMAGE_ARTHROPODS | WEAPON | 1 | 5 |
DAMAGE_UNDEAD | WEAPON | 1 | 5 |
DIG_SPEED | TOOL | 1 | 5 |
DURABILITY | TOOL | 1 | 3 |
FIRE_ASPECT | WEAPON | 1 | 2 |
KNOCKBACK | WEAPON | 1 | 2 |
LOOT_BONUS_BLOCKS | TOOL | 1 | 3 |
LOOT_BONUS_MOBS | WEAPON | 1 | 3 |
OXYGEN | HELMET ONLY | 1 | 3 |
PROTECTION_ENVIRONMENTAL | ARMOR | 1 | 4 |
PROTECTION_EXPLOSIONS | ARMOR | 1 | 4 |
PROTECTION_FALL | BOOTS ONLY | 1 | 4 |
PROTECTION_FIRE | ARMOR | 1 | 4 |
PROTECTION_PROJECTILE | ARMOR | 1 | 4 |
THORNS | ARMOR | 1 | 3 |
SILK_TOUCH | TOOL | 1 | 1 |
WATER_WORKER | HELMET ONLY | 1 | 1 |
(tool = pickaxe/shovel/axe)
Question! Is it possible to set it to drop an enchanted item beyond the Maxlevel? Say a Level 3 ARROW_FIRE?
@ezbik
Didn't see this message earlier - wish dev.bukkit would alert me to all comments :\
Anyway, long time coming but yes, this is now possible with an option in the config file. You can also enable unsafe enchantments:
I don't know what I have made wrong, but my setup is not working. I want a gras block to drop an additional clay ball if no silk touch is used.
As a "bonus" I would like to increase the chance, if a spade with fortune is used.
But I can get the first setup running :'( Any help would be very welcome.
I'd just like to add, that when I used drop: DIAMOND_SWORD@!DAMAGE_ALL#4,FIRE_ASPECT#2 as said in documentation it always dropped the item with Sharpness I and none of the specified stats in config.
So to fix it, I had to add ! sign before every enchant name
drop: DIAMOND_SWORD@!DAMAGE_ALL#3,!KNOCKBACK#1 <- this drops a sword with Sharpness III and Knockback I enchantment.
This is probably the unclearest example i've ever seen! I did >> - tool: ANY_PICKAXE@!DURABILITY_ALL
And the durability goes down every block I break even tho it's un unbreaking 10! I enabled unsafe and ignore enchants in config!