Search in sources :

Example 1 with PacketRemoveModule

use of mekanism.common.network.to_server.PacketRemoveModule in project Mekanism by mekanism.

the class GuiModificationStation method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 154, 40));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
    addButton(new GuiProgress(tile::getScaledProgress, ProgressType.LARGE_RIGHT, this, 65, 123));
    removeButton = addButton(new TranslationButton(this, 34, 96, 108, 17, MekanismLang.BUTTON_REMOVE, () -> Mekanism.packetHandler.sendToServer(new PacketRemoveModule(tile.getBlockPos(), selectedModule.getData()))));
    removeButton.active = false;
    addButton(new GuiModuleScrollList(this, 34, 20, 108, 74, () -> tile.containerSlot.getStack().copy(), this::onModuleSelected));
}
Also used : TranslationButton(mekanism.client.gui.element.button.TranslationButton) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) PacketRemoveModule(mekanism.common.network.to_server.PacketRemoveModule) GuiModuleScrollList(mekanism.client.gui.element.scroll.GuiModuleScrollList)

Aggregations

GuiVerticalPowerBar (mekanism.client.gui.element.bar.GuiVerticalPowerBar)1 TranslationButton (mekanism.client.gui.element.button.TranslationButton)1 GuiProgress (mekanism.client.gui.element.progress.GuiProgress)1 GuiModuleScrollList (mekanism.client.gui.element.scroll.GuiModuleScrollList)1 GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)1 PacketRemoveModule (mekanism.common.network.to_server.PacketRemoveModule)1