mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-28 15:35:59 +00:00
More progress on getting sigils to follow the events
This commit is contained in:
1 parent
39b4243a82
commit
369ca6440f
5 files changed
+22
-36
No files matched your search
@@ -112,15 +112,10 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
}
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
@@ -148,8 +143,13 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack));
|
||||
this.setLPUsed(par1ItemStack, 0);
|
||||
if(EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack)))
|
||||
{
|
||||
this.setLPUsed(par1ItemStack, 0);
|
||||
}else
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
if (!par3EntityPlayer.onGround && !par3EntityPlayer.isSneaking())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user