@Override
 public boolean onBlockActivated(
     World world,
     BlockPos pos,
     IBlockState state,
     EntityPlayer player,
     EnumFacing side,
     float hitX,
     float hitY,
     float hitZ) {
   ItemStack currentItem = player.getCurrentEquippedItem();
   TileEntity tileEntity = world.getTileEntity(pos);
   if (tileEntity instanceof TileEntityToaster) {
     TileEntityToaster tileEntityToaster = (TileEntityToaster) tileEntity;
     if (currentItem != null && !tileEntityToaster.isToasting()) {
       RecipeData data = RecipeAPI.getToasterRecipeFromInput(currentItem);
       if (data != null) {
         if (tileEntityToaster.addSlice(new ItemStack(currentItem.getItem(), 1))) {
           world.markBlockForUpdate(pos);
           currentItem.stackSize--;
         }
       } else {
         tileEntityToaster.removeSlice();
       }
     } else {
       if (player.isSneaking()) {
         if (!tileEntityToaster.isToasting()) {
           tileEntityToaster.startToasting();
           world.updateComparatorOutputLevel(pos, this);
           if (!world.isRemote) {
             world.playSoundEffect(
                 pos.getX() + 0.5D,
                 pos.getY() + 0.5D,
                 pos.getZ() + 0.5D,
                 "cfm:toaster_down",
                 0.75F,
                 1.0F);
           }
         }
       } else if (!tileEntityToaster.isToasting()) {
         tileEntityToaster.removeSlice();
       }
     }
   }
   return true;
 }
 @Override
 public void onNeighborBlockChange(
     World world, BlockPos pos, IBlockState state, Block neighborBlock) {
   TileEntityToaster tileEntityToaster = (TileEntityToaster) world.getTileEntity(pos);
   if (!tileEntityToaster.isToasting() && world.isBlockPowered(pos)) {
     tileEntityToaster.startToasting();
     world.markBlockForUpdate(pos);
     if (!world.isRemote) {
       world.playSoundEffect(
           pos.getX() + 0.5D,
           pos.getY() + 0.5D,
           pos.getZ() + 0.5D,
           "cfm:toaster_down",
           0.75F,
           1.0F);
     }
   }
 }