Skip to content

Commit

Permalink
I merged the wrong branch in 💀
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorbatron committed Feb 14, 2025
1 parent d721e04 commit e6bfb31
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import gregtech.api.capability.GregtechDataCodes;
import gregtech.api.capability.GregtechTileCapabilities;
import gregtech.api.capability.IMultipleRecipeMaps;
import gregtech.api.metatileentity.multiblock.ui.MultiblockUIBuilder;
import gregtech.api.metatileentity.multiblock.ui.MultiblockUIFactory;
import gregtech.api.mui.GTGuiTextures;
import gregtech.api.pattern.TraceabilityPredicate;
Expand Down Expand Up @@ -158,7 +159,7 @@ protected MultiblockUIFactory createUIFactory() {
}

@Override
protected void configureDisplayText(MultiblockUIFactory.Builder builder) {
protected void configureDisplayText(MultiblockUIBuilder builder) {
builder.setWorkingStatus(recipeMapWorkable.isWorkingEnabled(), recipeMapWorkable.isActive())
.addRecipeMapLine(getCurrentRecipeMap())
.addEnergyUsageLine(this.getEnergyContainer())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import gregtech.api.GTValues;
import gregtech.api.capability.IEnergyContainer;
import gregtech.api.recipes.RecipeMap;
import gregtech.api.util.JsonUtils;
import gregtech.api.util.KeyUtil;
import gregtech.api.util.TextFormattingUtil;
Expand Down Expand Up @@ -427,6 +428,20 @@ public MultiblockUIBuilder addFuelNeededLine(String fuelName, int previousRecipe
return this;
}

/**
* Adds the name of a recipe map to the display.
*
* @param map the {@link RecipeMap} to get the name of
*/
public MultiblockUIBuilder addRecipeMapLine(RecipeMap<?> map) {
if (!isStructureFormed) return this;

IKey mapName = KeyUtil.lang(TextFormatting.YELLOW, map.getTranslationKey());
addKey(KeyUtil.lang(TextFormatting.GRAY, "gregtech.multiblock.machine_mode", mapName));

return this;
}

/** Insert an empty line into the text list. */
public MultiblockUIBuilder addEmptyLine() {
addKey(IKey.LINE_FEED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import gregtech.api.metatileentity.multiblock.ProgressBarMultiblock;
import gregtech.api.mui.GTGuiTextures;
import gregtech.api.mui.GTGuis;
import gregtech.api.recipes.RecipeMap;
import gregtech.api.util.GTLog;
import gregtech.api.util.KeyUtil;

Expand Down

0 comments on commit e6bfb31

Please sign in to comment.