use of mekanism.client.gui.element.gauge.GuiFluidGauge in project Mekanism by mekanism.
the class GuiRotaryCondensentrator method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiDownArrow(this, 159, 44));
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, 133, 13));
addButton(new GuiGasGauge(() -> tile.gasTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 25, 13));
addButton(new GuiProgress(new IBooleanProgressInfoHandler() {
@Override
public boolean fillProgressBar() {
return tile.getActive();
}
@Override
public boolean isActive() {
return !tile.mode;
}
}, ProgressType.LARGE_RIGHT, this, 64, 39).jeiCategories(condensentrating));
addButton(new GuiProgress(new IBooleanProgressInfoHandler() {
@Override
public boolean fillProgressBar() {
return tile.getActive();
}
@Override
public boolean isActive() {
return tile.mode;
}
}, ProgressType.LARGE_LEFT, this, 64, 39).jeiCategories(decondensentrating));
addButton(new ToggleButton(this, 4, 4, () -> tile.mode, () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.NEXT_MODE, tile)), getOnHover(MekanismLang.CONDENSENTRATOR_TOGGLE)));
}
use of mekanism.client.gui.element.gauge.GuiFluidGauge in project Mekanism by mekanism.
the class GuiFluidTank method addGuiElements.
@Override
protected void addGuiElements() {
// Add the side holder before the slots, as it holds a couple of the slots
addButton(GuiSideHolder.armorHolder(this));
super.addGuiElements();
addButton(new GuiContainerEditModeTab<>(this, tile));
addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.WIDE, this, 48, 18));
}
use of mekanism.client.gui.element.gauge.GuiFluidGauge in project Mekanism by mekanism.
the class GuiThermalEvaporationController method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiInnerScreen(this, 48, 19, 80, 40, () -> {
EvaporationMultiblockData multiblock = tile.getMultiblock();
return Arrays.asList(MekanismLang.MULTIBLOCK_FORMED.translate(), MekanismLang.EVAPORATION_HEIGHT.translate(multiblock.height()), MekanismLang.TEMPERATURE.translate(MekanismUtils.getTemperatureDisplay(multiblock.getTemperature(), TemperatureUnit.KELVIN, true)), MekanismLang.FLUID_PRODUCTION.translate(Math.round(multiblock.lastGain * 100D) / 100D));
}).spacing(1).jeiCategory(tile));
addButton(new GuiDownArrow(this, 32, 39));
addButton(new GuiDownArrow(this, 136, 39));
addButton(new GuiHorizontalRateBar(this, new IBarInfoHandler() {
@Override
public ITextComponent getTooltip() {
return MekanismUtils.getTemperatureDisplay(tile.getMultiblock().getTemperature(), TemperatureUnit.KELVIN, true);
}
@Override
public double getLevel() {
return Math.min(1, tile.getMultiblock().getTemperature() / EvaporationMultiblockData.MAX_MULTIPLIER_TEMP);
}
}, 48, 63));
addButton(new GuiFluidGauge(() -> tile.getMultiblock().inputTank, () -> tile.getMultiblock().getFluidTanks(null), GaugeType.STANDARD, this, 6, 13));
addButton(new GuiFluidGauge(() -> tile.getMultiblock().outputTank, () -> tile.getMultiblock().getFluidTanks(null), GaugeType.STANDARD, this, 152, 13));
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 GuiFusionReactorHeat method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
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 GuiNumberGauge(new INumberInfoHandler() {
@Override
public TextureAtlasSprite getIcon() {
return MekanismRenderer.getBaseFluidTexture(Fluids.LAVA, FluidType.STILL);
}
@Override
public double getLevel() {
return tile.getMultiblock().getLastPlasmaTemp();
}
@Override
public double getScaledLevel() {
return Math.min(1, getLevel() / MAX_LEVEL);
}
@Override
public ITextComponent getText() {
return GeneratorsLang.REACTOR_PLASMA.translate(MekanismUtils.getTemperatureDisplay(getLevel(), TemperatureUnit.KELVIN, true));
}
}, GaugeType.STANDARD, this, 7, 50));
addButton(new GuiProgress(() -> {
FusionReactorMultiblockData multiblock = tile.getMultiblock();
return multiblock.getLastPlasmaTemp() > multiblock.getLastCaseTemp();
}, ProgressType.SMALL_RIGHT, this, 29, 76));
addButton(new GuiNumberGauge(new INumberInfoHandler() {
@Override
public TextureAtlasSprite getIcon() {
return MekanismRenderer.getBaseFluidTexture(Fluids.LAVA, FluidType.STILL);
}
@Override
public double getLevel() {
return tile.getMultiblock().getLastCaseTemp();
}
@Override
public double getScaledLevel() {
return Math.min(1, getLevel() / MAX_LEVEL);
}
@Override
public ITextComponent getText() {
return GeneratorsLang.REACTOR_CASE.translate(MekanismUtils.getTemperatureDisplay(getLevel(), TemperatureUnit.KELVIN, true));
}
}, GaugeType.STANDARD, this, 61, 50));
addButton(new GuiProgress(() -> tile.getMultiblock().getCaseTemp() > 0, ProgressType.SMALL_RIGHT, this, 83, 61));
addButton(new GuiProgress(() -> {
FusionReactorMultiblockData multiblock = tile.getMultiblock();
return multiblock.getCaseTemp() > 0 && !multiblock.waterTank.isEmpty() && multiblock.steamTank.getStored() < multiblock.steamTank.getCapacity();
}, ProgressType.SMALL_RIGHT, this, 83, 91));
addButton(new GuiFluidGauge(() -> tile.getMultiblock().waterTank, () -> tile.getFluidTanks(null), GaugeType.SMALL, this, 115, 84));
addButton(new GuiGasGauge(() -> tile.getMultiblock().steamTank, () -> tile.getGasTanks(null), GaugeType.SMALL, this, 151, 84));
addButton(new GuiEnergyGauge(tile.getMultiblock().energyContainer, GaugeType.SMALL, this, 115, 46));
addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.FUEL));
addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.STAT));
}
use of mekanism.client.gui.element.gauge.GuiFluidGauge in project Mekanism by mekanism.
the class GuiHeatGenerator method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiEnergyTab(this, () -> Arrays.asList(GeneratorsLang.PRODUCING_AMOUNT.translate(EnergyDisplay.of(tile.getProducingEnergy())), MekanismLang.MAX_OUTPUT.translate(EnergyDisplay.of(tile.getMaxOutput())))));
addButton(new GuiFluidGauge(() -> tile.lavaTank, () -> tile.getFluidTanks(null), GaugeType.WIDE, this, 55, 18));
addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
addButton(new GuiHeatTab(this, () -> {
ITextComponent temp = MekanismUtils.getTemperatureDisplay(tile.getTotalTemperature(), TemperatureUnit.KELVIN, true);
ITextComponent transfer = MekanismUtils.getTemperatureDisplay(tile.getLastTransferLoss(), TemperatureUnit.KELVIN, false);
ITextComponent environment = MekanismUtils.getTemperatureDisplay(tile.getLastEnvironmentLoss(), TemperatureUnit.KELVIN, false);
return Arrays.asList(MekanismLang.TEMPERATURE.translate(temp), MekanismLang.TRANSFERRED_RATE.translate(transfer), MekanismLang.DISSIPATED_RATE.translate(environment));
}));
}
Aggregations