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


Java IBlockAccess.getBiomeGenForCoords方法代码示例

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


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

示例1: getColorBiome

import net.minecraft.world.IBlockAccess; //导入方法依赖的package包/类
protected static BiomeGenBase getColorBiome(IBlockAccess p_getColorBiome_0_, BlockPos p_getColorBiome_1_)
{
    BiomeGenBase biomegenbase = p_getColorBiome_0_.getBiomeGenForCoords(p_getColorBiome_1_);

    if (biomegenbase == BiomeGenBase.swampland && !Config.isSwampColors())
    {
        biomegenbase = BiomeGenBase.plains;
    }

    return biomegenbase;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:CustomColors.java

示例2: getCustomColor

import net.minecraft.world.IBlockAccess; //导入方法依赖的package包/类
private static int getCustomColor(int[] p_getCustomColor_0_, IBlockAccess p_getCustomColor_1_, BlockPos p_getCustomColor_2_)
{
    BiomeGenBase biomegenbase = p_getCustomColor_1_.getBiomeGenForCoords(p_getCustomColor_2_);
    double d0 = (double)MathHelper.clamp_float(biomegenbase.getFloatTemperature(p_getCustomColor_2_), 0.0F, 1.0F);
    double d1 = (double)MathHelper.clamp_float(biomegenbase.getFloatRainfall(), 0.0F, 1.0F);
    d1 = d1 * d0;
    int i = (int)((1.0D - d0) * 255.0D);
    int j = (int)((1.0D - d1) * 255.0D);
    return p_getCustomColor_0_[j << 8 | i] & 16777215;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:11,代码来源:CustomColorizer.java

示例3: getSmoothColorMultiplier

import net.minecraft.world.IBlockAccess; //导入方法依赖的package包/类
private static int getSmoothColorMultiplier(Block p_getSmoothColorMultiplier_0_, IBlockAccess p_getSmoothColorMultiplier_1_, BlockPos p_getSmoothColorMultiplier_2_, int[] p_getSmoothColorMultiplier_3_, int[] p_getSmoothColorMultiplier_4_, int p_getSmoothColorMultiplier_5_, int p_getSmoothColorMultiplier_6_, RenderEnv p_getSmoothColorMultiplier_7_)
{
    int i = 0;
    int j = 0;
    int k = 0;
    int l = p_getSmoothColorMultiplier_2_.getX();
    int i1 = p_getSmoothColorMultiplier_2_.getY();
    int j1 = p_getSmoothColorMultiplier_2_.getZ();
    BlockPosM blockposm = p_getSmoothColorMultiplier_7_.getColorizerBlockPosM();

    for (int k1 = l - 1; k1 <= l + 1; ++k1)
    {
        for (int l1 = j1 - 1; l1 <= j1 + 1; ++l1)
        {
            blockposm.setXyz(k1, i1, l1);
            int[] aint = p_getSmoothColorMultiplier_3_;

            if (p_getSmoothColorMultiplier_4_ != p_getSmoothColorMultiplier_3_ && p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm) == BiomeGenBase.swampland)
            {
                aint = p_getSmoothColorMultiplier_4_;
            }

            int i2 = 0;

            if (aint == null)
            {
                switch (p_getSmoothColorMultiplier_5_)
                {
                    case 1:
                        i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getGrassColorAtPos(blockposm);
                        break;

                    case 2:
                        if ((p_getSmoothColorMultiplier_6_ & 3) == 1)
                        {
                            i2 = ColorizerFoliage.getFoliageColorPine();
                        }
                        else if ((p_getSmoothColorMultiplier_6_ & 3) == 2)
                        {
                            i2 = ColorizerFoliage.getFoliageColorBirch();
                        }
                        else
                        {
                            i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getFoliageColorAtPos(blockposm);
                        }

                        break;

                    default:
                        i2 = p_getSmoothColorMultiplier_0_.colorMultiplier(p_getSmoothColorMultiplier_1_, blockposm);
                }
            }
            else
            {
                i2 = getCustomColor(aint, p_getSmoothColorMultiplier_1_, blockposm);
            }

            i += i2 >> 16 & 255;
            j += i2 >> 8 & 255;
            k += i2 & 255;
        }
    }

    int j2 = i / 9;
    int k2 = j / 9;
    int l2 = k / 9;
    return j2 << 16 | k2 << 8 | l2;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:69,代码来源:CustomColorizer.java

示例4: getSmoothColorMultiplier

import net.minecraft.world.IBlockAccess; //导入方法依赖的package包/类
private static int getSmoothColorMultiplier(Block p_getSmoothColorMultiplier_0_, IBlockAccess p_getSmoothColorMultiplier_1_, BlockPos p_getSmoothColorMultiplier_2_, int[] p_getSmoothColorMultiplier_3_, int[] p_getSmoothColorMultiplier_4_, int p_getSmoothColorMultiplier_5_, int p_getSmoothColorMultiplier_6_, RenderEnv p_getSmoothColorMultiplier_7_)
{
    int i = 0;
    int j = 0;
    int k = 0;
    int l = p_getSmoothColorMultiplier_2_.getX();
    int i1 = p_getSmoothColorMultiplier_2_.getY();
    int j1 = p_getSmoothColorMultiplier_2_.getZ();
    BlockPosM blockposm = p_getSmoothColorMultiplier_7_.getColorizerBlockPos();

    for (int k1 = l - 1; k1 <= l + 1; ++k1)
    {
        for (int l1 = j1 - 1; l1 <= j1 + 1; ++l1)
        {
            blockposm.setXyz(k1, i1, l1);
            int[] aint = p_getSmoothColorMultiplier_3_;

            if (p_getSmoothColorMultiplier_4_ != p_getSmoothColorMultiplier_3_ && p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm) == BiomeGenBase.swampland)
            {
                aint = p_getSmoothColorMultiplier_4_;
            }

            int i2 = 0;

            if (aint == null)
            {
                switch (p_getSmoothColorMultiplier_5_)
                {
                    case 1:
                        i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getGrassColorAtPos(blockposm);
                        break;

                    case 2:
                        if ((p_getSmoothColorMultiplier_6_ & 3) == 1)
                        {
                            i2 = ColorizerFoliage.getFoliageColorPine();
                        }
                        else if ((p_getSmoothColorMultiplier_6_ & 3) == 2)
                        {
                            i2 = ColorizerFoliage.getFoliageColorBirch();
                        }
                        else
                        {
                            i2 = p_getSmoothColorMultiplier_1_.getBiomeGenForCoords(blockposm).getFoliageColorAtPos(blockposm);
                        }

                        break;

                    default:
                        i2 = p_getSmoothColorMultiplier_0_.colorMultiplier(p_getSmoothColorMultiplier_1_, blockposm);
                }
            }
            else
            {
                i2 = getCustomColor(aint, p_getSmoothColorMultiplier_1_, blockposm);
            }

            i += i2 >> 16 & 255;
            j += i2 >> 8 & 255;
            k += i2 & 255;
        }
    }

    int j2 = i / 9;
    int k2 = j / 9;
    int l2 = k / 9;
    return j2 << 16 | k2 << 8 | l2;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:69,代码来源:CustomColorizer.java


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