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