Fixed check on unbreakable blocks for Crusher ritual, added event for items draining the SN

This commit is contained in:
WayofTime 2014-11-06 21:25:53 -05:00
parent 42afd64e30
commit 40a45be05e
12 changed files with 293 additions and 16 deletions

View file

@ -130,6 +130,11 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
{
return par1ItemStack;
}
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000))
{
return par1ItemStack;
}
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
int posX = (int) (blockVec.xCoord);
@ -184,7 +189,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
}
}
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000);
return par1ItemStack;
}
@ -207,7 +211,10 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
{
if (!par3EntityPlayer.capabilities.isCreativeMode)
{
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20);
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20))
{
this.setActivated(par1ItemStack, false);
}
}
}