use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.
the class GuiCombiner method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiUpArrow(this, 68, 38));
addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
addButton(new GuiProgress(tile::getScaledProgress, ProgressType.BAR, this, 86, 38).jeiCategory(tile));
}
use of mekanism.client.gui.element.tab.GuiEnergyTab 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.tab.GuiEnergyTab in project Mekanism by mekanism.
the class GuiFactory method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiSortingTab(this, tile));
addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), imageWidth - 12, 16, tile instanceof TileEntitySawingFactory ? 73 : 52));
addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getLastUsage));
if (tile.hasSecondaryResourceBar()) {
if (tile instanceof TileEntityMetallurgicInfuserFactory) {
TileEntityMetallurgicInfuserFactory factory = (TileEntityMetallurgicInfuserFactory) this.tile;
addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(factory.getInfusionTank(), tile.getInfusionTanks(null)), 7, 76, tile.tier == FactoryTier.ULTIMATE ? 172 : 138, 4, true));
addButton(new GuiDumpButton<>(this, factory, tile.tier == FactoryTier.ULTIMATE ? 182 : 148, 76));
} else if (tile instanceof TileEntityItemStackGasToItemStackFactory) {
TileEntityItemStackGasToItemStackFactory factory = (TileEntityItemStackGasToItemStackFactory) this.tile;
addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(factory.getGasTank(), tile.getGasTanks(null)), 7, 76, tile.tier == FactoryTier.ULTIMATE ? 172 : 138, 4, true));
addButton(new GuiDumpButton<>(this, factory, tile.tier == FactoryTier.ULTIMATE ? 182 : 148, 76));
}
}
int baseX = tile.tier == FactoryTier.BASIC ? 55 : tile.tier == FactoryTier.ADVANCED ? 35 : tile.tier == FactoryTier.ELITE ? 29 : 27;
int baseXMult = tile.tier == FactoryTier.BASIC ? 38 : tile.tier == FactoryTier.ADVANCED ? 26 : 19;
for (int i = 0; i < tile.tier.processes; i++) {
int cacheIndex = i;
addProgress(new GuiProgress(() -> tile.getScaledProgress(1, cacheIndex), ProgressType.DOWN, this, 4 + baseX + (i * baseXMult), 33));
}
}
use of mekanism.client.gui.element.tab.GuiEnergyTab 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()));
}
use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.
the class GuiIsotopicCentrifuge method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
addButton(new GuiGasGauge(() -> tile.inputTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 25, 13));
addButton(new GuiGasGauge(() -> tile.outputTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 133, 13));
addButton(new GuiProgress(tile::getActive, ProgressType.LARGE_RIGHT, this, 64, 39).jeiCategory(tile));
}
Aggregations