for(Object o : entities)
{
if(o instanceof EntityAnimal)
{
EntityAnimal a = ((EntityAnimal)o);
List<ItemStack> foodList;
if(MFRRegistry.getBreederFoods().containsKey(a.getClass()))
{
foodList = MFRRegistry.getBreederFoods().get(a.getClass());
}
else
{
foodList = new ArrayList<ItemStack>();
foodList.add(new ItemStack(Item.wheat));
}
for(ItemStack food : foodList)
{
int stackIndex = manager.findItem(food);
if(stackIndex < 0)
{
continue;
}
if(!a.isInLove() && a.getGrowingAge() == 0)
{
a.inLove = 600;
decrStackSize(stackIndex, 1);
for (int var3 = 0; var3 < 7; ++var3)
{
double var4 = a.getRNG().nextGaussian() * 0.02D;
double var6 = a.getRNG().nextGaussian() * 0.02D;
double var8 = a.getRNG().nextGaussian() * 0.02D;
this.worldObj.spawnParticle("heart", a.posX + a.getRNG().nextFloat() * a.width * 2.0F - a.width, a.posY + 0.5D + a.getRNG().nextFloat() * a.height, a.posZ + a.getRNG().nextFloat() * a.width * 2.0F - a.width, var4, var6, var8);
}
return true;
}
}
}