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


Java IBlockState.func_191059_e方法代码示例

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


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

示例1: renderQuadsSmooth

import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
private void renderQuadsSmooth(IBlockAccess p_renderQuadsSmooth_1_, IBlockState p_renderQuadsSmooth_2_, BlockPos p_renderQuadsSmooth_3_, VertexBuffer p_renderQuadsSmooth_4_, List<BakedQuad> p_renderQuadsSmooth_5_, RenderEnv p_renderQuadsSmooth_6_)
{
    float[] afloat = p_renderQuadsSmooth_6_.getQuadBounds();
    BitSet bitset = p_renderQuadsSmooth_6_.getBoundsFlags();
    BlockModelRenderer.AmbientOcclusionFace blockmodelrenderer$ambientocclusionface = p_renderQuadsSmooth_6_.getAoFace();
    Vec3d vec3d = p_renderQuadsSmooth_2_.func_191059_e(p_renderQuadsSmooth_1_, p_renderQuadsSmooth_3_);
    double d0 = (double)p_renderQuadsSmooth_3_.getX() + vec3d.xCoord;
    double d1 = (double)p_renderQuadsSmooth_3_.getY() + vec3d.yCoord;
    double d2 = (double)p_renderQuadsSmooth_3_.getZ() + vec3d.zCoord;
    int i = 0;

    for (int j = p_renderQuadsSmooth_5_.size(); i < j; ++i)
    {
        BakedQuad bakedquad = (BakedQuad)p_renderQuadsSmooth_5_.get(i);
        this.fillQuadBounds(p_renderQuadsSmooth_2_, bakedquad.getVertexData(), bakedquad.getFace(), afloat, bitset);
        blockmodelrenderer$ambientocclusionface.updateVertexBrightness(p_renderQuadsSmooth_1_, p_renderQuadsSmooth_2_, p_renderQuadsSmooth_3_, bakedquad.getFace(), afloat, bitset);

        if (p_renderQuadsSmooth_4_.isMultiTexture())
        {
            p_renderQuadsSmooth_4_.addVertexData(bakedquad.getVertexDataSingle());
            p_renderQuadsSmooth_4_.putSprite(bakedquad.getSprite());
        }
        else
        {
            p_renderQuadsSmooth_4_.addVertexData(bakedquad.getVertexData());
        }

        p_renderQuadsSmooth_4_.putBrightness4(blockmodelrenderer$ambientocclusionface.vertexBrightness[0], blockmodelrenderer$ambientocclusionface.vertexBrightness[1], blockmodelrenderer$ambientocclusionface.vertexBrightness[2], blockmodelrenderer$ambientocclusionface.vertexBrightness[3]);

        if (bakedquad.shouldApplyDiffuseLighting())
        {
            float f = FaceBakery.getFaceBrightness(bakedquad.getFace());
            float[] afloat1 = blockmodelrenderer$ambientocclusionface.vertexColorMultiplier;
            afloat1[0] *= f;
            afloat1 = blockmodelrenderer$ambientocclusionface.vertexColorMultiplier;
            afloat1[1] *= f;
            afloat1 = blockmodelrenderer$ambientocclusionface.vertexColorMultiplier;
            afloat1[2] *= f;
            afloat1 = blockmodelrenderer$ambientocclusionface.vertexColorMultiplier;
            afloat1[3] *= f;
        }

        int l = CustomColors.getColorMultiplier(bakedquad, p_renderQuadsSmooth_2_, p_renderQuadsSmooth_1_, p_renderQuadsSmooth_3_, p_renderQuadsSmooth_6_);

        if (!bakedquad.hasTintIndex() && l == -1)
        {
            p_renderQuadsSmooth_4_.putColorMultiplier(blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[0], blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[0], blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[0], 4);
            p_renderQuadsSmooth_4_.putColorMultiplier(blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[1], blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[1], blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[1], 3);
            p_renderQuadsSmooth_4_.putColorMultiplier(blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[2], blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[2], blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[2], 2);
            p_renderQuadsSmooth_4_.putColorMultiplier(blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[3], blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[3], blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[3], 1);
        }
        else
        {
            int k = l;

            if (l == -1)
            {
                k = this.blockColors.colorMultiplier(p_renderQuadsSmooth_2_, p_renderQuadsSmooth_1_, p_renderQuadsSmooth_3_, bakedquad.getTintIndex());
            }

            if (EntityRenderer.anaglyphEnable)
            {
                k = TextureUtil.anaglyphColor(k);
            }

            float f1 = (float)(k >> 16 & 255) / 255.0F;
            float f2 = (float)(k >> 8 & 255) / 255.0F;
            float f3 = (float)(k & 255) / 255.0F;
            p_renderQuadsSmooth_4_.putColorMultiplier(blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[0] * f1, blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[0] * f2, blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[0] * f3, 4);
            p_renderQuadsSmooth_4_.putColorMultiplier(blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[1] * f1, blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[1] * f2, blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[1] * f3, 3);
            p_renderQuadsSmooth_4_.putColorMultiplier(blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[2] * f1, blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[2] * f2, blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[2] * f3, 2);
            p_renderQuadsSmooth_4_.putColorMultiplier(blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[3] * f1, blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[3] * f2, blockmodelrenderer$ambientocclusionface.vertexColorMultiplier[3] * f3, 1);
        }

        p_renderQuadsSmooth_4_.putPosition(d0, d1, d2);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:78,代码来源:BlockModelRenderer.java

示例2: renderQuadsFlat

import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
private void renderQuadsFlat(IBlockAccess p_renderQuadsFlat_1_, IBlockState p_renderQuadsFlat_2_, BlockPos p_renderQuadsFlat_3_, int p_renderQuadsFlat_4_, boolean p_renderQuadsFlat_5_, VertexBuffer p_renderQuadsFlat_6_, List<BakedQuad> p_renderQuadsFlat_7_, RenderEnv p_renderQuadsFlat_8_)
{
    BitSet bitset = p_renderQuadsFlat_8_.getBoundsFlags();
    Vec3d vec3d = p_renderQuadsFlat_2_.func_191059_e(p_renderQuadsFlat_1_, p_renderQuadsFlat_3_);
    double d0 = (double)p_renderQuadsFlat_3_.getX() + vec3d.xCoord;
    double d1 = (double)p_renderQuadsFlat_3_.getY() + vec3d.yCoord;
    double d2 = (double)p_renderQuadsFlat_3_.getZ() + vec3d.zCoord;
    int i = 0;

    for (int j = p_renderQuadsFlat_7_.size(); i < j; ++i)
    {
        BakedQuad bakedquad = (BakedQuad)p_renderQuadsFlat_7_.get(i);

        if (p_renderQuadsFlat_5_)
        {
            this.fillQuadBounds(p_renderQuadsFlat_2_, bakedquad.getVertexData(), bakedquad.getFace(), (float[])null, bitset);
            BlockPos blockpos = bitset.get(0) ? p_renderQuadsFlat_3_.offset(bakedquad.getFace()) : p_renderQuadsFlat_3_;
            p_renderQuadsFlat_4_ = p_renderQuadsFlat_2_.getPackedLightmapCoords(p_renderQuadsFlat_1_, blockpos);
        }

        if (p_renderQuadsFlat_6_.isMultiTexture())
        {
            p_renderQuadsFlat_6_.addVertexData(bakedquad.getVertexDataSingle());
            p_renderQuadsFlat_6_.putSprite(bakedquad.getSprite());
        }
        else
        {
            p_renderQuadsFlat_6_.addVertexData(bakedquad.getVertexData());
        }

        p_renderQuadsFlat_6_.putBrightness4(p_renderQuadsFlat_4_, p_renderQuadsFlat_4_, p_renderQuadsFlat_4_, p_renderQuadsFlat_4_);
        int l = CustomColors.getColorMultiplier(bakedquad, p_renderQuadsFlat_2_, p_renderQuadsFlat_1_, p_renderQuadsFlat_3_, p_renderQuadsFlat_8_);

        if (!bakedquad.hasTintIndex() && l == -1)
        {
            if (bakedquad.shouldApplyDiffuseLighting())
            {
                float f4 = FaceBakery.getFaceBrightness(bakedquad.getFace());
                p_renderQuadsFlat_6_.putColorMultiplier(f4, f4, f4, 4);
                p_renderQuadsFlat_6_.putColorMultiplier(f4, f4, f4, 3);
                p_renderQuadsFlat_6_.putColorMultiplier(f4, f4, f4, 2);
                p_renderQuadsFlat_6_.putColorMultiplier(f4, f4, f4, 1);
            }
        }
        else
        {
            int k = l;

            if (l == -1)
            {
                k = this.blockColors.colorMultiplier(p_renderQuadsFlat_2_, p_renderQuadsFlat_1_, p_renderQuadsFlat_3_, bakedquad.getTintIndex());
            }

            if (EntityRenderer.anaglyphEnable)
            {
                k = TextureUtil.anaglyphColor(k);
            }

            float f = (float)(k >> 16 & 255) / 255.0F;
            float f1 = (float)(k >> 8 & 255) / 255.0F;
            float f2 = (float)(k & 255) / 255.0F;

            if (bakedquad.shouldApplyDiffuseLighting())
            {
                float f3 = FaceBakery.getFaceBrightness(bakedquad.getFace());
                f *= f3;
                f1 *= f3;
                f2 *= f3;
            }

            p_renderQuadsFlat_6_.putColorMultiplier(f, f1, f2, 4);
            p_renderQuadsFlat_6_.putColorMultiplier(f, f1, f2, 3);
            p_renderQuadsFlat_6_.putColorMultiplier(f, f1, f2, 2);
            p_renderQuadsFlat_6_.putColorMultiplier(f, f1, f2, 1);
        }

        p_renderQuadsFlat_6_.putPosition(d0, d1, d2);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:80,代码来源:BlockModelRenderer.java


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