本文整理汇总了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;
}
示例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);
}
}
示例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);
}
}