Fixed check on unbreakable blocks for Crusher ritual, added event for items draining the SN
This commit is contained in:
parent
42afd64e30
commit
40a45be05e
12 changed files with 293 additions and 16 deletions
|
@ -3,7 +3,9 @@ package WayofTime.alchemicalWizardry.common.items;
|
|||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -127,6 +129,11 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int) (blockVec.xCoord);
|
||||
|
@ -181,7 +188,6 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
}
|
||||
}
|
||||
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 10000);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -203,7 +209,10 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20);
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 20))
|
||||
{
|
||||
this.setActivated(par1ItemStack, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue