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


Java BiomeGenBase.getBiome方法代码示例

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


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

示例1: getBiome

import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
public BiomeGenBase getBiome(BlockPos pos, WorldChunkManager chunkManager)
{
    int i = pos.getX() & 15;
    int j = pos.getZ() & 15;
    int k = this.blockBiomeArray[j << 4 | i] & 255;

    if (k == 255)
    {
        BiomeGenBase biomegenbase = chunkManager.getBiomeGenerator(pos, BiomeGenBase.plains);
        k = biomegenbase.biomeID;
        this.blockBiomeArray[j << 4 | i] = (byte)(k & 255);
    }

    BiomeGenBase biomegenbase1 = BiomeGenBase.getBiome(k);
    return biomegenbase1 == null ? BiomeGenBase.plains : biomegenbase1;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:17,代码来源:Chunk.java

示例2: canBiomesBeNeighbors

import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
/**
 * Returns if two biomes can logically be neighbors. If one is hot and the other cold, for example, it returns
 * false.
 */
private boolean canBiomesBeNeighbors(int p_151634_1_, int p_151634_2_)
{
    if (biomesEqualOrMesaPlateau(p_151634_1_, p_151634_2_))
    {
        return true;
    }
    else
    {
        BiomeGenBase biomegenbase = BiomeGenBase.getBiome(p_151634_1_);
        BiomeGenBase biomegenbase1 = BiomeGenBase.getBiome(p_151634_2_);

        if (biomegenbase != null && biomegenbase1 != null)
        {
            BiomeGenBase.TempCategory biomegenbase$tempcategory = biomegenbase.getTempCategory();
            BiomeGenBase.TempCategory biomegenbase$tempcategory1 = biomegenbase1.getTempCategory();
            return biomegenbase$tempcategory == biomegenbase$tempcategory1 || biomegenbase$tempcategory == BiomeGenBase.TempCategory.MEDIUM || biomegenbase$tempcategory1 == BiomeGenBase.TempCategory.MEDIUM;
        }
        else
        {
            return false;
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:28,代码来源:GenLayerBiomeEdge.java

示例3: biomesEqualOrMesaPlateau

import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
protected static boolean biomesEqualOrMesaPlateau(int biomeIDA, int biomeIDB)
{
    if (biomeIDA == biomeIDB)
    {
        return true;
    }
    else if (biomeIDA != BiomeGenBase.mesaPlateau_F.biomeID && biomeIDA != BiomeGenBase.mesaPlateau.biomeID)
    {
        final BiomeGenBase biomegenbase = BiomeGenBase.getBiome(biomeIDA);
        final BiomeGenBase biomegenbase1 = BiomeGenBase.getBiome(biomeIDB);

        try
        {
            return biomegenbase != null && biomegenbase1 != null ? biomegenbase.isEqualTo(biomegenbase1) : false;
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Comparing biomes");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Biomes being compared");
            crashreportcategory.addCrashSection("Biome A ID", Integer.valueOf(biomeIDA));
            crashreportcategory.addCrashSection("Biome B ID", Integer.valueOf(biomeIDB));
            crashreportcategory.addCrashSectionCallable("Biome A", new Callable<String>()
            {
                public String call() throws Exception
                {
                    return String.valueOf((Object)biomegenbase);
                }
            });
            crashreportcategory.addCrashSectionCallable("Biome B", new Callable<String>()
            {
                public String call() throws Exception
                {
                    return String.valueOf((Object)biomegenbase1);
                }
            });
            throw new ReportedException(crashreport);
        }
    }
    else
    {
        return biomeIDB == BiomeGenBase.mesaPlateau_F.biomeID || biomeIDB == BiomeGenBase.mesaPlateau.biomeID;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:44,代码来源:GenLayer.java

示例4: func_151631_c

import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
private boolean func_151631_c(int p_151631_1_)
{
    return BiomeGenBase.getBiome(p_151631_1_) != null && BiomeGenBase.getBiome(p_151631_1_).getBiomeClass() == BiomeGenJungle.class ? true : p_151631_1_ == BiomeGenBase.jungleEdge.biomeID || p_151631_1_ == BiomeGenBase.jungle.biomeID || p_151631_1_ == BiomeGenBase.jungleHills.biomeID || p_151631_1_ == BiomeGenBase.forest.biomeID || p_151631_1_ == BiomeGenBase.taiga.biomeID || isBiomeOceanic(p_151631_1_);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:GenLayerShore.java

示例5: func_151633_d

import net.minecraft.world.biome.BiomeGenBase; //导入方法依赖的package包/类
private boolean func_151633_d(int p_151633_1_)
{
    return BiomeGenBase.getBiome(p_151633_1_) instanceof BiomeGenMesa;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:GenLayerShore.java


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