Search in sources :

Example 6 with IFlexibleBakedModel

use of net.minecraftforge.client.model.IFlexibleBakedModel in project BuildCraft by BuildCraft.

the class RobotStationModel method baseQuads.

private List<MutableQuad> baseQuads() {
    if (modelBaseQuads.isEmpty()) {
        IModel base = modelBase();
        if (base != null) {
            Function<ResourceLocation, TextureAtlasSprite> singleTextureFunction = BuildCraftBakedModel.singleTextureFunction(baseSprite);
            IFlexibleBakedModel baked = base.bake(ModelRotation.X0_Y0, DefaultVertexFormats.BLOCK, singleTextureFunction);
            for (BakedQuad quad : baked.getGeneralQuads()) {
                MutableQuad mutable = MutableQuad.create(quad);
                modelBaseQuads.add(mutable);
            }
        }
    }
    return modelBaseQuads;
}
Also used : BakedQuad(net.minecraft.client.renderer.block.model.BakedQuad) IModel(net.minecraftforge.client.model.IModel) TextureAtlasSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite) ResourceLocation(net.minecraft.util.ResourceLocation) IFlexibleBakedModel(net.minecraftforge.client.model.IFlexibleBakedModel) MutableQuad(buildcraft.lib.client.model.MutableQuad)

Aggregations

MutableQuad (buildcraft.lib.client.model.MutableQuad)6 BakedQuad (net.minecraft.client.renderer.block.model.BakedQuad)6 IFlexibleBakedModel (net.minecraftforge.client.model.IFlexibleBakedModel)6 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)3 IModel (net.minecraftforge.client.model.IModel)3 Matrix4f (javax.vecmath.Matrix4f)1 ResourceLocation (net.minecraft.util.ResourceLocation)1