Search in sources :

Example 6 with GuiFluidGauge

use of mekanism.client.gui.element.gauge.GuiFluidGauge in project Mekanism by mekanism.

the class GuiChemicalWasher method addGuiElements.

@Override
protected void addGuiElements() {
    // Add the side holder before the slots, as it holds a couple of the slots
    addButton(GuiSideHolder.create(this, imageWidth, 66, 57, false, true, SpecialColors.TAB_CHEMICAL_WASHER));
    super.addGuiElements();
    addButton(new GuiDownArrow(this, imageWidth + 8, 91));
    addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 7, 13));
    addButton(new GuiSlurryGauge(() -> tile.inputTank, () -> tile.getSlurryTanks(null), GaugeType.STANDARD, this, 28, 13));
    addButton(new GuiSlurryGauge(() -> tile.outputTank, () -> tile.getSlurryTanks(null), GaugeType.STANDARD, this, 131, 13));
    addButton(new GuiProgress(tile::getActive, ProgressType.LARGE_RIGHT, this, 64, 39).jeiCategory(tile));
}
Also used : GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiDownArrow(mekanism.client.gui.element.GuiDownArrow) GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiSlurryGauge(mekanism.client.gui.element.gauge.GuiSlurryGauge) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 7 with GuiFluidGauge

use of mekanism.client.gui.element.gauge.GuiFluidGauge in project Mekanism by mekanism.

the class GuiElectricPump method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiInnerScreen(this, 54, 23, 80, 41, () -> {
        List<ITextComponent> list = new ArrayList<>();
        list.add(EnergyDisplay.of(tile.getEnergyContainer()).getTextComponent());
        FluidStack fluidStack = tile.fluidTank.getFluid();
        if (fluidStack.isEmpty()) {
            list.add(MekanismLang.NO_FLUID.translate());
        } else {
            list.add(MekanismLang.GENERIC_STORED_MB.translate(fluidStack, TextUtils.format(fluidStack.getAmount())));
        }
        return list;
    }));
    addButton(new GuiDownArrow(this, 32, 39));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 6, 13));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiDownArrow(mekanism.client.gui.element.GuiDownArrow) FluidStack(net.minecraftforge.fluids.FluidStack) ArrayList(java.util.ArrayList) List(java.util.List) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 8 with GuiFluidGauge

use of mekanism.client.gui.element.gauge.GuiFluidGauge 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)

Example 9 with GuiFluidGauge

use of mekanism.client.gui.element.gauge.GuiFluidGauge in project Mekanism by mekanism.

the class GuiElectrolyticSeparator method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 5, 10));
    addButton(new GuiGasGauge(() -> tile.leftTank, () -> tile.getGasTanks(null), GaugeType.SMALL, this, 58, 18));
    addButton(new GuiGasGauge(() -> tile.rightTank, () -> tile.getGasTanks(null), GaugeType.SMALL, this, 100, 18));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiProgress(tile::getActive, ProgressType.BI, this, 80, 30).jeiCategory(tile));
    addButton(new GuiGasMode(this, 7, 72, false, () -> tile.dumpLeft, tile.getBlockPos(), 0));
    addButton(new GuiGasMode(this, 159, 72, true, () -> tile.dumpRight, tile.getBlockPos(), 1));
}
Also used : GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiGasMode(mekanism.client.gui.element.button.GuiGasMode) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 10 with GuiFluidGauge

use of mekanism.client.gui.element.gauge.GuiFluidGauge in project Mekanism by mekanism.

the class GuiFluidicPlenisher method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiInnerScreen(this, 54, 23, 80, 41, () -> {
        List<ITextComponent> list = new ArrayList<>();
        list.add(EnergyDisplay.of(tile.getEnergyContainer()).getTextComponent());
        list.add(MekanismLang.FINISHED.translate(YesNo.of(tile.finishedCalc)));
        FluidStack fluid = tile.fluidTank.getFluid();
        if (fluid.isEmpty()) {
            list.add(MekanismLang.NO_FLUID.translate());
        } else {
            list.add(MekanismLang.GENERIC_STORED_MB.translate(fluid, TextUtils.format(fluid.getAmount())));
        }
        return list;
    }));
    addButton(new GuiDownArrow(this, 32, 39));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 6, 13));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiDownArrow(mekanism.client.gui.element.GuiDownArrow) FluidStack(net.minecraftforge.fluids.FluidStack) ArrayList(java.util.ArrayList) List(java.util.List) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Aggregations

GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)11 GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)8 GuiDownArrow (mekanism.client.gui.element.GuiDownArrow)5 GuiVerticalPowerBar (mekanism.client.gui.element.bar.GuiVerticalPowerBar)5 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)5 GuiProgress (mekanism.client.gui.element.progress.GuiProgress)5 GuiInnerScreen (mekanism.client.gui.element.GuiInnerScreen)4 GuiHeatTab (mekanism.client.gui.element.tab.GuiHeatTab)3 ITextComponent (net.minecraft.util.text.ITextComponent)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 IBarInfoHandler (mekanism.client.gui.element.bar.GuiBar.IBarInfoHandler)2 GuiHorizontalPowerBar (mekanism.client.gui.element.bar.GuiHorizontalPowerBar)2 FluidStack (net.minecraftforge.fluids.FluidStack)2 GuiHorizontalRateBar (mekanism.client.gui.element.bar.GuiHorizontalRateBar)1 GuiVerticalRateBar (mekanism.client.gui.element.bar.GuiVerticalRateBar)1 GuiGasMode (mekanism.client.gui.element.button.GuiGasMode)1 ToggleButton (mekanism.client.gui.element.button.ToggleButton)1 GuiEnergyGauge (mekanism.client.gui.element.gauge.GuiEnergyGauge)1 GuiNumberGauge (mekanism.client.gui.element.gauge.GuiNumberGauge)1