本文整理汇总了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;
}
示例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;
}
}
}
示例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;
}
}
示例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_);
}
示例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;
}