Skip to content

Commit

Permalink
Simplify header text in powerstation GUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomprince committed Jan 18, 2025
1 parent 7ce600b commit cdfa1a9
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,26 +193,12 @@ protected void transferEnergyTick() {
public void addDisplayText(List<Component> textList) {
IDisplayUIMachine.super.addDisplayText(textList);
if (isFormed()) {
if (!isWorkingEnabled()) {
textList.add(Component.translatable("gtceu.multiblock.work_paused"));

} else if (isActive()) {
if (isActive()) {
textList.add(Component.translatable("gtceu.multiblock.running"));
int currentProgress = (int) (recipeLogic.getProgressPercent() * 100);
double maxInSec = (float) recipeLogic.getDuration() / 20.0f;
double currentInSec = (float) recipeLogic.getProgress() / 20.0f;
textList.add(
Component.translatable("gtceu.multiblock.progress", String.format("%.2f", (float) currentInSec),
String.format("%.2f", (float) maxInSec), currentProgress));
} else {
textList.add(Component.translatable("gtceu.multiblock.idling"));
}

if (recipeLogic.isWaiting()) {
textList.add(Component.translatable("gtceu.multiblock.waiting")
.setStyle(Style.EMPTY.withColor(ChatFormatting.RED)));
}

if (energyBank != null) {
BigInteger energyStored = energyBank.getStored();
BigInteger energyCapacity = energyBank.getCapacity();
Expand Down

0 comments on commit cdfa1a9

Please sign in to comment.