Java Code Examples for net.minecraft.init.Items.BEEF

The following are Jave code examples for showing how to use BEEF of the net.minecraft.init.Items class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: BetterBeginningsReborn   File: ItemCharredMeat.java   View Source Code Vote up 5 votes
public static int getDamageBasedOnMeat(ItemStack meatStack)
{
    Item meat = meatStack.getItem();
    if (meat == Item.getItemFromBlock(Blocks.AIR)) // TODO: make the Item form of Blocks.AIR a constant.
    {
        return 5; // ???
    }

    if (meat == Items.BEEF || meat == Items.PORKCHOP ||
        meat == Items.COOKED_BEEF || meat == Items.COOKED_PORKCHOP)
    {
        return 0;
    }

    if (meat == Items.CHICKEN || meat == Items.COOKED_CHICKEN)
    {
        return 1;
    }

    if (meat == Items.MUTTON || meat == Items.COOKED_MUTTON)
    {
        return 2;
    }

    if (meat == Items.RABBIT || meat == Items.COOKED_RABBIT)
    {
        return 3;
    }

    if (meat == Items.FISH || meat == Items.COOKED_FISH)
    {
        return 4;
    }

    return 0;
}