var eat = 1;
if (hitBlock != null) {var blockID = world.getBlockID(hitBlock.x,hitBlock.y,hitBlock.z);
if (blockID == 153 || blockID == 64 || blockID == 54 || blockID == 61 || blockID == 58) {eat = 0;}}
if (eating != 0) {eat = 0;}

if (eat == 1)
{var dishunger; dishunger = 25;
player.heal(player.getMaxHealth()*0.20);
if (hunger < 0 + dishunger) {hunger = 0;} else {hunger -= dishunger;}
var rand = Math.floor(Math.random()*20);
switch (rand) {
case 0: case 1: case 2: chat.print("So refreshing"); break;
case 3: case 4: case 5: chat.print("It seems I can cook after all"); break;
case 6: case 7: case 8: chat.print("I want more of those"); break;
case 9: case 10: case 11: chat.print("So that is why it is so expensive"); break;}
eating = 25;}
