本文整理汇总了Java中net.minecraft.world.biome.Biome.TempCategory方法的典型用法代码示例。如果您正苦于以下问题:Java Biome.TempCategory方法的具体用法?Java Biome.TempCategory怎么用?Java Biome.TempCategory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.biome.Biome
的用法示例。
在下文中一共展示了Biome.TempCategory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTempCategoryCheck
import net.minecraft.world.biome.Biome; //导入方法依赖的package包/类
private void addTempCategoryCheck(AttributeMap map) {
String tempcategory = map.get(TEMPCATEGORY).toLowerCase();
Biome.TempCategory cat = null;
if ("cold".equals(tempcategory)) {
cat = Biome.TempCategory.COLD;
} else if ("medium".equals(tempcategory)) {
cat = Biome.TempCategory.MEDIUM;
} else if ("warm".equals(tempcategory)) {
cat = Biome.TempCategory.WARM;
} else if ("ocean".equals(tempcategory)) {
cat = Biome.TempCategory.OCEAN;
} else {
InControl.logger.log(Level.ERROR, "Unknown tempcategory '" + tempcategory + "'! Use one of 'cold', 'medium', 'warm', or 'ocean'");
return;
}
Biome.TempCategory finalCat = cat;
checks.add((event,query) -> {
Biome biome = query.getWorld(event).getBiome(query.getPos(event));
return biome.getTempCategory() == finalCat;
});
}
示例2: canBiomesBeNeighbors
import net.minecraft.world.biome.Biome; //导入方法依赖的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
{
Biome biome = Biome.getBiome(p_151634_1_);
Biome biome1 = Biome.getBiome(p_151634_2_);
if (biome != null && biome1 != null)
{
Biome.TempCategory biome$tempcategory = biome.getTempCategory();
Biome.TempCategory biome$tempcategory1 = biome1.getTempCategory();
return biome$tempcategory == biome$tempcategory1 || biome$tempcategory == Biome.TempCategory.MEDIUM || biome$tempcategory1 == Biome.TempCategory.MEDIUM;
}
else
{
return false;
}
}
}
示例3: getTempCategory
import net.minecraft.world.biome.Biome; //导入方法依赖的package包/类
@Override
public Biome.TempCategory getTempCategory()
{
return Biome.TempCategory.OCEAN;
}