Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How to check for food type? [SOLVED]


Recommended Posts

So I'm setting up a custom furnace with 4 slots, and I've already got a block registered, now I just need to create a tileentity and create the GUI. I'm familiar with setting up a gui with IItemhandler so that's not really anything new, but in the TileEntity, how exactly should I go about checking what kind of food an item is? In order to cook it I mean, and whether it's uncooked or not.

Edited by Turtledove
Link to comment
Share on other sites

There is no direct way to check for "uncooked" vs "cooked". However you use a check for food (ItemStack#isFood) in combination with a check for smelting recipes (if a food item is smeltable it's probably uncooked and if a food item is a result of a smelting it's probably cooked).

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.