本文整理匯總了Java中net.minecraft.world.biome.Biome.getBiomeName方法的典型用法代碼示例。如果您正苦於以下問題:Java Biome.getBiomeName方法的具體用法?Java Biome.getBiomeName怎麽用?Java Biome.getBiomeName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.world.biome.Biome
的用法示例。
在下文中一共展示了Biome.getBiomeName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: validateIntArray
import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
public void validateIntArray(int[] array, int xSize, int zSize) {
for (int z = 0; z < zSize; z++) {
for (int x = 0; x < xSize; x++) {
int id = array[x + z * xSize];
Biome b = Biome.getBiomeForId(id);
if (!(b instanceof FirmaBiome)) {
System.out.println(this.getClass() + " // Error Array garbage data: " + array[x + z * xSize]);
throw new RuntimeException(id + " " + b.getBiomeName() + " Not Firma Biome");
// return;
}
}
}
}
示例2: printBiomeInformation
import net.minecraft.world.biome.Biome; //導入方法依賴的package包/類
public static void printBiomeInformation() {
ExampleMod.logger.info("-------------------------------------------------------------------------------------------------------------");
ExampleMod.logger.info("Biome Information");
ExampleMod.logger.info("-------------------------------------------------------------------------------------------------------------");
ExampleMod.logger.info("ID | Location | Name");
Biome biome;
String output, name, prettyName;
for (int id = 0; id<256; id++) {
biome = Biome.getBiome(id);
name = "-";
prettyName = "-";
if (biome != null) {
name = biome.getRegistryName().toString();
prettyName = biome.getBiomeName();
}
output = "" + id;
output = padString(output, ' ', 3);
output += " | ";
output += padString(prettyName, ' ', 50);
output += " | ";
output += padString(name, ' ', 50);
ExampleMod.logger.info(output);
}
ExampleMod.logger.info("-------------------------------------------------------------------------------------------------------------");
}