Commitment

This commit is contained in:
WayofTime 2014-12-13 19:17:38 -05:00
parent ef82b68a16
commit d8f267b7e3
8 changed files with 353 additions and 190 deletions

View file

@ -41,6 +41,8 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.items.ILPGauge;
import WayofTime.alchemicalWizardry.common.items.sigil.DivinationSigil;
import cpw.mods.fml.common.FMLCommonHandler;
public class SpellHelper
@ -95,6 +97,35 @@ public class SpellHelper
return false;
}
public static boolean canPlayerSeeLPBar(EntityPlayer player)
{
if (player != null)
{
for(int i=0; i<4; i++)
{
ItemStack stack = player.getCurrentArmor(i);
if (stack != null)
{
Item item = stack.getItem();
if (item instanceof ILPGauge && ((ILPGauge) item).canSeeLPBar(stack))
{
return true;
}
}
}
ItemStack heldStack = player.getHeldItem();
if (heldStack != null && heldStack.getItem() instanceof DivinationSigil)
{
return true;
}
}
return false;
}
public static List<Entity> getEntitiesInRange(World world, double posX, double posY, double posZ, double horizontalRadius, double verticalRadius)
{