@Override
  public void loadCraftingRecipes(ItemStack result) {
    FluidStack fs = FluidContainerRegistry.getFluidForFilledItem(result);
    if (fs != null) {
      ArrayList<ItemStack> li = RecipesCentrifuge.getRecipes().getSources(fs.getFluid());
      for (int i = 0; i < li.size(); i++) arecipes.add(new CentrifugeRecipe(li.get(i)));
    }

    ArrayList<ItemStack> li = RecipesCentrifuge.getRecipes().getSources(result);
    for (int i = 0; i < li.size(); i++) arecipes.add(new CentrifugeRecipe(li.get(i)));
  }
 @Override
 public void loadCraftingRecipes(String outputId, Object... results) {
   if (outputId != null && outputId.equals("rccentri")) {
     Collection<ItemStack> li = RecipesCentrifuge.getRecipes().getAllCentrifugables();
     for (ItemStack is : li) arecipes.add(new CentrifugeRecipe(is));
   }
   super.loadCraftingRecipes(outputId, results);
 }
 private void drawFluids(int recipe) {
   CentrifugeRecipe r = (CentrifugeRecipe) arecipes.get(recipe);
   ItemStack in = r.input;
   FluidStack fs = RecipesCentrifuge.getRecipes().getFluidResult(in);
   if (fs != null) {
     Fluid f = fs.getFluid();
     IIcon ico = f.getIcon();
     float u = ico.getMinU();
     float v = ico.getMinV();
     float du = ico.getMaxU();
     float dv = ico.getMaxV();
     ReikaTextureHelper.bindTerrainTexture();
     Tessellator v5 = Tessellator.instance;
     v5.startDrawingQuads();
     int x = 147;
     for (int i = 0; i < 4; i++) {
       int y = 1 + i * 16;
       v5.addVertexWithUV(x, y, 0, u, v);
       v5.addVertexWithUV(x, y + 16, 0, u, dv);
       v5.addVertexWithUV(x + 16, y + 16, 0, du, dv);
       v5.addVertexWithUV(x + 16, y, 0, du, v);
     }
     v5.addVertexWithUV(x, 65, 0, u, v);
     v5.addVertexWithUV(x, 68, 0, u, dv);
     v5.addVertexWithUV(x + 16, 68, 0, du, dv);
     v5.addVertexWithUV(x + 16, 65, 0, du, v);
     v5.draw();
     FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
     String s =
         f.getLocalizedName()
             + " ("
             + fs.amount
             + " mB) ("
             + RecipesCentrifuge.getRecipes().getFluidChance(in)
             + "%)";
     int l = fr.getStringWidth(s);
     fr.drawString(s, 166 - l, 70, 0);
   }
 }
    @Override
    public List<PositionedStack> getOtherStacks() {
      List<PositionedStack> pos = new ArrayList();
      ChancedOutputList c = RecipesCentrifuge.getRecipes().getRecipeResult(input);
      Collection<ItemStack> li = c.keySet();

      int dx = 80;
      int dy = 10;
      int i = 0;
      for (ItemStack is : li) {
        int x = dx + i % 3 * 18;
        int y = dy + i / 3 * 18;
        String tip = String.format("%.2f%s chance", c.getItemChance(is), "%");
        pos.add(new PositionedStackWithTooltip(is, x, y, tip));
        i++;
      }
      return pos;
    }
 @Override
 public void loadUsageRecipes(ItemStack ingredient) {
   if (RecipesCentrifuge.getRecipes().isCentrifugable(ingredient)) {
     arecipes.add(new CentrifugeRecipe(ingredient));
   }
 }