Ive been doing
ItemStack piggy = new ItemStack(AdvancedMiningDrillTraits.filledPigAnimalCage);
public boolean itemInteractionForEntity(ItemStack itemstack, EntityLiving entity)
{
if (entity instanceof EntityLiving){
if (entity instanceof EntityPig){
if(entity.worldObj.isRemote){
entity.isDead = true;
--itemstack.stackSize;
EntityItem pig = new EntityItem(entity.worldObj, entity.posX, entity.posY, entity.posZ, piggy);
entity.worldObj.spawnEntityInWorld(pig);
}}
but it will only spawn one item the first time, then it just wont spawn the item
please help