private void recalculatePlan() {
    this.reboot = true;

    if (this.forcePlan) {
      return;
    }

    final ItemStack is = this.inv.getStackInSlot(10);

    if (is != null && is.getItem() instanceof ItemEncodedPattern) {
      if (!Platform.isSameItem(is, this.myPattern)) {
        final World w = this.getWorldObj();
        final ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
        final ICraftingPatternDetails ph = iep.getPatternForItem(is, w);

        if (ph != null && ph.isCraftable()) {
          this.progress = 0;
          this.myPattern = is;
          this.myPlan = ph;
        }
      }
    } else {
      this.progress = 0;
      this.forcePlan = false;
      this.myPlan = null;
      this.myPattern = null;
      this.pushDirection = ForgeDirection.UNKNOWN;
    }

    this.updateSleepiness();
  }