Search in sources :

Example 1 with RenderPageAltarRecipe

use of hellfirepvp.astralsorcery.client.screen.journal.page.RenderPageAltarRecipe in project AstralSorcery by HellFirePvP.

the class ScreenJournalConstellationDetail method drawCapeInformationPages.

private void drawCapeInformationPages(MatrixStack renderStack, int mouseX, int mouseY, float partialTicks) {
    for (int i = 0; i < locTextMantle.size(); i++) {
        IReorderingProcessor line = locTextMantle.get(i);
        renderStack.push();
        renderStack.translate(guiLeft + 30, guiTop + 30 + i * 10, this.getGuiZLevel());
        RenderingDrawUtils.renderStringAt(line, renderStack, font, 0xFFCCCCCC, true);
        renderStack.pop();
    }
    if (ResearchHelper.getClientProgress().getTierReached().isThisLaterOrEqual(ProgressionTier.TRAIT_CRAFT)) {
        SimpleAltarRecipe recipe = RecipeHelper.findAltarRecipeResult(stack -> stack.getItem() instanceof ItemMantle && this.constellation.equals(ItemsAS.MANTLE.getConstellation(stack)));
        if (recipe != null) {
            lastFramePage = new RenderPageAltarRecipe(null, -1, recipe);
            lastFramePage.render(renderStack, guiLeft + 220, guiTop + 20, this.getGuiZLevel(), partialTicks, mouseX, mouseY);
            lastFramePage.postRender(renderStack, guiLeft + 220, guiTop + 20, this.getGuiZLevel(), partialTicks, mouseX, mouseY);
        }
    }
}
Also used : IReorderingProcessor(net.minecraft.util.IReorderingProcessor) ItemMantle(hellfirepvp.astralsorcery.common.item.armor.ItemMantle) RenderPageAltarRecipe(hellfirepvp.astralsorcery.client.screen.journal.page.RenderPageAltarRecipe) SimpleAltarRecipe(hellfirepvp.astralsorcery.common.crafting.recipe.SimpleAltarRecipe)

Example 2 with RenderPageAltarRecipe

use of hellfirepvp.astralsorcery.client.screen.journal.page.RenderPageAltarRecipe in project AstralSorcery by HellFirePvP.

the class ScreenJournalConstellationDetail method drawConstellationPaperRecipePage.

private void drawConstellationPaperRecipePage(MatrixStack renderStack, int mouseX, int mouseY, float partialTicks) {
    if (ResearchHelper.getClientProgress().getTierReached().isThisLaterOrEqual(ProgressionTier.TRAIT_CRAFT)) {
        SimpleAltarRecipe recipe = RecipeHelper.findAltarRecipeResult(stack -> stack.getItem() instanceof ItemConstellationPaper && this.constellation.equals(ItemsAS.CONSTELLATION_PAPER.getConstellation(stack)));
        if (recipe != null) {
            lastFramePage = new RenderPageAltarRecipe(null, -1, recipe);
            lastFramePage.render(renderStack, guiLeft + 30, guiTop + 20, this.getGuiZLevel(), partialTicks, mouseX, mouseY);
            lastFramePage.postRender(renderStack, guiLeft + 30, guiTop + 20, this.getGuiZLevel(), partialTicks, mouseX, mouseY);
        }
    }
}
Also used : ItemConstellationPaper(hellfirepvp.astralsorcery.common.item.ItemConstellationPaper) RenderPageAltarRecipe(hellfirepvp.astralsorcery.client.screen.journal.page.RenderPageAltarRecipe) SimpleAltarRecipe(hellfirepvp.astralsorcery.common.crafting.recipe.SimpleAltarRecipe)

Aggregations

RenderPageAltarRecipe (hellfirepvp.astralsorcery.client.screen.journal.page.RenderPageAltarRecipe)2 SimpleAltarRecipe (hellfirepvp.astralsorcery.common.crafting.recipe.SimpleAltarRecipe)2 ItemConstellationPaper (hellfirepvp.astralsorcery.common.item.ItemConstellationPaper)1 ItemMantle (hellfirepvp.astralsorcery.common.item.armor.ItemMantle)1 IReorderingProcessor (net.minecraft.util.IReorderingProcessor)1