Java 类net.minecraft.client.resources.model.SimpleBakedModel 实例源码

项目:BaseClient    文件:ModelUtils.java   
public static IBakedModel duplicateModel(IBakedModel p_duplicateModel_0_)
{
    List list = duplicateQuadList(p_duplicateModel_0_.getGeneralQuads());
    EnumFacing[] aenumfacing = EnumFacing.VALUES;
    List list1 = new ArrayList();

    for (int i = 0; i < aenumfacing.length; ++i)
    {
        EnumFacing enumfacing = aenumfacing[i];
        List list2 = p_duplicateModel_0_.getFaceQuads(enumfacing);
        List list3 = duplicateQuadList(list2);
        list1.add(list3);
    }

    SimpleBakedModel simplebakedmodel = new SimpleBakedModel(list, list1, p_duplicateModel_0_.isAmbientOcclusion(), p_duplicateModel_0_.isGui3d(), p_duplicateModel_0_.getParticleTexture(), p_duplicateModel_0_.getItemCameraTransforms());
    return simplebakedmodel;
}
项目:BaseClient    文件:BlockModelUtils.java   
public static IBakedModel makeModelCube(TextureAtlasSprite p_makeModelCube_0_, int p_makeModelCube_1_)
{
    List list = new ArrayList();
    EnumFacing[] aenumfacing = EnumFacing.VALUES;
    List list1 = new ArrayList(aenumfacing.length);

    for (int i = 0; i < aenumfacing.length; ++i)
    {
        EnumFacing enumfacing = aenumfacing[i];
        List list2 = new ArrayList();
        list2.add(makeBakedQuad(enumfacing, p_makeModelCube_0_, p_makeModelCube_1_));
        list1.add(list2);
    }

    IBakedModel ibakedmodel = new SimpleBakedModel(list, list1, true, true, p_makeModelCube_0_, ItemCameraTransforms.DEFAULT);
    return ibakedmodel;
}
项目:BaseClient    文件:BlockModelUtils.java   
public static IBakedModel makeModelCube(TextureAtlasSprite p_makeModelCube_0_, int p_makeModelCube_1_)
{
    List list = new ArrayList();
    EnumFacing[] aenumfacing = EnumFacing.values();
    List list1 = new ArrayList(aenumfacing.length);

    for (int i = 0; i < aenumfacing.length; ++i)
    {
        EnumFacing enumfacing = aenumfacing[i];
        List list2 = new ArrayList();
        list2.add(makeBakedQuad(enumfacing, p_makeModelCube_0_, p_makeModelCube_1_));
        list1.add(list2);
    }

    IBakedModel ibakedmodel = new SimpleBakedModel(list, list1, true, true, p_makeModelCube_0_, ItemCameraTransforms.DEFAULT);
    return ibakedmodel;
}
项目:DecompiledMinecraft    文件:BlockRendererDispatcher.java   
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess)
{
    Block block = state.getBlock();
    int i = block.getRenderType();

    if (i == 3)
    {
        state = block.getActualState(state, blockAccess, pos);
        IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state);
        IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(ibakedmodel, texture)).makeBakedModel();
        this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getWorldRenderer());
    }
}
项目:BaseClient    文件:BlockRendererDispatcher.java   
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess)
{
    Block block = state.getBlock();
    int i = block.getRenderType();

    if (i == 3)
    {
        state = block.getActualState(state, blockAccess, pos);
        IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state);

        if (Reflector.ISmartBlockModel.isInstance(ibakedmodel))
        {
            IBlockState iblockstate = (IBlockState)Reflector.call(block, Reflector.ForgeBlock_getExtendedState, new Object[] {state, blockAccess, pos});

            for (EnumWorldBlockLayer enumworldblocklayer : EnumWorldBlockLayer.values())
            {
                if (Reflector.callBoolean(block, Reflector.ForgeBlock_canRenderInLayer, new Object[] {enumworldblocklayer}))
                {
                    Reflector.callVoid(Reflector.ForgeHooksClient_setRenderLayer, new Object[] {enumworldblocklayer});
                    IBakedModel ibakedmodel2 = (IBakedModel)Reflector.call(ibakedmodel, Reflector.ISmartBlockModel_handleBlockState, new Object[] {iblockstate});
                    IBakedModel ibakedmodel3 = (new SimpleBakedModel.Builder(ibakedmodel2, texture)).makeBakedModel();
                    this.blockModelRenderer.renderModel(blockAccess, ibakedmodel3, state, pos, Tessellator.getInstance().getWorldRenderer());
                }
            }

            return;
        }

        IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(ibakedmodel, texture)).makeBakedModel();
        this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getWorldRenderer());
    }
}
项目:BaseClient    文件:BlockRendererDispatcher.java   
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess)
{
    Block block = state.getBlock();
    int i = block.getRenderType();

    if (i == 3)
    {
        state = block.getActualState(state, blockAccess, pos);
        IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state);
        IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(ibakedmodel, texture)).makeBakedModel();
        this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getWorldRenderer());
    }
}
项目:SasaLib    文件:ItemIconModel.java   
protected IBakedModel bakeModel(ModelBlockWrapper modelBlockIn, ITransformation modelRotationIn, boolean uvLocked, TextureAtlasSprite texture)
{
    TextureAtlasSprite textureatlassprite = texture;

    //TextureAtlasSprite textureatlassprite = textureGetter.apply(textureLocation);
    SimpleBakedModel.Builder builder = (new SimpleBakedModel.Builder(this, textureatlassprite)).setTexture(textureatlassprite);
    Iterator iterator = modelBlockIn.getElements().iterator();

    for(BlockPart blockpart : (List<BlockPart>)modelBlockIn.getElements())
    {
        for(EnumFacing enumfacing : ((Map<EnumFacing, BlockPartFace>)blockpart.mapFaces).keySet())
        {
            BlockPartFace blockpartface = (BlockPartFace)blockpart.mapFaces.get(enumfacing);
            TextureAtlasSprite textureatlassprite1 = texture;

            if (blockpartface.cullFace == null || !net.minecraftforge.client.model.TRSRTransformation.isInteger(modelRotationIn.getMatrix()))
            {
                builder.addGeneralQuad(this.makeBakedQuad(blockpart, blockpartface, textureatlassprite1, enumfacing, modelRotationIn, uvLocked));
            }
            else
            {
                builder.addFaceQuad(modelRotationIn.rotate(blockpartface.cullFace), this.makeBakedQuad(blockpart, blockpartface, textureatlassprite1, enumfacing, modelRotationIn, uvLocked));
            }
        }
    }

    return builder.makeBakedModel();
}
项目:Factorization    文件:ShaftModel.java   
public IBakedModel bake(IBakedModel source) {
    return new SimpleBakedModel(quads, empty_faces, false, true, source.getParticleTexture(), source.getItemCameraTransforms());
}