use of codechicken.lib.render.pipeline.ColourMultiplier 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.ColourMultiplier 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.ColourMultiplier 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);
}
}
}
use of codechicken.lib.render.pipeline.ColourMultiplier in project GregTech by GregTechCE.
the class MetaTileEntityQuantumChest method renderMetaTileEntity.
@Override
public void renderMetaTileEntity(CCRenderState renderState, Matrix4 translation, IVertexOperation[] pipeline) {
Textures.VOLTAGE_CASINGS[tier].render(renderState, translation, ArrayUtils.add(pipeline, new ColourMultiplier(GTUtility.convertRGBtoOpaqueRGBA_CL(getPaintingColorForRendering()))));
translation.translate(0.5, 0.001, 0.5);
translation.rotate(Math.toRadians(rotations[getFrontFacing().getIndex() - 2]), new Vector3(0.0, 1.0, 0.0));
translation.translate(-0.5, 0.0, -0.5);
Textures.SCREEN.renderSided(EnumFacing.UP, renderState, translation, pipeline);
}
use of codechicken.lib.render.pipeline.ColourMultiplier 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);
}
Aggregations