Search in sources :

Example 1 with UVTransformationList

use of codechicken.lib.vec.uv.UVTransformationList in project GregTech by GregTechCE.

the class Textures method renderFace.

@SideOnly(Side.CLIENT)
public static void renderFace(CCRenderState renderState, Matrix4 translation, IVertexOperation[] ops, EnumFacing face, Cuboid6 bounds, TextureAtlasSprite sprite) {
    BlockFace blockFace = blockFaces.get();
    blockFace.loadCuboidFace(bounds, face.getIndex());
    UVTransformationList uvList = new UVTransformationList(new IconTransformation(sprite));
    if (face.getIndex() == 0) {
        uvList.prepend(new UVMirror(0, 0, bounds.min.z, bounds.max.z));
    }
    renderState.setPipeline(blockFace, 0, blockFace.verts.length, ArrayUtils.addAll(ops, new TransformationList(translation), uvList));
    renderState.render();
}
Also used : BlockFace(codechicken.lib.render.BlockRenderer.BlockFace) UVTransformationList(codechicken.lib.vec.uv.UVTransformationList) TransformationList(codechicken.lib.vec.TransformationList) UVTransformationList(codechicken.lib.vec.uv.UVTransformationList) IconTransformation(codechicken.lib.vec.uv.IconTransformation) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

BlockFace (codechicken.lib.render.BlockRenderer.BlockFace)1 TransformationList (codechicken.lib.vec.TransformationList)1 IconTransformation (codechicken.lib.vec.uv.IconTransformation)1 UVTransformationList (codechicken.lib.vec.uv.UVTransformationList)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1