Fixed Entchanted Books in magic absorber

This commit is contained in:
Blood-Asp 2016-06-19 20:36:49 +02:00
parent 20201d069a
commit 6b556371aa

View file

@ -199,8 +199,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
for (int i = 0; i < tEnchantments.tagCount(); i++) {
short tID = ((NBTTagCompound) tEnchantments.getCompoundTagAt(i)).getShort("id");
short tLevel = ((NBTTagCompound) tEnchantments.getCompoundTagAt(i)).getShort("lvl");
if ((tID > -1) && (tID < Enchantment.enchantmentsBookList.length)) {
Enchantment tEnchantment = Enchantment.enchantmentsBookList[tID];
if ((tID > -1) && (tID < Enchantment.enchantmentsList.length)) {
Enchantment tEnchantment = Enchantment.enchantmentsList[tID];
if (tEnchantment != null) {
getBaseMetaTileEntity().increaseStoredEnergyUnits(
1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true);