Skip to content

Instantly share code, notes, and snippets.

Created May 7, 2014 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/974e905d5d47b782b4b9 to your computer and use it in GitHub Desktop.
Save anonymous/974e905d5d47b782b4b9 to your computer and use it in GitHub Desktop.
@SubscribeEvent
public void interact(PlayerInteractEvent event){
Minecraft mc = Minecraft.getMinecraft();
MovingObjectPosition objectOver = mc.objectMouseOver;
Target = objectOver.entityHit;
friend = (EntityPlayer) Target;
System.out.println("Friend food level: " + friend.getFoodStats().getFoodLevel());
System.out.println("Friend saturation level: " + friend.getFoodStats().getSaturationLevel());
System.out.println("friend health" + friend.getHealth());
System.out.println("friend max health" + friend.getMaxHealth());
System.out.println("can friend eat?: " + friend.getFoodStats().needFood());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment