Skip to content

Commit e8b8bcc

Browse files
committed
remove old mui0 methods from HPCA
1 parent d7d02dc commit e8b8bcc

File tree

1 file changed

+0
-95
lines changed

1 file changed

+0
-95
lines changed

src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityHPCA.java

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -363,101 +363,6 @@ public void setWorkingEnabled(boolean isWorkingAllowed) {
363363
}
364364
}
365365

366-
@Override
367-
protected ModularUI.Builder createUITemplate(EntityPlayer entityPlayer) {
368-
ModularUI.Builder builder = super.createUITemplate(entityPlayer);
369-
370-
// Create the hover grid
371-
builder.widget(new gregtech.api.gui.widgets.ProgressWidget(
372-
() -> hpcaHandler.getAllocatedCWUt() > 0 ? progressSupplier.getAsDouble() : 0,
373-
74, 57, 47, 47, GuiTextures.HPCA_COMPONENT_OUTLINE,
374-
gregtech.api.gui.widgets.ProgressWidget.MoveType.HORIZONTAL)
375-
.setIgnoreColor(true)
376-
.setHoverTextConsumer(hpcaHandler::addInfo));
377-
int startX = 76;
378-
int startY = 59;
379-
for (int i = 0; i < 3; i++) {
380-
for (int j = 0; j < 3; j++) {
381-
final int index = i * 3 + j;
382-
Supplier<IGuiTexture> textureSupplier = () -> hpcaHandler.getComponentTexture(index);
383-
builder.widget(new SuppliedImageWidget(startX + (15 * j), startY + (15 * i), 13, 13, textureSupplier)
384-
.setIgnoreColor(true));
385-
}
386-
}
387-
return builder;
388-
}
389-
390-
@Override
391-
protected void addDisplayText(List<ITextComponent> textList) {
392-
MultiblockDisplayText.builder(textList, isStructureFormed())
393-
.setWorkingStatus(true, hpcaHandler.getAllocatedCWUt() > 0) // transform into two-state system for
394-
// display
395-
.setWorkingStatusKeys(
396-
"gregtech.multiblock.idling",
397-
"gregtech.multiblock.idling",
398-
"gregtech.multiblock.data_bank.providing")
399-
.addCustom(tl -> {
400-
if (isStructureFormed()) {
401-
// Energy Usage
402-
ITextComponent voltageName = new TextComponentString(
403-
GTValues.VNF[GTUtility.getTierByVoltage(hpcaHandler.getMaxEUt())]);
404-
tl.add(TextComponentUtil.translationWithColor(
405-
TextFormatting.GRAY,
406-
"gregtech.multiblock.hpca.energy",
407-
TextFormattingUtil.formatNumbers(hpcaHandler.cachedEUt),
408-
TextFormattingUtil.formatNumbers(hpcaHandler.getMaxEUt()),
409-
voltageName));
410-
411-
// Provided Computation
412-
ITextComponent cwutInfo = TextComponentUtil.stringWithColor(
413-
TextFormatting.AQUA,
414-
hpcaHandler.cachedCWUt + " / " + hpcaHandler.getMaxCWUt() + " CWU/t");
415-
tl.add(TextComponentUtil.translationWithColor(
416-
TextFormatting.GRAY,
417-
"gregtech.multiblock.hpca.computation",
418-
cwutInfo));
419-
}
420-
})
421-
.addWorkingStatusLine();
422-
}
423-
424-
@Override
425-
protected void addWarningText(List<ITextComponent> textList) {
426-
MultiblockDisplayText.builder(textList, isStructureFormed(), false)
427-
.addLowPowerLine(hasNotEnoughEnergy)
428-
.addCustom(tl -> {
429-
if (isStructureFormed()) {
430-
if (temperature > 500) {
431-
// Temperature warning
432-
tl.add(TextComponentUtil.translationWithColor(
433-
TextFormatting.YELLOW,
434-
"gregtech.multiblock.hpca.warning_temperature"));
435-
436-
// Active cooler overdrive warning
437-
tl.add(TextComponentUtil.translationWithColor(
438-
TextFormatting.GRAY,
439-
"gregtech.multiblock.hpca.warning_temperature_active_cool"));
440-
}
441-
442-
// Structure warnings
443-
hpcaHandler.addWarnings(tl);
444-
}
445-
})
446-
.addMaintenanceProblemLines(getMaintenanceProblems());
447-
}
448-
449-
@Override
450-
protected void addErrorText(List<ITextComponent> textList) {
451-
super.addErrorText(textList);
452-
if (isStructureFormed()) {
453-
if (temperature > 1000) {
454-
textList.add(TextComponentUtil.translationWithColor(TextFormatting.RED,
455-
"gregtech.multiblock.hpca.error_temperature"));
456-
}
457-
hpcaHandler.addErrors(textList);
458-
}
459-
}
460-
461366
@Override
462367
protected MultiblockUIFactory createUIFactory() {
463368
return super.createUIFactory()

0 commit comments

Comments
 (0)