use of codechicken.lib.render.pipeline.IVertexOperation in project GregTech by GregTechCE.
the class SteamMetaTileEntity method renderMetaTileEntity.
@Override
public void renderMetaTileEntity(CCRenderState renderState, IVertexOperation[] pipeline) {
IVertexOperation[] colouredPipeline = ArrayUtils.add(pipeline, new ColourMultiplier(paintingColor));
if (isHighPressure) {
Textures.STEAM_CASING_STEEL.render(renderState, colouredPipeline);
} else
Textures.STEAM_CASING_BRONZE.render(renderState, colouredPipeline);
renderer.render(renderState, pipeline, getFrontFacing(), workableHandler.isActive());
}
use of codechicken.lib.render.pipeline.IVertexOperation in project GregTech by GregTechCE.
the class SteamBoiler method renderMetaTileEntity.
@Override
public void renderMetaTileEntity(CCRenderState renderState, IVertexOperation[] pipeline) {
IVertexOperation[] colouredPipeline = ArrayUtils.add(pipeline, new ColourMultiplier(paintingColor));
if (isHighPressure) {
Textures.STEAM_CASING_STEEL.render(renderState, colouredPipeline);
} else
Textures.STEAM_CASING_BRONZE.render(renderState, colouredPipeline);
renderer.render(renderState, pipeline, getFrontFacing(), fuelBurnTimeLeft > 0);
}
use of codechicken.lib.render.pipeline.IVertexOperation in project GregTech by GregTechCE.
the class MetaTileEntityPump method renderMetaTileEntity.
@Override
@SideOnly(Side.CLIENT)
public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) {
super.renderMetaTileEntity(renderState, translation, pipeline);
ColourMultiplier multiplier = new ColourMultiplier(GTUtility.convertRGBtoOpaqueRGBA_CL(getPaintingColorForRendering()));
IVertexOperation[] coloredPipeline = ArrayUtils.add(pipeline, multiplier);
for (EnumFacing renderSide : EnumFacing.HORIZONTALS) {
if (renderSide == getFrontFacing()) {
Textures.PIPE_OUT_OVERLAY.renderSided(renderSide, renderState, translation, pipeline);
} else {
Textures.ADV_PUMP_OVERLAY.renderSided(renderSide, renderState, translation, coloredPipeline);
}
}
Textures.SCREEN.renderSided(EnumFacing.UP, renderState, translation, pipeline);
Textures.PIPE_IN_OVERLAY.renderSided(EnumFacing.DOWN, renderState, translation, pipeline);
}
use of codechicken.lib.render.pipeline.IVertexOperation in project GregTech by GregTechCE.
the class SteamMetaTileEntity method renderMetaTileEntity.
@Override
public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) {
IVertexOperation[] colouredPipeline = ArrayUtils.add(pipeline, new ColourMultiplier(GTUtility.convertRGBtoOpaqueRGBA_CL(getPaintingColorForRendering())));
getBaseRenderer().render(renderState, translation, colouredPipeline);
renderer.render(renderState, translation, pipeline, getFrontFacing(), workableHandler.isActive());
Textures.PIPE_OUT_OVERLAY.renderSided(workableHandler.getVentingSide(), renderState, translation, pipeline);
}
use of codechicken.lib.render.pipeline.IVertexOperation in project GregTech by GregTechCE.
the class TankRenderer method renderFluid.
@SideOnly(Side.CLIENT)
public void renderFluid(CCRenderState renderState, Matrix4 translation, int connectionMask, double fillPercent, FluidStack fluidStack) {
if (fluidStack != null) {
int fluidStackColor = fluidStack.getFluid().getColor(fluidStack);
double fluidLevelOffset = (offset(EnumFacing.UP, connectionMask) + offset(EnumFacing.DOWN, connectionMask));
double fluidLevel = fillPercent * (1.0 - fluidLevelOffset);
Cuboid6 resultFluidCuboid = createFullOffsetCuboid(connectionMask);
int resultFluidColor;
if (fluidStack.getFluid().isGaseous(fluidStack)) {
int opacity = (int) (fillPercent * 255);
resultFluidColor = GTUtility.convertRGBtoRGBA_CL(fluidStackColor, opacity);
} else {
resultFluidCuboid.max.y = resultFluidCuboid.min.y + fluidLevel;
resultFluidColor = GTUtility.convertRGBtoOpaqueRGBA_CL(fluidStackColor);
}
ColourMultiplier multiplier = new ColourMultiplier(resultFluidColor);
IVertexOperation[] fluidPipeline = new IVertexOperation[] { multiplier };
TextureAtlasSprite fluidSprite = TextureUtils.getTexture(fluidStack.getFluid().getStill(fluidStack));
for (EnumFacing renderSide : EnumFacing.VALUES) {
if (hasFaceBit(connectionMask, renderSide))
continue;
Textures.renderFace(renderState, translation, fluidPipeline, renderSide, resultFluidCuboid, fluidSprite);
}
}
}
Aggregations