diff --git a/common/src/main/java/muramasa/gregtech/data/RecipeMaps.java b/common/src/main/java/muramasa/gregtech/data/RecipeMaps.java index da4bd4e78..ac9759433 100644 --- a/common/src/main/java/muramasa/gregtech/data/RecipeMaps.java +++ b/common/src/main/java/muramasa/gregtech/data/RecipeMaps.java @@ -327,6 +327,30 @@ public int getRows() { } }; + public static final IRecipeInfoRenderer MACERATOR_RENDERER = new IRecipeInfoRenderer() { + public void render(PoseStack stack, IRecipe recipe, Font fontRenderer, int guiOffsetX, int guiOffsetY) { + if (recipe.getDuration() == 0 && recipe.getPower() == 0) return; + String additional = recipe.getDuration() < 1200 ? "" : recipe.getDuration() < 36000 ? " (" + (recipe.getDuration() / 20.0f) + " secs)" : " (" + (recipe.getDuration() / 1200.0f) + " mins)"; + String power = "Duration: " + recipe.getDuration() + " ticks" + additional; + String euT = "EU/t: " + recipe.getPower(); + String amps = "Amps: " + recipe.getAmps(); + String total = "Total: " + recipe.getPower() * recipe.getDuration() + " EU"; + Tier tier = Tier.getTier((recipe.getPower() / recipe.getAmps())); + String formattedText = " (" + tier.getId().toUpperCase() + ")"; + renderString(stack, power, fontRenderer, 5, 0, guiOffsetX, guiOffsetY); + renderString(stack, euT, fontRenderer, 5, 10, guiOffsetX, guiOffsetY); + renderString(stack, formattedText, fontRenderer, 5 + stringWidth(euT, fontRenderer), 10, Tier.EV.getRarityFormatting().getColor(), guiOffsetX, guiOffsetY); + renderString(stack, amps, fontRenderer, 5, 20, guiOffsetX, guiOffsetY); + renderString(stack, total, fontRenderer, 5, 30, guiOffsetX, guiOffsetY); + renderString(stack, "Secondary outputs only available in pulverizers and large macerator", fontRenderer, 5, 40, guiOffsetX, guiOffsetY); + } + + @Override + public int getRows() { + return 5; + } + }; + static { SOLID_FUEL_BOILERS.setGuiData(SIMPLE_DISPLAY); COMBUSTION_FUELS.setGuiData(Guis.MULTI_DISPLAY); @@ -368,6 +392,7 @@ public static void clientMaps() { HEAT_EXCHANGER.setInfoRenderer(HEAT_EXCHANGER_RENDERER); FUSION.setInfoRenderer(FUSION_RENDERER); CHEMICAL_REACTOR.setInfoRenderer(CHEM_RENDERER); + PULVERIZER.setInfoRenderer(MACERATOR_RENDERER); } public static class PulverizerBulder extends RecipeBuilder{