本文整理匯總了Java中org.bukkit.block.Biome.JUNGLE屬性的典型用法代碼示例。如果您正苦於以下問題:Java Biome.JUNGLE屬性的具體用法?Java Biome.JUNGLE怎麽用?Java Biome.JUNGLE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.bukkit.block.Biome
的用法示例。
在下文中一共展示了Biome.JUNGLE屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: reduceLogs
private void reduceLogs()
{
boolean jungleBiome = this.biome == Biome.JUNGLE || this.biome == Biome.JUNGLE_HILLS;
//scan all blocks above sea level
for(int x = 1; x < snapshots.length - 1; x++)
{
for(int z = 1; z < snapshots[0][0].length - 1; z++)
{
for(int y = this.seaLevel - 1; y < snapshots[0].length; y++)
{
BlockSnapshot block = snapshots[x][y][z];
//skip non-logs
if(block.typeId != Material.LOG.getId()) continue;
//if in jungle biome, skip jungle logs
if(jungleBiome && block.data == 3) continue;
//examine adjacent blocks for logs
BlockSnapshot leftBlock = this.snapshots[x + 1][y][z];
BlockSnapshot rightBlock = this.snapshots[x - 1][y][z];
BlockSnapshot upBlock = this.snapshots[x][y][z + 1];
BlockSnapshot downBlock = this.snapshots[x][y][z - 1];
//if any, remove the log
if(leftBlock.typeId == Material.LOG.getId() || rightBlock.typeId == Material.LOG.getId() || upBlock.typeId == Material.LOG.getId() || downBlock.typeId == Material.LOG.getId())
{
this.snapshots[x][y][z].typeId = Material.AIR.getId();
}
}
}
}
}
示例2: getHome
@Override
public Biome getHome() {
return Biome.JUNGLE;
}