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


Java IBlockState.shouldSideBeRendered方法代码示例

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


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

示例1: renderModelSmooth

import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
public boolean renderModelSmooth(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
    boolean flag = false;
    RenderEnv renderenv = buffer.getRenderEnv(worldIn, stateIn, posIn);

    for (EnumFacing enumfacing : EnumFacing.VALUES)
    {
        List<BakedQuad> list = modelIn.getQuads(stateIn, enumfacing, rand);

        if (!list.isEmpty() && (!checkSides || stateIn.shouldSideBeRendered(worldIn, posIn, enumfacing)) && (!Hacks.findMod(XRay.class).isEnabled() || !XRay.xrayBlocks.contains(stateIn.getBlock())))
        {
            list = BlockModelCustomizer.getRenderQuads(list, worldIn, stateIn, posIn, enumfacing, rand, renderenv);
            this.renderQuadsSmooth(worldIn, stateIn, posIn, buffer, list, renderenv);
            flag = true;
        }
    }

    List<BakedQuad> list1 = modelIn.getQuads(stateIn, (EnumFacing)null, rand);

    if (!list1.isEmpty())
    {
        list1 = BlockModelCustomizer.getRenderQuads(list1, worldIn, stateIn, posIn, (EnumFacing)null, rand, renderenv);
        this.renderQuadsSmooth(worldIn, stateIn, posIn, buffer, list1, renderenv);
        flag = true;
    }

    return flag;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:29,代码来源:BlockModelRenderer.java

示例2: renderModelFlat

import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
public boolean renderModelFlat(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
    boolean flag = false;
    RenderEnv renderenv = buffer.getRenderEnv(worldIn, stateIn, posIn);

    for (EnumFacing enumfacing : EnumFacing.VALUES)
    {
        List<BakedQuad> list = modelIn.getQuads(stateIn, enumfacing, rand);

        if (!list.isEmpty() && (!checkSides || stateIn.shouldSideBeRendered(worldIn, posIn, enumfacing)))
        {
            int i = stateIn.getPackedLightmapCoords(worldIn, posIn.offset(enumfacing));
            list = BlockModelCustomizer.getRenderQuads(list, worldIn, stateIn, posIn, enumfacing, rand, renderenv);
            this.renderQuadsFlat(worldIn, stateIn, posIn, i, false, buffer, list, renderenv);
            flag = true;
        }
    }

    List<BakedQuad> list1 = modelIn.getQuads(stateIn, (EnumFacing)null, rand);

    if (!list1.isEmpty())
    {
        list1 = BlockModelCustomizer.getRenderQuads(list1, worldIn, stateIn, posIn, (EnumFacing)null, rand, renderenv);
        this.renderQuadsFlat(worldIn, stateIn, posIn, -1, true, buffer, list1, renderenv);
        flag = true;
    }

    return flag;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:30,代码来源:BlockModelRenderer.java

示例3: renderModelSmooth

import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
public boolean renderModelSmooth(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
    boolean flag = false;
    float[] afloat = new float[EnumFacing.values().length * 2];
    BitSet bitset = new BitSet(3);
    BlockModelRenderer.AmbientOcclusionFace blockmodelrenderer$ambientocclusionface = new BlockModelRenderer.AmbientOcclusionFace();

    for (EnumFacing enumfacing : EnumFacing.values())
    {
        List<BakedQuad> list = modelIn.getQuads(stateIn, enumfacing, rand);

        if (!list.isEmpty() && (!checkSides || stateIn.shouldSideBeRendered(worldIn, posIn, enumfacing)))
        {
            this.renderQuadsSmooth(worldIn, stateIn, posIn, buffer, list, afloat, bitset, blockmodelrenderer$ambientocclusionface);
            flag = true;
        }
    }

    List<BakedQuad> list1 = modelIn.getQuads(stateIn, (EnumFacing)null, rand);

    if (!list1.isEmpty())
    {
        this.renderQuadsSmooth(worldIn, stateIn, posIn, buffer, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface);
        flag = true;
    }

    return flag;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:29,代码来源:BlockModelRenderer.java

示例4: renderModelFlat

import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
public boolean renderModelFlat(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
    boolean flag = false;
    BitSet bitset = new BitSet(3);

    for (EnumFacing enumfacing : EnumFacing.values())
    {
        List<BakedQuad> list = modelIn.getQuads(stateIn, enumfacing, rand);

        if (!list.isEmpty() && (!checkSides || stateIn.shouldSideBeRendered(worldIn, posIn, enumfacing)))
        {
            int i = stateIn.getPackedLightmapCoords(worldIn, posIn.offset(enumfacing));
            this.renderQuadsFlat(worldIn, stateIn, posIn, i, false, buffer, list, bitset);
            flag = true;
        }
    }

    List<BakedQuad> list1 = modelIn.getQuads(stateIn, (EnumFacing)null, rand);

    if (!list1.isEmpty())
    {
        this.renderQuadsFlat(worldIn, stateIn, posIn, -1, true, buffer, list1, bitset);
        flag = true;
    }

    return flag;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:28,代码来源:BlockModelRenderer.java


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