use of mekanism.common.content.evaporation.EvaporationMultiblockData 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.common.content.evaporation.EvaporationMultiblockData in project Mekanism by mekanism.
the class RenderThermalEvaporationPlant method render.
@Override
protected void render(TileEntityThermalEvaporationController tile, float partialTick, MatrixStack matrix, IRenderTypeBuffer renderer, int light, int overlayLight, IProfiler profiler) {
if (tile.isMaster()) {
EvaporationMultiblockData multiblock = tile.getMultiblock();
if (multiblock.isFormed() && multiblock.renderLocation != null && !multiblock.inputTank.isEmpty()) {
FluidRenderData data = new FluidRenderData(multiblock.inputTank.getFluid());
data.location = multiblock.renderLocation.offset(1, 0, 1);
data.height = multiblock.height() - 2;
data.length = 2;
data.width = 2;
matrix.pushPose();
BlockPos pos = tile.getBlockPos();
int glow = data.calculateGlowLight(MekanismRenderer.FULL_SKY_LIGHT);
matrix.translate(data.location.getX() - pos.getX(), data.location.getY() - pos.getY(), data.location.getZ() - pos.getZ());
IVertexBuilder buffer = renderer.getBuffer(Atlases.translucentCullBlockSheet());
Model3D model = ModelRenderer.getModel(data, Math.min(1, multiblock.prevScale));
MekanismRenderer.renderObject(model, matrix, buffer, data.getColorARGB(multiblock.prevScale), glow, overlayLight, getFaceDisplay(data, model));
matrix.popPose();
MekanismRenderer.renderValves(matrix, buffer, multiblock.valves, data, pos, glow, overlayLight, isInsideMultiblock(data));
}
}
}
Aggregations