當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。