Added sentient armour gem recipe. Added ability for Tartaric gems to fill other gems.

This commit is contained in:
WayofTime 2016-01-26 07:56:17 -05:00
parent e2a007d932
commit 1242fefc30
8 changed files with 67 additions and 6 deletions

View file

@ -7,12 +7,14 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.soul.IDemonWill;
import WayofTime.bloodmagic.api.soul.IDemonWillGem;
import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler;
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import WayofTime.bloodmagic.util.helper.TextHelper;
@ -37,6 +39,17 @@ public class ItemSoulGem extends Item implements IDemonWillGem
return super.getUnlocalizedName(stack) + names[stack.getItemDamage()];
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
double drain = Math.min(this.getWill(stack), this.getMaxWill(stack) / 10);
double filled = PlayerDemonWillHandler.addDemonWill(player, drain, stack);
this.drainWill(stack, filled);
return stack;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list)