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

The following examples show how to use net.minecraft.init.Items#BEEF . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
private static boolean generateComplaint(StringType type, EntityPlayer player, ItemStack stack, EventData data) {
    switch (type) {
        case ACTIVATE:
            if (stack.getItem() == Items.APPLE) {
                switch (data.random.nextInt(5)) {
                    case 0:
                        player.sendMessage(new TextComponentString(obnoxious + "The apple screams, \"No! Think of my children!\""));
                        break;
                    case 1:
                        player.sendMessage(new TextComponentString(obnoxious + "The apple sobs mournfully as it is devoured."));
                        break;
                    case 2:
                        player.sendMessage(new TextComponentString(obnoxious + "The apple seems resigned to its oncoming demise."));
                        break;
                    case 3:
                    case 4:
                        player.sendMessage(new TextComponentString(obnoxious + "The apple seems resigned to its oncoming demise."));
                        break;
                }
                return true;
            } else if (stack.getItem() == Items.FISH || stack.getItem() == Items.PORKCHOP || stack.getItem() == Items.MUTTON || stack.getItem() == Items.BEEF) {
                player.sendMessage(new TextComponentString(obnoxious + String.format("The %s yells, \"Serves you right if you get sick! Bastard.\"", stack.getDisplayName())));
                return true;
            }
    }
    return false;
}
 
Example 2
protected void dropBeef() {
	ItemStack stack = new ItemStack(Items.BEEF, rand.nextInt(3) + 2);
	EntityItem dropItem = new EntityItem(world, posX, posY, posZ, stack.copy());
	world.spawnEntity(dropItem);
}