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));
}
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()));
}
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));
}));
}
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));
}
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()));
}
Aggregations