当前位置: 首页>>代码示例>>Java>>正文


Java IBakedModel.isAmbientOcclusion方法代码示例

本文整理汇总了Java中net.minecraft.client.renderer.block.model.IBakedModel.isAmbientOcclusion方法的典型用法代码示例。如果您正苦于以下问题:Java IBakedModel.isAmbientOcclusion方法的具体用法?Java IBakedModel.isAmbientOcclusion怎么用?Java IBakedModel.isAmbientOcclusion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.client.renderer.block.model.IBakedModel的用法示例。


在下文中一共展示了IBakedModel.isAmbientOcclusion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: duplicateModel

import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:18,代码来源:ModelUtils.java

示例2: renderModel

import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
public boolean renderModel(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
    boolean flag = Minecraft.isAmbientOcclusionEnabled() && stateIn.getLightValue() == 0 && modelIn.isAmbientOcclusion();

    try
    {
        return flag ? this.renderModelSmooth(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand) : this.renderModelFlat(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block model");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Block model being tesselated");
        CrashReportCategory.addBlockInfo(crashreportcategory, posIn, stateIn);
        crashreportcategory.addCrashSection("Using AO", Boolean.valueOf(flag));
        throw new ReportedException(crashreport);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:18,代码来源:BlockModelRenderer.java

示例3: renderModel

import net.minecraft.client.renderer.block.model.IBakedModel; //导入方法依赖的package包/类
public boolean renderModel(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
    boolean flag = Minecraft.isAmbientOcclusionEnabled() && stateIn.getLightValue() == 0 && modelIn.isAmbientOcclusion();

    try
    {
        if (Config.isShaders())
        {
            SVertexBuilder.pushEntity(stateIn, posIn, worldIn, buffer);
        }

        if (!Config.isAlternateBlocks())
        {
            rand = 0L;
        }

        RenderEnv renderenv = buffer.getRenderEnv(worldIn, stateIn, posIn);
        modelIn = BlockModelCustomizer.getRenderModel(modelIn, stateIn, renderenv);
        boolean flag1 = flag ? this.renderModelSmooth(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand) : this.renderModelFlat(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand);

        if (flag1)
        {
            this.renderOverlayModels(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand, renderenv, flag);
        }

        if (Config.isShaders())
        {
            SVertexBuilder.popEntity(buffer);
        }

        return flag1;
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block model");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Block model being tesselated");
        CrashReportCategory.addBlockInfo(crashreportcategory, posIn, stateIn);
        crashreportcategory.addCrashSection("Using AO", Boolean.valueOf(flag));
        throw new ReportedException(crashreport);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:42,代码来源:BlockModelRenderer.java


注:本文中的net.minecraft.client.renderer.block.model.IBakedModel.isAmbientOcclusion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。