本文整理汇总了Java中cn.nukkit.level.generator.populator.PopulatorCactus类的典型用法代码示例。如果您正苦于以下问题:Java PopulatorCactus类的具体用法?Java PopulatorCactus怎么用?Java PopulatorCactus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PopulatorCactus类属于cn.nukkit.level.generator.populator包,在下文中一共展示了PopulatorCactus类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SandyBiome
import cn.nukkit.level.generator.populator.PopulatorCactus; //导入依赖的package包/类
public SandyBiome() {
PopulatorCactus cactus = new PopulatorCactus();
cactus.setBaseAmount(2);
PopulatorDeadBush deadbush = new PopulatorDeadBush();
deadbush.setBaseAmount(2);
this.addPopulator(cactus);
this.addPopulator(deadbush);
this.setGroundCover(new Block[]{
new BlockSand(),
new BlockSand(),
new BlockSandstone(),
new BlockSandstone(),
new BlockSandstone()
});
}
示例2: DesertBiome
import cn.nukkit.level.generator.populator.PopulatorCactus; //导入依赖的package包/类
public DesertBiome() {
super();
PopulatorCactus cactus = new PopulatorCactus();
cactus.setRandomAmount(10);
PopulatorDeadBush deadbush = new PopulatorDeadBush();
deadbush.setRandomAmount(2);
this.addPopulator(cactus);
this.addPopulator(deadbush);
this.setElevation(63, 69);
this.temperature = 2.0f;
this.rainfall = 0.0f;
}