Fixed the Mana Enchanter ignoring enchantment types (Power on swords, Sharpness on armor, etc)

This commit is contained in:
Lizbeth Rika committed 2014-08-22 18:18:21 +01:00
1 parent 4d2e3cf70e
commit 328798faec
1 file changed
+1 -1
@@ -132,7 +132,7 @@ public class TileEnchanter extends TileMod implements ISparkAttachable {
NBTTagCompound enchant = enchants.getCompoundTagAt(0);
short enchantId = enchant.getShort("id");
short enchantLvl = enchant.getShort("lvl");
if(!hasEnchantAlready(enchantId)) {
if(!hasEnchantAlready(enchantId) && isEnchantmentValid(enchantId)) {
this.enchants.add(new EnchantmentData(enchantId, enchantLvl));
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "botania:ding", 1F, 1F);
addedEnch = true;