package com.insane.itsrainingfood;

import net.minecraft.entity.player.EntityPlayer;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;

public class FoodEventHandler {
	public static int ticksSinceLast = 0;
	@SubscribeEvent
	public void onPlayerTickEvent(PlayerTickEvent event)
	{
		if (event.player.worldObj.isRaining())
		{
			EntityPlayer player = event.player;
			if (ticksSinceLast == 0 && player.rotationPitch < -65f && player.getFoodStats().needFood() && player.worldObj.canBlockSeeTheSky((int) player.posX, (int) player.posY, (int) player.posZ))
			{
				event.player.getFoodStats().addStats(1, 1.0f);
				ticksSinceLast++;
				if (ItsRainingFood.proxy.shouldPlaySound())
					event.player.worldObj.playSoundAtEntity(event.player, "itsrainingfood:omnomnom", 0.8f, 1.0f);
			}
			else
			{
				ticksSinceLast++;
				ticksSinceLast = ticksSinceLast%Config.configTicks;
			}
		}
	}

}

@@ -78,16 +78,54 @@
 Player;%0A
+import net.minecraft.util.MathHelper;%0A
 import c
@@ -597,22 +597,40 @@
 eTheSky(
-(int) 
+MathHelper.floor_double(
 player.p
@@ -632,24 +632,43 @@
 yer.posX
+)
 , 
-(int) 
+MathHelper.floor_double(
 player.p
@@ -674,16 +674,35 @@
 posY
+)
 , 
-(int) 
+MathHelper.floor_double(
 play
@@ -710,16 +710,17 @@
 r.posZ))
+)
 %0A%09%09%09%7B%0A%09%09

Change from cast to MathHelper