private void setRecipe(ItemStack out) {
   if (out == null) {
     recipe = null;
     this.onRecipeChanged();
   } else if (recipe == null
       || !ReikaItemHelper.matchStacks(recipe.output, out)
       || craftingTick == 0) {
     ElementTagCompound tag = FabricationRecipes.recipes().getItemCost(out);
     FluidStack fs = FluidContainerRegistry.getFluidForFilledItem(out);
     Fluid f = fs != null ? fs.getFluid() : null;
     if (f != null) {
       ElementTagCompound ftag = ItemMagicRegistry.instance.getFluidValue(f);
       if (ftag != null)
         tag = FabricationRecipes.recipes().processTag(ftag).scale(1 / FabricationRecipes.SCALE);
     }
     if (tag != null) {
       recipe = f != null ? new FluidRecipe(tag, out, f) : new Recipe(tag, out);
       this.onRecipeChanged();
     }
   }
   entity = recipe != null ? new InertItem(worldObj, recipe.output) : null;
 }
 @Override
 public int getMaxStorage(CrystalElement e) {
   return FabricationRecipes.recipes().getMaximumCost() * 3 / 2;
 }