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

项目:Backmemed    文件:ModelUtils.java   
public static IBakedModel duplicateModel(IBakedModel p_duplicateModel_0_)
{
    List list = duplicateQuadList(p_duplicateModel_0_.getQuads((IBlockState)null, (EnumFacing)null, 0L));
    EnumFacing[] aenumfacing = EnumFacing.VALUES;
    Map<EnumFacing, List<BakedQuad>> map = new HashMap();

    for (int i = 0; i < aenumfacing.length; ++i)
    {
        EnumFacing enumfacing = aenumfacing[i];
        List list1 = p_duplicateModel_0_.getQuads((IBlockState)null, enumfacing, 0L);
        List list2 = duplicateQuadList(list1);
        map.put(enumfacing, list2);
    }

    SimpleBakedModel simplebakedmodel = new SimpleBakedModel(list, map, p_duplicateModel_0_.isAmbientOcclusion(), p_duplicateModel_0_.isGui3d(), p_duplicateModel_0_.getParticleTexture(), p_duplicateModel_0_.getItemCameraTransforms(), p_duplicateModel_0_.getOverrides());
    return simplebakedmodel;
}
项目:Backmemed    文件:BlockModelUtils.java   
public static IBakedModel makeModelCube(TextureAtlasSprite p_makeModelCube_0_, int p_makeModelCube_1_)
{
    List list = new ArrayList();
    EnumFacing[] aenumfacing = EnumFacing.VALUES;
    Map<EnumFacing, List<BakedQuad>> map = new HashMap();

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

    ItemOverrideList itemoverridelist = new ItemOverrideList(new ArrayList());
    IBakedModel ibakedmodel = new SimpleBakedModel(list, map, true, true, p_makeModelCube_0_, ItemCameraTransforms.DEFAULT, itemoverridelist);
    return ibakedmodel;
}
项目:Backmemed    文件:BlockRendererDispatcher.java   
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess)
{
    if (state.getRenderType() == EnumBlockRenderType.MODEL)
    {
        state = state.getActualState(blockAccess, pos);
        IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state);
        IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(state, ibakedmodel, texture, pos)).makeBakedModel();
        this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getBuffer(), true);
    }
}
项目:CustomWorldGen    文件:ForgeHooksClient.java   
public static IBakedModel getDamageModel(IBakedModel ibakedmodel, TextureAtlasSprite texture, IBlockState state, IBlockAccess world, BlockPos pos)
{
    state = state.getBlock().getExtendedState(state, world, pos);
    return (new SimpleBakedModel.Builder(state, ibakedmodel, texture, pos)).makeBakedModel();
}