|
8 | 8 | import gregtech.api.gui.widgets.ImageCycleButtonWidget; |
9 | 9 | import gregtech.api.pattern.TraceabilityPredicate; |
10 | 10 | import gregtech.api.recipes.RecipeMap; |
| 11 | +import gregtech.api.util.GTUtility; |
11 | 12 | import gregtech.api.util.LocalizationUtils; |
| 13 | +import gregtech.api.util.TextComponentUtil; |
12 | 14 |
|
13 | 15 | import net.minecraft.client.resources.I18n; |
14 | 16 | import net.minecraft.entity.player.EntityPlayer; |
|
18 | 20 | import net.minecraft.util.EnumFacing; |
19 | 21 | import net.minecraft.util.EnumHand; |
20 | 22 | import net.minecraft.util.ResourceLocation; |
| 23 | +import net.minecraft.util.text.ITextComponent; |
21 | 24 | import net.minecraft.util.text.TextComponentTranslation; |
| 25 | +import net.minecraft.util.text.TextFormatting; |
22 | 26 | import net.minecraft.world.World; |
23 | 27 | import net.minecraftforge.common.capabilities.Capability; |
24 | 28 | import net.minecraftforge.fml.relauncher.Side; |
@@ -68,6 +72,19 @@ public boolean onScrewdriverClick(EntityPlayer playerIn, EnumHand hand, EnumFaci |
68 | 72 | return true; // return true here on the client to keep the GUI closed |
69 | 73 | } |
70 | 74 |
|
| 75 | + @Override |
| 76 | + protected void addDisplayText(List<ITextComponent> textList) { |
| 77 | + MultiblockDisplayText.builder(textList, isStructureFormed()) |
| 78 | + .setWorkingStatus(recipeMapWorkable.isWorkingEnabled(), recipeMapWorkable.isActive()) |
| 79 | + .addEnergyUsageLine(recipeMapWorkable.getEnergyContainer()) |
| 80 | + .addEnergyTierLine(GTUtility.getTierByVoltage(recipeMapWorkable.getMaxVoltage())) |
| 81 | + .addParallelsLine(recipeMapWorkable.getParallelLimit()) |
| 82 | + .addWorkingStatusLine() |
| 83 | + .addProgressLine(recipeMapWorkable.getProgressPercent()) |
| 84 | + .addCustom(tl -> tl.add(TextComponentUtil.translationWithColor(TextFormatting.GRAY, |
| 85 | + "gregtech.multiblock.active_machine_mode", getCurrentRecipeMap().getLocalizedName()))); |
| 86 | + } |
| 87 | + |
71 | 88 | @Override |
72 | 89 | public RecipeMap<?>[] getAvailableRecipeMaps() { |
73 | 90 | return recipeMaps; |
|
0 commit comments