use of codechicken.lib.render.pipeline.ColourMultiplier 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);
}
Aggregations