Search in sources :

Example 1 with GuiBoilerTab

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()));
}
Also used : GuiBoilerTab(mekanism.client.gui.element.tab.GuiBoilerTab) GuiGraph(mekanism.client.gui.element.GuiGraph) ITextComponent(net.minecraft.util.text.ITextComponent) GuiHeatTab(mekanism.client.gui.element.tab.GuiHeatTab)

Example 2 with GuiBoilerTab

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));
    }));
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiBoilerTab(mekanism.client.gui.element.tab.GuiBoilerTab) IBarInfoHandler(mekanism.client.gui.element.bar.GuiBar.IBarInfoHandler) GuiVerticalRateBar(mekanism.client.gui.element.bar.GuiVerticalRateBar) BoilerMultiblockData(mekanism.common.content.boiler.BoilerMultiblockData) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) ITextComponent(net.minecraft.util.text.ITextComponent) GuiHeatTab(mekanism.client.gui.element.tab.GuiHeatTab)

Aggregations

GuiBoilerTab (mekanism.client.gui.element.tab.GuiBoilerTab)2 GuiHeatTab (mekanism.client.gui.element.tab.GuiHeatTab)2 ITextComponent (net.minecraft.util.text.ITextComponent)2 GuiGraph (mekanism.client.gui.element.GuiGraph)1 GuiInnerScreen (mekanism.client.gui.element.GuiInnerScreen)1 IBarInfoHandler (mekanism.client.gui.element.bar.GuiBar.IBarInfoHandler)1 GuiVerticalRateBar (mekanism.client.gui.element.bar.GuiVerticalRateBar)1 GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)1 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)1 BoilerMultiblockData (mekanism.common.content.boiler.BoilerMultiblockData)1