本文整理匯總了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);
}
}