Added some effects for the Crushing Ritual when affected by different types of Demon Will (balancing pending)

Also added the LP costs for the Crystal Harvest and Forsaken Souls rituals. You are welcome!
This commit is contained in:
WayofTime 2016-07-11 19:47:19 -04:00
parent c09ad83e53
commit 3dd574b1f7
7 changed files with 158 additions and 11 deletions

View file

@ -470,6 +470,35 @@ public class Utils
return stack;
}
public static int getNumberOfFreeSlots(TileEntity tile, EnumFacing dir)
{
int slots = 0;
if (tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir))
{
IItemHandler handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, dir);
for (int i = 0; i < handler.getSlots(); i++)
{
if (handler.getStackInSlot(i) == null)
{
slots++;
}
}
} else if (tile instanceof IInventory)
{
for (int i = 0; i < ((IInventory) tile).getSizeInventory(); i++)
{
if (((IInventory) tile).getStackInSlot(i) == null)
{
slots++;
}
}
}
return slots;
}
public static ItemStack insertStackIntoTile(ItemStack stack, IItemHandler handler)
{
int numberOfSlots = handler.getSlots();