use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.
the class GuiChemicalCrystallizer method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 157, 23));
addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
addButton(new GuiMergedChemicalTankGauge<>(() -> tile.inputTank, () -> tile, GaugeType.STANDARD, this, 7, 4));
addButton(new GuiProgress(tile::getScaledProgress, ProgressType.LARGE_RIGHT, this, 53, 61).jeiCategory(tile));
// Init slot display before gui screen, so it can reference it, but add it after, so it renders above it
slotDisplay = new GuiSequencedSlotDisplay(this, 129, 14, () -> iterStacks);
updateSlotContents();
addButton(new GuiInnerScreen(this, 31, 13, 115, 42, () -> getScreenRenderStrings(this.oreInfo)));
addButton(new GuiSlot(SlotType.ORE, this, 128, 13).setRenderAboveSlots());
addButton(slotDisplay);
}
use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.
the class GuiChemicalDissolutionChamber method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
addButton(new GuiGasGauge(() -> tile.injectTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 7, 4));
addButton(new GuiMergedChemicalTankGauge<>(() -> tile.outputTank, () -> tile, GaugeType.STANDARD, this, 131, 13));
addButton(new GuiProgress(tile::getScaledProgress, ProgressType.LARGE_RIGHT, this, 64, 40).jeiCategory(tile));
}
use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.
the class GuiFormulaicAssemblicator method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 159, 15));
// Overwrite the output slots with a "combined" slot
addButton(new GuiSlot(SlotType.OUTPUT_LARGE, this, 115, 16));
addButton(new GuiProgress(() -> tile.getOperatingTicks() / (double) tile.getTicksRequired(), ProgressType.TALL_RIGHT, this, 86, 43).jeiCrafting());
addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
encodeFormulaButton = addButton(new MekanismImageButton(this, 7, 45, 14, getButtonLocation("encode_formula"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.ENCODE_FORMULA, tile)), getOnHover(MekanismLang.ENCODE_FORMULA)));
stockControlButton = addButton(new MekanismImageButton(this, 26, 75, 16, getButtonLocation("stock_control"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.STOCK_CONTROL_BUTTON, tile)), getOnHover(() -> MekanismLang.STOCK_CONTROL.translate(OnOff.of(tile.getStockControl())))));
fillEmptyButton = addButton(new MekanismImageButton(this, 44, 75, 16, getButtonLocation("fill_empty"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.MOVE_ITEMS, tile)), getOnHover(MekanismLang.FILL_EMPTY)));
craftSingleButton = addButton(new MekanismImageButton(this, 71, 75, 16, getButtonLocation("craft_single"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.CRAFT_SINGLE, tile)), getOnHover(MekanismLang.CRAFT_SINGLE)));
craftAvailableButton = addButton(new MekanismImageButton(this, 89, 75, 16, getButtonLocation("craft_available"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.CRAFT_ALL, tile)), getOnHover(MekanismLang.CRAFT_AVAILABLE)));
autoModeButton = addButton(new MekanismImageButton(this, 107, 75, 16, getButtonLocation("auto_toggle"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.NEXT_MODE, tile)), getOnHover(() -> MekanismLang.AUTO_MODE.translate(OnOff.of(tile.getAutoMode())))));
updateEnabledButtons();
}
use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.
the class GuiMetallurgicInfuser method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
addButton(new GuiProgress(tile::getScaledProgress, ProgressType.RIGHT, this, 72, 47).jeiCategory(tile));
addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(tile.infusionTank, tile.getInfusionTanks(null)), 7, 15, 4, 52, false));
addButton(new GuiDumpButton<>(this, tile, 16, 59));
}
use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.
the class GuiFusionReactorController method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
if (tile.getMultiblock().isFormed()) {
addButton(new GuiEnergyTab(this, () -> {
FusionReactorMultiblockData multiblock = tile.getMultiblock();
return Arrays.asList(MekanismLang.STORING.translate(EnergyDisplay.of(multiblock.energyContainer)), GeneratorsLang.PRODUCING_AMOUNT.translate(EnergyDisplay.of(multiblock.getPassiveGeneration(false, true))));
}));
addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.HEAT));
addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.FUEL));
addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.STAT));
}
}
Aggregations