Package vazkii.botania.api.recipe

Examples of vazkii.botania.api.recipe.RecipeManaInfusion


  }

  @Override
  @SideOnly(Side.CLIENT)
  public void renderRecipe(IGuiLexiconEntry gui, int mx, int my) {
    RecipeManaInfusion recipe = recipes.get(recipeAt);
    TextureManager render = Minecraft.getMinecraft().renderEngine;
    FontRenderer font = Minecraft.getMinecraft().fontRenderer;

    Object input = recipe.getInput();
    if(input instanceof String)
      input = OreDictionary.getOres((String) input).get(0);

    renderItemAtGridPos(gui, 1, 1, (ItemStack) input, false);

    RenderTilePool.forceMana = true;
    renderItemAtGridPos(gui, 2, 1, new ItemStack(ModBlocks.pool, 1, recipe.getOutput().getItem() == Item.getItemFromBlock(ModBlocks.pool) ? 2 : 0), false);

    renderItemAtGridPos(gui, 3, 1, recipe.getOutput(), false);

    if(recipe.isAlchemy())
      renderItemAtGridPos(gui, 1, 2, new ItemStack(ModBlocks.alchemyCatalyst), false);
    else if(recipe.isConjuration())
      renderItemAtGridPos(gui, 1, 2, new ItemStack(ModBlocks.conjurationCatalyst), false);

    GL11.glEnable(GL11.GL_BLEND);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    String manaUsage = StatCollector.translateToLocal("botaniamisc.manaUsage");
    font.drawString(manaUsage, gui.getLeft() + gui.getWidth() / 2 - font.getStringWidth(manaUsage) / 2, gui.getTop() + 105, 0x66000000);

    int ratio = 10;
    int x = gui.getLeft() + gui.getWidth() / 2 - 50;
    int y = gui.getTop() + 115;

    if(mx > x + 1 && mx <= x + 101 && my > y - 14 && my <= y + 11)
      ratio = 1;

    HUDHandler.renderManaBar(x, y, 0x0000FF, 0.75F, recipe.getManaToConsume(), TilePool.MAX_MANA / ratio);

    String ratioString = String.format(StatCollector.translateToLocal("botaniamisc.ratio"), ratio);
    String dropString = StatCollector.translateToLocal("botaniamisc.drop") + " " + EnumChatFormatting.BOLD + "(?)";

    boolean hoveringOverDrop = false;
View Full Code Here


   * @param input The input item, be it an ItemStack or an ore dictionary entry String.
   * @param mana The amount of mana required. Don't go over 100000!
   * @return The recipe created.
   */
  public static RecipeManaInfusion registerManaInfusionRecipe(ItemStack output, Object input, int mana) {
    RecipeManaInfusion recipe = new RecipeManaInfusion(output, input, mana);
    manaInfusionRecipes.add(recipe);
    return recipe;
  }
View Full Code Here

   * Register a Mana Infusion Recipe and flags it as an Alchemy recipe (requires an
   * Alchemy Catalyst below the pool).
   * @see BotaniaAPI#registerManaInfusionRecipe
   */
  public static RecipeManaInfusion registerManaAlchemyRecipe(ItemStack output, Object input, int mana) {
    RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana);
    recipe.setAlchemy(true);
    return recipe;
  }
View Full Code Here

   * Register a Mana Infusion Recipe and flags it as an Conjuration recipe (requires a
   * Conjuration Catalyst below the pool).
   * @see BotaniaAPI#registerManaInfusionRecipe
   */
  public static RecipeManaInfusion registerManaConjurationRecipe(ItemStack output, Object input, int mana) {
    RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana);
    recipe.setConjuration(true);
    return recipe;
  }
View Full Code Here

TOP

Related Classes of vazkii.botania.api.recipe.RecipeManaInfusion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.