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


Java Block.shouldSideBeRendered方法代码示例

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


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

示例1: renderModelAmbientOcclusion

import net.minecraft.block.Block; //导入方法依赖的package包/类
public boolean renderModelAmbientOcclusion(IBlockAccess blockAccessIn, IBakedModel modelIn, Block blockIn, BlockPos blockPosIn, WorldRenderer worldRendererIn, boolean checkSides)
{
    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.getFaceQuads(enumfacing);

        if (!list.isEmpty())
        {
            BlockPos blockpos = blockPosIn.offset(enumfacing);

            if (!checkSides || blockIn.shouldSideBeRendered(blockAccessIn, blockpos, enumfacing))
            {
                this.renderModelAmbientOcclusionQuads(blockAccessIn, blockIn, blockPosIn, worldRendererIn, list, afloat, bitset, blockmodelrenderer$ambientocclusionface);
                flag = true;
            }
        }
    }

    List<BakedQuad> list1 = modelIn.getGeneralQuads();

    if (list1.size() > 0)
    {
        this.renderModelAmbientOcclusionQuads(blockAccessIn, blockIn, blockPosIn, worldRendererIn, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface);
        flag = true;
    }

    return flag;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:34,代码来源:BlockModelRenderer.java

示例2: renderModelStandard

import net.minecraft.block.Block; //导入方法依赖的package包/类
public boolean renderModelStandard(IBlockAccess blockAccessIn, IBakedModel modelIn, Block blockIn, BlockPos blockPosIn, WorldRenderer worldRendererIn, boolean checkSides)
{
    boolean flag = false;
    BitSet bitset = new BitSet(3);

    for (EnumFacing enumfacing : EnumFacing.values())
    {
        List<BakedQuad> list = modelIn.getFaceQuads(enumfacing);

        if (!list.isEmpty())
        {
            BlockPos blockpos = blockPosIn.offset(enumfacing);

            if (!checkSides || blockIn.shouldSideBeRendered(blockAccessIn, blockpos, enumfacing))
            {
                int i = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos);
                this.renderModelStandardQuads(blockAccessIn, blockIn, blockPosIn, enumfacing, i, false, worldRendererIn, list, bitset);
                flag = true;
            }
        }
    }

    List<BakedQuad> list1 = modelIn.getGeneralQuads();

    if (list1.size() > 0)
    {
        this.renderModelStandardQuads(blockAccessIn, blockIn, blockPosIn, (EnumFacing)null, -1, true, worldRendererIn, list1, bitset);
        flag = true;
    }

    return flag;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:33,代码来源:BlockModelRenderer.java

示例3: renderModelAmbientOcclusion

import net.minecraft.block.Block; //导入方法依赖的package包/类
public boolean renderModelAmbientOcclusion(IBlockAccess p_renderModelAmbientOcclusion_1_, IBakedModel p_renderModelAmbientOcclusion_2_, Block p_renderModelAmbientOcclusion_3_, IBlockState p_renderModelAmbientOcclusion_4_, BlockPos p_renderModelAmbientOcclusion_5_, WorldRenderer p_renderModelAmbientOcclusion_6_, boolean p_renderModelAmbientOcclusion_7_)
{
    boolean flag = false;
    RenderEnv renderenv = null;

    for (EnumFacing enumfacing : EnumFacing.VALUES)
    {
        List list = p_renderModelAmbientOcclusion_2_.getFaceQuads(enumfacing);

        if (!list.isEmpty())
        {
            BlockPos blockpos = p_renderModelAmbientOcclusion_5_.offset(enumfacing);

            if (!p_renderModelAmbientOcclusion_7_ || p_renderModelAmbientOcclusion_3_.shouldSideBeRendered(p_renderModelAmbientOcclusion_1_, blockpos, enumfacing))
            {
                if (renderenv == null)
                {
                    renderenv = RenderEnv.getInstance(p_renderModelAmbientOcclusion_1_, p_renderModelAmbientOcclusion_4_, p_renderModelAmbientOcclusion_5_);
                }

                if (!renderenv.isBreakingAnimation(list) && Config.isBetterGrass())
                {
                    list = BetterGrass.getFaceQuads(p_renderModelAmbientOcclusion_1_, p_renderModelAmbientOcclusion_3_, p_renderModelAmbientOcclusion_5_, enumfacing, list);
                }

                this.renderModelAmbientOcclusionQuads(p_renderModelAmbientOcclusion_1_, p_renderModelAmbientOcclusion_3_, p_renderModelAmbientOcclusion_5_, p_renderModelAmbientOcclusion_6_, list, renderenv);
                flag = true;
            }
        }
    }

    List list1 = p_renderModelAmbientOcclusion_2_.getGeneralQuads();

    if (list1.size() > 0)
    {
        if (renderenv == null)
        {
            renderenv = RenderEnv.getInstance(p_renderModelAmbientOcclusion_1_, p_renderModelAmbientOcclusion_4_, p_renderModelAmbientOcclusion_5_);
        }

        this.renderModelAmbientOcclusionQuads(p_renderModelAmbientOcclusion_1_, p_renderModelAmbientOcclusion_3_, p_renderModelAmbientOcclusion_5_, p_renderModelAmbientOcclusion_6_, list1, renderenv);
        flag = true;
    }

    if (renderenv != null && Config.isBetterSnow() && !renderenv.isBreakingAnimation() && BetterSnow.shouldRender(p_renderModelAmbientOcclusion_1_, p_renderModelAmbientOcclusion_3_, p_renderModelAmbientOcclusion_4_, p_renderModelAmbientOcclusion_5_))
    {
        IBakedModel ibakedmodel = BetterSnow.getModelSnowLayer();
        IBlockState iblockstate = BetterSnow.getStateSnowLayer();
        this.renderModelAmbientOcclusion(p_renderModelAmbientOcclusion_1_, ibakedmodel, iblockstate.getBlock(), iblockstate, p_renderModelAmbientOcclusion_5_, p_renderModelAmbientOcclusion_6_, true);
    }

    return flag;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:54,代码来源:BlockModelRenderer.java

示例4: renderModelStandard

import net.minecraft.block.Block; //导入方法依赖的package包/类
public boolean renderModelStandard(IBlockAccess p_renderModelStandard_1_, IBakedModel p_renderModelStandard_2_, Block p_renderModelStandard_3_, IBlockState p_renderModelStandard_4_, BlockPos p_renderModelStandard_5_, WorldRenderer p_renderModelStandard_6_, boolean p_renderModelStandard_7_)
{
    boolean flag = false;
    RenderEnv renderenv = null;

    for (EnumFacing enumfacing : EnumFacing.VALUES)
    {
        List list = p_renderModelStandard_2_.getFaceQuads(enumfacing);

        if (!list.isEmpty())
        {
            BlockPos blockpos = p_renderModelStandard_5_.offset(enumfacing);

            if (!p_renderModelStandard_7_ || p_renderModelStandard_3_.shouldSideBeRendered(p_renderModelStandard_1_, blockpos, enumfacing))
            {
                if (renderenv == null)
                {
                    renderenv = RenderEnv.getInstance(p_renderModelStandard_1_, p_renderModelStandard_4_, p_renderModelStandard_5_);
                }

                if (!renderenv.isBreakingAnimation(list) && Config.isBetterGrass())
                {
                    list = BetterGrass.getFaceQuads(p_renderModelStandard_1_, p_renderModelStandard_3_, p_renderModelStandard_5_, enumfacing, list);
                }

                int i = p_renderModelStandard_3_.getMixedBrightnessForBlock(p_renderModelStandard_1_, blockpos);
                this.renderModelStandardQuads(p_renderModelStandard_1_, p_renderModelStandard_3_, p_renderModelStandard_5_, enumfacing, i, false, p_renderModelStandard_6_, list, renderenv);
                flag = true;
            }
        }
    }

    List list1 = p_renderModelStandard_2_.getGeneralQuads();

    if (list1.size() > 0)
    {
        if (renderenv == null)
        {
            renderenv = RenderEnv.getInstance(p_renderModelStandard_1_, p_renderModelStandard_4_, p_renderModelStandard_5_);
        }

        this.renderModelStandardQuads(p_renderModelStandard_1_, p_renderModelStandard_3_, p_renderModelStandard_5_, (EnumFacing)null, -1, true, p_renderModelStandard_6_, list1, renderenv);
        flag = true;
    }

    if (renderenv != null && Config.isBetterSnow() && !renderenv.isBreakingAnimation() && BetterSnow.shouldRender(p_renderModelStandard_1_, p_renderModelStandard_3_, p_renderModelStandard_4_, p_renderModelStandard_5_) && BetterSnow.shouldRender(p_renderModelStandard_1_, p_renderModelStandard_3_, p_renderModelStandard_4_, p_renderModelStandard_5_))
    {
        IBakedModel ibakedmodel = BetterSnow.getModelSnowLayer();
        IBlockState iblockstate = BetterSnow.getStateSnowLayer();
        this.renderModelStandard(p_renderModelStandard_1_, ibakedmodel, iblockstate.getBlock(), iblockstate, p_renderModelStandard_5_, p_renderModelStandard_6_, true);
    }

    return flag;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:55,代码来源:BlockModelRenderer.java

示例5: onOcclusionShouldSideBeRendered

import net.minecraft.block.Block; //导入方法依赖的package包/类
@Redirect(method = "renderModelAmbientOcclusion", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/Block;shouldSideBeRendered(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/EnumFacing;)Z"))
public boolean onOcclusionShouldSideBeRendered(Block block, IBlockAccess worldIn, BlockPos pos, EnumFacing side) {
    boolean result = block.shouldSideBeRendered(worldIn, pos, side);
    return EventManager.post(new BlockShouldSideBeRendered(block, side, result)).getShouldSideBeRendered();
}
 
开发者ID:SerenityEnterprises,项目名称:SerenityCE,代码行数:6,代码来源:MixinBlockModelRenderer.java

示例6: onStandardShouldSideBeRendered

import net.minecraft.block.Block; //导入方法依赖的package包/类
@Redirect(method = "renderModelStandard", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/Block;shouldSideBeRendered(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/EnumFacing;)Z"))
public boolean onStandardShouldSideBeRendered(Block block, IBlockAccess worldIn, BlockPos pos, EnumFacing side) {
    boolean result = block.shouldSideBeRendered(worldIn, pos, side);
    return EventManager.post(new BlockShouldSideBeRendered(block, side, result)).getShouldSideBeRendered();
}
 
开发者ID:SerenityEnterprises,项目名称:SerenityCE,代码行数:6,代码来源:MixinBlockModelRenderer.java


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