Search in sources :

Example 1 with WidgetTank

use of pneumaticCraft.client.gui.widget.WidgetTank in project PneumaticCraft by MineMaarten.

the class GuiLiquidHopper method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTank(0, guiLeft + 116, guiTop + 15, te.getTank()));
    statusStat = addAnimatedStat("gui.tab.hopperStatus", new ItemStack(Blockss.omnidirectionalHopper), 0xFFFFAA00, false);
    GuiAnimatedStat optionStat = addAnimatedStat("gui.tab.gasLift.mode", new ItemStack(net.minecraft.init.Blocks.lever), 0xFFFFCC00, false);
    List<String> text = new ArrayList<String>();
    for (int i = 0; i < 4; i++) text.add("               ");
    optionStat.setTextWithoutCuttingString(text);
    GuiButtonSpecial button = new GuiButtonSpecial(1, 5, 20, 20, 20, "");
    button.setRenderStacks(new ItemStack(Items.bucket));
    button.setTooltipText(I18n.format("gui.tab.liquidHopper.mode.empty"));
    optionStat.addWidget(button);
    modeButtons[0] = button;
    button = new GuiButtonSpecial(2, 30, 20, 20, 20, "");
    button.setRenderStacks(new ItemStack(Items.water_bucket));
    button.setTooltipText(I18n.format("gui.tab.liquidHopper.mode.leaveLiquid"));
    optionStat.addWidget(button);
    modeButtons[1] = button;
}
Also used : ArrayList(java.util.ArrayList) WidgetTank(pneumaticCraft.client.gui.widget.WidgetTank) ItemStack(net.minecraft.item.ItemStack) GuiAnimatedStat(pneumaticCraft.client.gui.widget.GuiAnimatedStat) Point(java.awt.Point)

Example 2 with WidgetTank

use of pneumaticCraft.client.gui.widget.WidgetTank in project PneumaticCraft by MineMaarten.

the class PneumaticCraftPlugins method loadTankTransferRects.

private void loadTankTransferRects(int recipe) {
    MultipleInputOutputRecipe r = (MultipleInputOutputRecipe) arecipes.get(recipe);
    transferRects.clear();
    loadTransferRects();
    for (WidgetTank tank : r.inputLiquids) {
        transferRects.add(new RecipeTransferRect(tank.getBounds(), "liquid", tank.getFluid()));
    }
    for (WidgetTank tank : r.outputLiquids) {
        transferRects.add(new RecipeTransferRect(tank.getBounds(), "liquid", tank.getFluid()));
    }
}
Also used : WidgetTank(pneumaticCraft.client.gui.widget.WidgetTank)

Example 3 with WidgetTank

use of pneumaticCraft.client.gui.widget.WidgetTank in project PneumaticCraft by MineMaarten.

the class GuiRefinery method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTemperature(-1, guiLeft + 32, guiTop + 20, 273, 673, te.getHeatExchangerLogic(ForgeDirection.UNKNOWN), 373));
    addWidget(new WidgetTank(-1, guiLeft + 8, guiTop + 13, te.getOilTank()));
    int x = guiLeft + 95;
    int y = guiTop + 17;
    addWidget(new WidgetTank(-1, x, y, te.getOutputTank()));
    refineries = new ArrayList<TileEntityRefinery>();
    refineries.add(te);
    TileEntityRefinery refinery = te;
    while (refinery.getTileCache()[ForgeDirection.UP.ordinal()].getTileEntity() instanceof TileEntityRefinery) {
        refinery = (TileEntityRefinery) refinery.getTileCache()[ForgeDirection.UP.ordinal()].getTileEntity();
        x += 20;
        y -= 4;
        if (refineries.size() < 4)
            addWidget(new WidgetTank(-1, x, y, refinery.getOutputTank()));
        refineries.add(refinery);
    }
    if (refineries.size() < 2 || refineries.size() > 4) {
        problemTab.openWindow();
    }
}
Also used : TileEntityRefinery(pneumaticCraft.common.tileentity.TileEntityRefinery) WidgetTemperature(pneumaticCraft.client.gui.widget.WidgetTemperature) WidgetTank(pneumaticCraft.client.gui.widget.WidgetTank) Point(java.awt.Point)

Example 4 with WidgetTank

use of pneumaticCraft.client.gui.widget.WidgetTank in project PneumaticCraft by MineMaarten.

the class GuiThermopneumaticProcessingPlant method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTank(-1, guiLeft + 13, guiTop + 15, te.getInputTank()));
    addWidget(new WidgetTank(-1, guiLeft + 79, guiTop + 15, te.getOutputTank()));
    addWidget(tempWidget = new WidgetTemperature(-1, guiLeft + 98, guiTop + 15, 273, 673, te.getHeatExchangerLogic(ForgeDirection.UNKNOWN), (int) te.requiredTemperature));
}
Also used : WidgetTemperature(pneumaticCraft.client.gui.widget.WidgetTemperature) WidgetTank(pneumaticCraft.client.gui.widget.WidgetTank)

Example 5 with WidgetTank

use of pneumaticCraft.client.gui.widget.WidgetTank in project PneumaticCraft by MineMaarten.

the class GuiLiquidCompressor method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTank(0, guiLeft + getFluidOffset(), guiTop + 15, te.getFluidTank()));
    addAnimatedStat("gui.tab.liquidCompressor.fuel", new ItemStack(Items.lava_bucket), 0xFFFF6600, true).setTextWithoutCuttingString(getAllFuels());
}
Also used : WidgetTank(pneumaticCraft.client.gui.widget.WidgetTank) ItemStack(net.minecraft.item.ItemStack)

Aggregations

WidgetTank (pneumaticCraft.client.gui.widget.WidgetTank)8 Point (java.awt.Point)4 ItemStack (net.minecraft.item.ItemStack)4 ArrayList (java.util.ArrayList)3 GuiAnimatedStat (pneumaticCraft.client.gui.widget.GuiAnimatedStat)3 WidgetTemperature (pneumaticCraft.client.gui.widget.WidgetTemperature)3 GuiCheckBox (pneumaticCraft.client.gui.widget.GuiCheckBox)1 WidgetLabel (pneumaticCraft.client.gui.widget.WidgetLabel)1 WidgetTextFieldNumber (pneumaticCraft.client.gui.widget.WidgetTextFieldNumber)1 TileEntityRefinery (pneumaticCraft.common.tileentity.TileEntityRefinery)1