Esempio n. 1
0
  /**
   * We have to handle cheese by itself because the barrel recipe manager doesnt take kindly to null
   * input items.
   */
  private boolean handleCheese() {
    ItemStack inIS = this.getInputStack();
    if (this.getSealed()
        && this.fluid != null
        && this.fluid.getFluid() == TFCFluids.MILKCURDLED
        && (inIS == null
            || inIS.getItem() instanceof IFood
                && ((IFood) inIS.getItem()).getFoodGroup() != EnumFoodGroup.Dairy
                && ((IFood) inIS.getItem()).isEdible(inIS)
                && Food.getWeight(inIS) <= 20.0f)) {
      recipe =
          new BarrelRecipe(
                  null,
                  new FluidStack(TFCFluids.MILKCURDLED, 10000),
                  ItemFoodTFC.createTag(new ItemStack(TFCItems.cheese, 1), 160),
                  null)
              .setMinTechLevel(0);
      if (!worldObj.isRemote) {
        int time = 0;
        if (sealtime > 0) time = (int) TFC_Time.getTotalHours() - sealtime;
        else if (unsealtime > 0) time = (int) TFC_Time.getTotalHours() - unsealtime;

        // Make sure that the recipe meets the time requirements
        if (time < recipe.sealTime) return true;
        float w = this.fluid.amount / 62.5f;

        ItemStack is = ItemFoodTFC.createTag(new ItemStack(TFCItems.cheese), w);

        if (inIS != null && inIS.getItem() instanceof IFood) {
          int[] profile = Food.getFoodTasteProfile(inIS);
          float ratio =
              Math.min(
                  (Food.getWeight(getInputStack()) - Food.getDecay(inIS))
                      / (Global.FOOD_MAX_WEIGHT / 8),
                  1.0f);
          Food.setSweetMod(is, (int) Math.floor(profile[INPUT_SLOT] * ratio));
          Food.setSourMod(is, (int) Math.floor(profile[1] * ratio));
          Food.setSaltyMod(is, (int) Math.floor(profile[2] * ratio));
          Food.setBitterMod(is, (int) Math.floor(profile[3] * ratio));
          Food.setSavoryMod(is, (int) Math.floor(profile[4] * ratio));
          Food.setInfusion(is, inIS.getItem().getUnlocalizedName());
          this.storage[INPUT_SLOT] = null;
        }

        this.actionEmpty();
        this.setInventorySlotContents(0, is);
      }
      return true;
    }
    return false;
  }
Esempio n. 2
0
  public boolean processItem() {
    if (storage[0] != null) {
      QuernRecipe qr = QuernManager.getInstance().findMatchingRecipe(storage[0]);
      if (qr == null) {
        TerraFirmaCraft.LOG.warn(
            "QUERN RECIPE NOT FOUND! This is a BUG! -- "
                + storage[0].getItem().getUnlocalizedName());
        return false; // If this happens, it's a bug!
      }

      // If the output item can not be combined or is different from what is being made, eject and
      // make room for the new output
      if (storage[1] != null
          && !(storage[1].getItem() == qr.getResult().getItem()
              && storage[1].getItemDamage() == qr.getResult().getItemDamage())) {
        ejectItem(storage[1]);
        storage[1] = null;
      }

      if (qr.getInItem().getItem() instanceof IFood) {
        if (storage[1] != null) {
          float slot0Weight = Food.getWeight(storage[0]);
          float slot1Weight = Food.getWeight(storage[1]);
          float newWeight = slot0Weight + slot1Weight;

          if (newWeight > Global.FOOD_MAX_WEIGHT) {
            Food.setWeight(storage[1], newWeight - Global.FOOD_MAX_WEIGHT);

            ItemStack tossStack = storage[1].copy();
            Food.setWeight(tossStack, Global.FOOD_MAX_WEIGHT);
            ejectItem(tossStack);
          } else {
            Food.setWeight(storage[1], newWeight);
          }
          storage[0] = null;
          worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
          return true;
        }

        if (storage[1] == null) {
          storage[1] = qr.getResult().copy();
          float flourWeight = Food.getWeight(storage[0]);
          float flourDecay = Food.getDecay(storage[0]);
          ItemFoodTFC.createTag(storage[1], flourWeight, flourDecay);
          storage[0] = null;
          worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
          return true;
        }
      } else {
        if (storage[0].stackSize == qr.getInItem().stackSize) {
          storage[0] = null;
          worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
        } else storage[0].stackSize -= qr.getInItem().stackSize;

        if (storage[1] == null) storage[1] = qr.getResult().copy();
        else if (storage[1].stackSize < storage[1].getMaxStackSize()) {
          if ((qr.getResult().stackSize + storage[1].stackSize) > storage[1].getMaxStackSize()) {
            int amountleft =
                qr.getResult().stackSize - (storage[1].getMaxStackSize() - storage[1].stackSize);
            ItemStack tossStack = qr.getResult().copy();
            tossStack.stackSize = tossStack.getMaxStackSize();
            ejectItem(tossStack);
            ItemStack remainStack = qr.getResult().copy();
            remainStack.stackSize = amountleft;
            storage[1] = remainStack;
          } else storage[1].stackSize += qr.getResult().stackSize;
        } else {
          ejectItem(storage[1]);
          storage[1] = qr.getResult().copy();
        }
        return true;
      }
    }
    return false;
  }
Esempio n. 3
0
 private ItemStack getSeaWeed(Random r) {
   return ItemFoodTFC.createTag(
       new ItemStack(TFCItems.SeaWeed, 1, 0), Helper.roundNumber(2 + r.nextFloat() * 5, 10));
 }
Esempio n. 4
0
 public static final void setStackQuantity(ItemStack itemStack, int quantity) {
   if (itemStack.getItem() instanceof IFood) ItemFoodTFC.createTag(itemStack, quantity);
   else itemStack.stackSize = quantity;
 }
Esempio n. 5
0
 public static void registerRecipes() {
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.Potato), 160),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.VODKA, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.RedApple), 160),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.CIDER, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.GreenApple), 160),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.CIDER, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.WheatGround), 160),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.WHISKEY, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.RyeGround), 160),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.RYEWHISKEY, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.BarleyGround), 160),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.BEER, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.RiceGround), 160),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.SAKE, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.Sugarcane), 160),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.RUM, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelLiquidToLiquidRecipe(
               new FluidStack(TFCFluid.MILK, 9000),
               new FluidStack(TFCFluid.VINEGAR, 1000),
               new FluidStack(TFCFluid.MILKCURDLED, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
               null,
               new FluidStack(TFCFluid.MILKCURDLED, 10000),
               ItemFoodTFC.createTag(new ItemStack(TFCItems.Cheese), 160),
               null));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
               new ItemStack(TFCItems.Logs, 1, 0),
               new FluidStack(TFCFluid.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluid.TANNIN, 10000))); // WIP
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.Powder, 1, 0),
                   new FluidStack(TFCFluid.FRESHWATER, 500),
                   null,
                   new FluidStack(TFCFluid.LIMEWATER, 500),
                   0)
               .setSealedRecipe(false)
               .setRemovesLiquid(false));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.ScrapedHide, 1, 0),
               new FluidStack(TFCFluid.FRESHWATER, 300),
               new ItemStack(TFCItems.PrepHide, 1, 0),
               new FluidStack(TFCFluid.FRESHWATER, 300)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.ScrapedHide, 1, 1),
               new FluidStack(TFCFluid.FRESHWATER, 400),
               new ItemStack(TFCItems.PrepHide, 1, 1),
               new FluidStack(TFCFluid.FRESHWATER, 400)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.ScrapedHide, 1, 2),
               new FluidStack(TFCFluid.FRESHWATER, 500),
               new ItemStack(TFCItems.PrepHide, 1, 2),
               new FluidStack(TFCFluid.FRESHWATER, 500)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.Hide, 1, 0),
               new FluidStack(TFCFluid.LIMEWATER, 300),
               new ItemStack(TFCItems.SoakedHide, 1, 0),
               new FluidStack(TFCFluid.LIMEWATER, 300)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.Hide, 1, 1),
               new FluidStack(TFCFluid.LIMEWATER, 400),
               new ItemStack(TFCItems.SoakedHide, 1, 1),
               new FluidStack(TFCFluid.LIMEWATER, 400)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.Hide, 1, 2),
               new FluidStack(TFCFluid.LIMEWATER, 500),
               new ItemStack(TFCItems.SoakedHide, 1, 2),
               new FluidStack(TFCFluid.LIMEWATER, 500)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.PrepHide, 1, 0),
               new FluidStack(TFCFluid.TANNIN, 300),
               new ItemStack(TFCItems.Leather, 1),
               new FluidStack(TFCFluid.TANNIN, 300)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.PrepHide, 1, 1),
               new FluidStack(TFCFluid.TANNIN, 400),
               new ItemStack(TFCItems.Leather, 2),
               new FluidStack(TFCFluid.TANNIN, 400)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
               new ItemStack(TFCItems.PrepHide, 1, 2),
               new FluidStack(TFCFluid.TANNIN, 500),
               new ItemStack(TFCItems.Leather, 3),
               new FluidStack(TFCFluid.TANNIN, 500)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
               new ItemStack(TFCBlocks.Sand, 1, 32767),
               new FluidStack(TFCFluid.LIMEWATER, 100),
               new ItemStack(TFCItems.Mortar, 1),
               new FluidStack(TFCFluid.LIMEWATER, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
               new ItemStack(TFCBlocks.Sand2, 1, 32767),
               new FluidStack(TFCFluid.LIMEWATER, 100),
               new ItemStack(TFCItems.Mortar, 1),
               new FluidStack(TFCFluid.LIMEWATER, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluid.VODKA, 100), new FluidStack(TFCFluid.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluid.CIDER, 100), new FluidStack(TFCFluid.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluid.WHISKEY, 100), new FluidStack(TFCFluid.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluid.RYEWHISKEY, 100), new FluidStack(TFCFluid.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluid.BEER, 100), new FluidStack(TFCFluid.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluid.SAKE, 100), new FluidStack(TFCFluid.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluid.RUM, 100), new FluidStack(TFCFluid.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelLiquidToLiquidRecipe(
                   new FluidStack(TFCFluid.SALTWATER, 9000),
                   new FluidStack(TFCFluid.VINEGAR, 1000),
                   new FluidStack(TFCFluid.BRINE, 10000))
               .setSealedRecipe(false));
 }
Esempio n. 6
0
 public static void registerRecipes() {
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.potato), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.VODKA, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.redApple), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.CIDER, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.greenApple), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.CIDER, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.wheatGround), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.WHISKEY, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.ryeGround), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.RYEWHISKEY, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.barleyGround), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.BEER, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.riceGround), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.SAKE, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.sugar), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.RUM, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelAlcoholRecipe(
               ItemFoodTFC.createTag(new ItemStack(TFCItems.cornmealGround), 160),
               new FluidStack(TFCFluids.FRESHWATER, 10000),
               null,
               new FluidStack(TFCFluids.CORNWHISKEY, 10000)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   null,
                   new FluidStack(TFCFluids.MILKVINEGAR, 10000),
                   null,
                   new FluidStack(TFCFluids.MILKCURDLED, 10000))
               .setMinTechLevel(0)
               .setRemovesLiquid(false));
   // BarrelManager.getInstance().addRecipe(new BarrelRecipeNoItem(new
   // FluidStack(TFCFluid.MILKCURDLED, 10000), ItemFoodTFC.createTag(new
   // ItemStack(TFCItems.Cheese), 160), null).setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.logs, 1, 0),
                   new FluidStack(TFCFluids.FRESHWATER, 1000),
                   null,
                   new FluidStack(TFCFluids.TANNIN, 1000))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.logs, 1, 2),
                   new FluidStack(TFCFluids.FRESHWATER, 1000),
                   null,
                   new FluidStack(TFCFluids.TANNIN, 1000))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.logs, 1, 3),
                   new FluidStack(TFCFluids.FRESHWATER, 1000),
                   null,
                   new FluidStack(TFCFluids.TANNIN, 1000))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.logs, 1, 4),
                   new FluidStack(TFCFluids.FRESHWATER, 1000),
                   null,
                   new FluidStack(TFCFluids.TANNIN, 1000))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.logs, 1, 5),
                   new FluidStack(TFCFluids.FRESHWATER, 1000),
                   null,
                   new FluidStack(TFCFluids.TANNIN, 1000))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.logs, 1, 6),
                   new FluidStack(TFCFluids.FRESHWATER, 1000),
                   null,
                   new FluidStack(TFCFluids.TANNIN, 1000))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.logs, 1, 9),
                   new FluidStack(TFCFluids.FRESHWATER, 1000),
                   null,
                   new FluidStack(TFCFluids.TANNIN, 1000))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCItems.powder, 1, 0),
                   new FluidStack(TFCFluids.FRESHWATER, 500),
                   null,
                   new FluidStack(TFCFluids.LIMEWATER, 500),
                   0)
               .setMinTechLevel(0)
               .setSealedRecipe(false)
               .setRemovesLiquid(false)
               .setAllowAnyStack(false));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.scrapedHide, 1, 0),
                   new FluidStack(TFCFluids.FRESHWATER, 300),
                   new ItemStack(TFCItems.prepHide, 1, 0),
                   new FluidStack(TFCFluids.FRESHWATER, 300))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.scrapedHide, 1, 1),
                   new FluidStack(TFCFluids.FRESHWATER, 400),
                   new ItemStack(TFCItems.prepHide, 1, 1),
                   new FluidStack(TFCFluids.FRESHWATER, 400))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.scrapedHide, 1, 2),
                   new FluidStack(TFCFluids.FRESHWATER, 500),
                   new ItemStack(TFCItems.prepHide, 1, 2),
                   new FluidStack(TFCFluids.FRESHWATER, 500))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.hide, 1, 0),
                   new FluidStack(TFCFluids.LIMEWATER, 300),
                   new ItemStack(TFCItems.soakedHide, 1, 0),
                   new FluidStack(TFCFluids.LIMEWATER, 300))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.hide, 1, 1),
                   new FluidStack(TFCFluids.LIMEWATER, 400),
                   new ItemStack(TFCItems.soakedHide, 1, 1),
                   new FluidStack(TFCFluids.LIMEWATER, 400))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.hide, 1, 2),
                   new FluidStack(TFCFluids.LIMEWATER, 500),
                   new ItemStack(TFCItems.soakedHide, 1, 2),
                   new FluidStack(TFCFluids.LIMEWATER, 500))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.prepHide, 1, 0),
                   new FluidStack(TFCFluids.TANNIN, 300),
                   new ItemStack(TFCItems.leather, 1),
                   new FluidStack(TFCFluids.TANNIN, 300))
               .setKeepStackSize(false)
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.prepHide, 1, 1),
                   new FluidStack(TFCFluids.TANNIN, 400),
                   new ItemStack(TFCItems.leather, 2),
                   new FluidStack(TFCFluids.TANNIN, 400))
               .setKeepStackSize(false)
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.prepHide, 1, 2),
                   new FluidStack(TFCFluids.TANNIN, 500),
                   new ItemStack(TFCItems.leather, 3),
                   new FluidStack(TFCFluids.TANNIN, 500))
               .setKeepStackSize(false)
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCBlocks.sand, 1, 32767),
                   new FluidStack(TFCFluids.LIMEWATER, 100),
                   new ItemStack(TFCItems.mortar, 16),
                   new FluidStack(TFCFluids.LIMEWATER, 100))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelRecipe(
                   new ItemStack(TFCBlocks.sand2, 1, 32767),
                   new FluidStack(TFCFluids.LIMEWATER, 100),
                   new ItemStack(TFCItems.mortar, 16),
                   new FluidStack(TFCFluids.LIMEWATER, 100))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluids.VODKA, 100), new FluidStack(TFCFluids.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluids.CIDER, 100), new FluidStack(TFCFluids.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluids.WHISKEY, 100), new FluidStack(TFCFluids.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluids.RYEWHISKEY, 100), new FluidStack(TFCFluids.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluids.BEER, 100), new FluidStack(TFCFluids.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluids.SAKE, 100), new FluidStack(TFCFluids.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluids.RUM, 100), new FluidStack(TFCFluids.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelVinegarRecipe(
               new FluidStack(TFCFluids.CORNWHISKEY, 100),
               new FluidStack(TFCFluids.VINEGAR, 100)));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelLiquidToLiquidRecipe(
                   new FluidStack(TFCFluids.SALTWATER, 9000),
                   new FluidStack(TFCFluids.VINEGAR, 1000),
                   new FluidStack(TFCFluids.BRINE, 10000))
               .setSealedRecipe(false)
               .setMinTechLevel(0)
               .setRemovesLiquid(false));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelBriningRecipe(
                   new FluidStack(TFCFluids.BRINE, 60), new FluidStack(TFCFluids.BRINE, 60))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   ItemFoodTFC.createTag(new ItemStack(TFCItems.sugarcane), 1),
                   new FluidStack(TFCFluids.FRESHWATER, 60),
                   ItemFoodTFC.createTag(new ItemStack(TFCItems.sugar), 0.1f),
                   new FluidStack(TFCFluids.FRESHWATER, 60))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelMultiItemRecipe(
                   new ItemStack(TFCItems.jute, 1, 0),
                   new FluidStack(TFCFluids.FRESHWATER, 200),
                   new ItemStack(TFCItems.juteFiber, 1, 0),
                   new FluidStack(TFCFluids.FRESHWATER, 200))
               .setMinTechLevel(0));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelLiquidToLiquidRecipe(
                   new FluidStack(TFCFluids.MILK, 9000),
                   new FluidStack(TFCFluids.VINEGAR, 1000),
                   new FluidStack(TFCFluids.MILKVINEGAR, 10000))
               .setSealedRecipe(false)
               .setMinTechLevel(0)
               .setRemovesLiquid(false));
   BarrelManager.getInstance()
       .addRecipe(
           new BarrelLiquidToLiquidRecipe(
                   new FluidStack(TFCFluids.MILKVINEGAR, 9000),
                   new FluidStack(TFCFluids.MILK, 1000),
                   new FluidStack(TFCFluids.MILKVINEGAR, 10000))
               .setSealedRecipe(false)
               .setMinTechLevel(0)
               .setRemovesLiquid(false));
   // 5000mb / 160oz = 31.25
   // 10000mb / 160oz = 62.5
   // FluidStack naturally only takes int so I rounded down
   BarrelPreservativeRecipe picklePreservative =
       new BarrelPreservativeRecipe(new FluidStack(TFCFluids.VINEGAR, 31), "gui.barrel.preserving")
           .setAllowGrains(false)
           .setRequiresPickled(true)
           .setEnvironmentalDecayFactor(0.25f)
           .setBaseDecayModifier(0.1f)
           .setRequiresSealed(true);
   BarrelPreservativeRecipe brineInBrinePreservative =
       new BarrelPreservativeRecipe(new FluidStack(TFCFluids.BRINE, 62), "gui.barrel.preserving")
           .setAllowGrains(false)
           .setRequiresBrined(true)
           .setEnvironmentalDecayFactor(0.75f)
           .setRequiresSealed(true);
   BarrelPreservativeRecipe brineInVinegarPreservative =
       new BarrelPreservativeRecipe(new FluidStack(TFCFluids.VINEGAR, 62), "gui.barrel.preserving")
           .setAllowGrains(false)
           .setRequiresBrined(true)
           .setEnvironmentalDecayFactor(0.75f)
           .setRequiresSealed(true);
   BarrelManager.getInstance().addPreservative(picklePreservative);
   BarrelManager.getInstance().addPreservative(brineInBrinePreservative);
   BarrelManager.getInstance().addPreservative(brineInVinegarPreservative);
 }