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