本文整理匯總了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;
}