use of mekanism.client.gui.element.tab.GuiBoilerTab in project Mekanism by mekanism.
the class GuiBoilerStats method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiBoilerTab(this, tile, BoilerTab.MAIN));
addButton(new GuiHeatTab(this, () -> {
ITextComponent environment = MekanismUtils.getTemperatureDisplay(tile.getMultiblock().lastEnvironmentLoss, TemperatureUnit.KELVIN, false);
return Collections.singletonList(MekanismLang.DISSIPATED_RATE.translate(environment));
}));
boilGraph = addButton(new GuiGraph(this, 7, 82, 162, 38, MekanismLang.BOIL_RATE::translate));
maxGraph = addButton(new GuiGraph(this, 7, 121, 162, 38, MekanismLang.MAX_BOIL_RATE::translate));
maxGraph.enableFixedScale((long) ((MekanismConfig.general.superheatingHeatTransfer.get() * tile.getMultiblock().superheatingElements) / HeatUtils.getWaterThermalEnthalpy()));
}
use of mekanism.client.gui.element.tab.GuiBoilerTab in project Mekanism by mekanism.
the class GuiThermoelectricBoiler method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiInnerScreen(this, 60, 23, 96, 40, () -> {
BoilerMultiblockData multiblock = tile.getMultiblock();
return Arrays.asList(MekanismLang.TEMPERATURE.translate(MekanismUtils.getTemperatureDisplay(multiblock.getTotalTemperature(), TemperatureUnit.KELVIN, true)), MekanismLang.BOIL_RATE.translate(TextUtils.format(multiblock.lastBoilRate)), MekanismLang.MAX_BOIL_RATE.translate(TextUtils.format(multiblock.lastMaxBoil)));
}).jeiCategories(MekanismBlocks.BOILER_CASING.getRegistryName()));
addButton(new GuiBoilerTab(this, tile, BoilerTab.STAT));
addButton(new GuiVerticalRateBar(this, new IBarInfoHandler() {
@Override
public ITextComponent getTooltip() {
return MekanismLang.BOIL_RATE.translate(TextUtils.format(tile.getMultiblock().lastBoilRate));
}
@Override
public double getLevel() {
BoilerMultiblockData multiblock = tile.getMultiblock();
return Math.min(1, multiblock.lastBoilRate / (double) multiblock.lastMaxBoil);
}
}, 44, 13));
addButton(new GuiVerticalRateBar(this, new IBarInfoHandler() {
@Override
public ITextComponent getTooltip() {
return MekanismLang.MAX_BOIL_RATE.translate(TextUtils.format(tile.getMultiblock().lastMaxBoil));
}
@Override
public double getLevel() {
BoilerMultiblockData multiblock = tile.getMultiblock();
return Math.min(1, multiblock.lastMaxBoil * HeatUtils.getWaterThermalEnthalpy() / (multiblock.superheatingElements * MekanismConfig.general.superheatingHeatTransfer.get()));
}
}, 164, 13));
addButton(new GuiGasGauge(() -> tile.getMultiblock().superheatedCoolantTank, () -> tile.getMultiblock().getGasTanks(null), GaugeType.STANDARD, this, 6, 13).setLabel(MekanismLang.BOILER_HEATED_COOLANT_TANK.translateColored(EnumColor.ORANGE)));
addButton(new GuiFluidGauge(() -> tile.getMultiblock().waterTank, () -> tile.getMultiblock().getFluidTanks(null), GaugeType.STANDARD, this, 26, 13).setLabel(MekanismLang.BOILER_WATER_TANK.translateColored(EnumColor.INDIGO)));
addButton(new GuiGasGauge(() -> tile.getMultiblock().steamTank, () -> tile.getMultiblock().getGasTanks(null), GaugeType.STANDARD, this, 172, 13).setLabel(MekanismLang.BOILER_STEAM_TANK.translateColored(EnumColor.GRAY)));
addButton(new GuiGasGauge(() -> tile.getMultiblock().cooledCoolantTank, () -> tile.getMultiblock().getGasTanks(null), GaugeType.STANDARD, this, 192, 13).setLabel(MekanismLang.BOILER_COOLANT_TANK.translateColored(EnumColor.AQUA)));
addButton(new GuiHeatTab(this, () -> {
ITextComponent environment = MekanismUtils.getTemperatureDisplay(tile.getMultiblock().lastEnvironmentLoss, TemperatureUnit.KELVIN, false);
return Collections.singletonList(MekanismLang.DISSIPATED_RATE.translate(environment));
}));
}
Aggregations