本文整理汇总了Java中cn.nukkit.level.generator.object.ore.OreType类的典型用法代码示例。如果您正苦于以下问题:Java OreType类的具体用法?Java OreType怎么用?Java OreType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OreType类属于cn.nukkit.level.generator.object.ore包,在下文中一共展示了OreType类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: Flat
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
public Flat(Map<String, Object> options) {
this.preset = "2;7,2x3,2;1;";
this.options = options;
if (this.options.containsKey("decoration")) {
PopulatorOre ores = new PopulatorOre();
ores.setOreTypes(new OreType[]{
new OreType(new BlockOreCoal(), 20, 16, 0, 128),
new OreType(new BlockOreIron(), 20, 8, 0, 64),
new OreType(new BlockOreRedstone(), 8, 7, 0, 16),
new OreType(new BlockOreLapis(), 1, 6, 0, 32),
new OreType(new BlockOreGold(), 2, 8, 0, 32),
new OreType(new BlockOreDiamond(), 1, 7, 0, 16),
new OreType(new BlockDirt(), 20, 32, 0, 128),
new OreType(new BlockGravel(), 20, 16, 0, 128),
});
this.populators.add(ores);
}
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:20,代码来源:Flat.java
示例2: Flat
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
public Flat(Map<String, Object> options) {
this.preset = "2;7,2x3,2;1;";
this.options = options;
this.chunk = null;
if (this.options.containsKey("decoration")) {
PopulatorOre ores = new PopulatorOre();
ores.setOreTypes(new OreType[]{
new OreType(new BlockOreCoal(), 20, 16, 0, 128),
new OreType(new BlockOreIron(), 20, 8, 0, 64),
new OreType(new BlockOreRedstone(), 8, 7, 0, 16),
new OreType(new BlockOreLapis(), 1, 6, 0, 32),
new OreType(new BlockOreGold(), 2, 8, 0, 32),
new OreType(new BlockOreDiamond(), 1, 7, 0, 16),
new OreType(new BlockDirt(), 20, 32, 0, 128),
new OreType(new BlockGravel(), 20, 16, 0, 128),
});
this.populators.add(ores);
}
}
开发者ID:Creeperface01,项目名称:NukkitGT,代码行数:21,代码来源:Flat.java
示例3: init
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
@Override
public void init(ChunkManager level, NukkitRandom random) {
this.level = level;
this.nukkitRandom = random;
this.random = new Random();
this.nukkitRandom.setSeed(this.level.getSeed());
this.noiseBase = new Simplex(this.nukkitRandom, 4, 1 / 4f, 1 / 64f);
this.nukkitRandom.setSeed(this.level.getSeed());
this.localSeed1 = this.random.nextLong();
this.localSeed2 = this.random.nextLong();
PopulatorOre ores = new PopulatorOre(Block.NETHERRACK);
ores.setOreTypes(new OreType[]{
new OreType(new BlockOreQuartz(), 20, 16, 0, 128),
new OreType(new BlockSoulSand(), 5, 64, 0, 128),
new OreType(new BlockGravel(), 5, 64, 0, 128),
new OreType(new BlockLava(), 1, 16, 0, (int) this.waterHeight),
});
this.populators.add(ores);
this.populators.add(new PopulatorGlowStone());
PopulatorGroundFire groundFire = new PopulatorGroundFire();
groundFire.setBaseAmount(1);
groundFire.setRandomAmount(1);
this.populators.add(groundFire);
PopulatorLava lava = new PopulatorLava();
lava.setBaseAmount(0);
lava.setRandomAmount(2);
this.populators.add(lava);
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:29,代码来源:Nether.java
示例4: populate
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
@Override
public void populate(ChunkManager level, int chunkX, int chunkZ, NukkitRandom random) {
for (OreType type : this.oreTypes) {
ObjectOre ore = new ObjectOre(random, type, replaceId);
for (int i = 0; i < ore.type.clusterCount; ++i) {
int x = NukkitMath.randomRange(random, chunkX << 4, (chunkX << 4) + 15);
int y = NukkitMath.randomRange(random, ore.type.minHeight, ore.type.maxHeight);
int z = NukkitMath.randomRange(random, chunkZ << 4, (chunkZ << 4) + 15);
if (ore.canPlaceObject(level, x, y, z)) {
ore.placeObject(level, x, y, z);
}
}
}
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:15,代码来源:PopulatorOre.java
示例5: populate
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
@Override
public void populate(ChunkManager level, int chunkX, int chunkZ, NukkitRandom random) {
for (OreType type : this.oreTypes) {
ObjectOre ore = new ObjectOre(random, type);
for (int i = 0; i < ore.type.clusterCount; ++i) {
int x = NukkitMath.randomRange(random, chunkX << 4, (chunkX << 4) + 15);
int y = NukkitMath.randomRange(random, ore.type.minHeight, ore.type.maxHeight);
int z = NukkitMath.randomRange(random, chunkZ << 4, (chunkZ << 4) + 15);
if (ore.canPlaceObject(level, x, y, z)) {
ore.placeObject(level, x, y, z);
}
}
}
}
开发者ID:Creeperface01,项目名称:NukkitGT,代码行数:15,代码来源:PopulatorOre.java
示例6: init
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
@Override
public void init(ChunkManager level, NukkitRandom random) {
this.level = level;
this.random = random;
this.random.setSeed(this.level.getSeed());
this.noiseSeaFloor = new Simplex(this.random, 1F, 1F / 8F, 1F / 64F);
this.noiseLand = new Simplex(this.random, 2F, 1F / 8F, 1F / 512F);
this.noiseMountains = new Simplex(this.random, 4F, 1F, 1F / 500F);
this.noiseBaseGround = new Simplex(this.random, 4F, 1F / 4F, 1F / 64F);
this.noiseRiver = new Simplex(this.random, 2F, 1F, 1F / 512F);
this.random.setSeed(this.level.getSeed());
this.selector = new BiomeSelector(this.random, Biome.getBiome(Biome.OCEAN));
this.heightOffset = random.nextRange(-5, 3);
this.selector.addBiome(Biome.getBiome(Biome.OCEAN));
this.selector.addBiome(Biome.getBiome(Biome.PLAINS));
this.selector.addBiome(Biome.getBiome(Biome.DESERT));
this.selector.addBiome(Biome.getBiome(Biome.MOUNTAINS));
this.selector.addBiome(Biome.getBiome(Biome.FOREST));
this.selector.addBiome(Biome.getBiome(Biome.TAIGA));
this.selector.addBiome(Biome.getBiome(Biome.SWAMP));
this.selector.addBiome(Biome.getBiome(Biome.RIVER));
this.selector.addBiome(Biome.getBiome(Biome.ICE_PLAINS));
this.selector.addBiome(Biome.getBiome(Biome.SMALL_MOUNTAINS));
this.selector.addBiome(Biome.getBiome(Biome.BIRCH_FOREST));
this.selector.recalculate();
PopulatorGroundCover cover = new PopulatorGroundCover();
this.generationPopulators.add(cover);
PopulatorCaves caves = new PopulatorCaves();
this.populators.add(caves);
PopulatorOre ores = new PopulatorOre();
ores.setOreTypes(new OreType[]{
new OreType(new BlockOreCoal(), 20, 16, 0, 128),
new OreType(new BlockOreIron(), 20, 8, 0, 64),
new OreType(new BlockOreRedstone(), 8, 7, 0, 16),
new OreType(new BlockOreLapis(), 1, 6, 0, 32),
new OreType(new BlockOreGold(), 2, 8, 0, 32),
new OreType(new BlockOreDiamond(), 1, 7, 0, 16),
new OreType(new BlockDirt(), 20, 32, 0, 128),
new OreType(new BlockGravel(), 10, 16, 0, 128)
});
this.populators.add(ores);
}
开发者ID:PrismarineMC,项目名称:MagmaBlock,代码行数:48,代码来源:Normal.java
示例7: init
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
@Override
public void init(ChunkManager level, NukkitRandom random) {
this.level = level;
this.nukkitRandom = random;
this.random = new Random();
this.nukkitRandom.setSeed(this.level.getSeed());
this.localSeed1 = this.random.nextLong();
this.localSeed2 = this.random.nextLong();
this.noiseSeaFloor = new Simplex(this.nukkitRandom, 1F, 1F / 8F, 1F / 64F);
this.noiseLand = new Simplex(this.nukkitRandom, 2F, 1F / 8F, 1F / 512F);
this.noiseMountains = new Simplex(this.nukkitRandom, 4F, 1F, 1F / 500F);
this.noiseBaseGround = new Simplex(this.nukkitRandom, 4F, 1F / 4F, 1F / 64F);
this.noiseRiver = new Simplex(this.nukkitRandom, 2F, 1F, 1F / 512F);
this.nukkitRandom.setSeed(this.level.getSeed());
this.selector = new BiomeSelector(this.nukkitRandom, Biome.getBiome(Biome.FOREST));
this.heightOffset = random.nextRange(-5, 3);
this.selector.addBiome(Biome.getBiome(OCEAN));
this.selector.addBiome(Biome.getBiome(PLAINS));
this.selector.addBiome(Biome.getBiome(DESERT));
this.selector.addBiome(Biome.getBiome(FOREST));
this.selector.addBiome(Biome.getBiome(TAIGA));
this.selector.addBiome(Biome.getBiome(RIVER));
this.selector.addBiome(Biome.getBiome(ICE_PLAINS));
this.selector.addBiome(Biome.getBiome(BIRCH_FOREST));
this.selector.addBiome(Biome.getBiome(JUNGLE));
this.selector.addBiome(Biome.getBiome(SAVANNA));
this.selector.addBiome(Biome.getBiome(ROOFED_FOREST));
this.selector.addBiome(Biome.getBiome(ROOFED_FOREST_M));
this.selector.addBiome(Biome.getBiome(MUSHROOM_ISLAND));
this.selector.addBiome(Biome.getBiome(SWAMP));
this.selector.recalculate();
PopulatorCaves caves = new PopulatorCaves();
this.populators.add(caves);
PopulatorRavines ravines = new PopulatorRavines();
this.populators.add(ravines);
// PopulatorDungeon dungeons = new PopulatorDungeon();
// this.populators.add(dungeons);
PopulatorGroundCover cover = new PopulatorGroundCover();
this.generationPopulators.add(cover);
PopulatorOre ores = new PopulatorOre();
ores.setOreTypes(new OreType[]{
new OreType(new BlockOreCoal(), 20, 17, 0, 128),
new OreType(new BlockOreIron(), 20, 9, 0, 64),
new OreType(new BlockOreRedstone(), 8, 8, 0, 16),
new OreType(new BlockOreLapis(), 1, 7, 0, 16),
new OreType(new BlockOreGold(), 2, 9, 0, 32),
new OreType(new BlockOreDiamond(), 1, 8, 0, 16),
new OreType(new BlockDirt(), 10, 33, 0, 128),
new OreType(new BlockGravel(), 8, 33, 0, 128),
new OreType(new BlockStone(BlockStone.GRANITE), 10, 33, 0, 80),
new OreType(new BlockStone(BlockStone.DIORITE), 10, 33, 0, 80),
new OreType(new BlockStone(BlockStone.ANDESITE), 10, 33, 0, 80)
});
this.populators.add(ores);
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:65,代码来源:Normal.java
示例8: setOreTypes
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
public void setOreTypes(OreType[] oreTypes) {
this.oreTypes = oreTypes;
}
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:4,代码来源:PopulatorOre.java
示例9: init
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
@Override
public void init(ChunkManager level, NukkitRandom random) {
this.level = level;
this.nukkitRandom = random;
this.random = new Random();
this.nukkitRandom.setSeed(this.level.getSeed());
this.localSeed1 = this.random.nextLong();
this.localSeed2 = this.random.nextLong();
this.noiseSeaFloor = new Simplex(this.nukkitRandom, 1F, 1F / 8F, 1F / 64F);
this.noiseLand = new Simplex(this.nukkitRandom, 2F, 1F / 8F, 1F / 512F);
this.noiseMountains = new Simplex(this.nukkitRandom, 4F, 1F, 1F / 500F);
this.noiseBaseGround = new Simplex(this.nukkitRandom, 4F, 1F / 4F, 1F / 64F);
this.noiseRiver = new Simplex(this.nukkitRandom, 2F, 1F, 1F / 512F);
this.nukkitRandom.setSeed(this.level.getSeed());
this.selector = new BiomeSelector(this.nukkitRandom, Biome.getBiome(Biome.FOREST));
this.heightOffset = random.nextRange(-5, 3);
this.selector.addBiome(Biome.getBiome(OCEAN));
this.selector.addBiome(Biome.getBiome(PLAINS));
this.selector.addBiome(Biome.getBiome(DESERT));
this.selector.addBiome(Biome.getBiome(FOREST));
this.selector.addBiome(Biome.getBiome(TAIGA));
this.selector.addBiome(Biome.getBiome(RIVER));
this.selector.addBiome(Biome.getBiome(ICE_PLAINS));
this.selector.addBiome(Biome.getBiome(BIRCH_FOREST));
this.selector.addBiome(Biome.getBiome(JUNGLE));
this.selector.addBiome(Biome.getBiome(SAVANNA));
this.selector.addBiome(Biome.getBiome(ROOFED_FOREST));
this.selector.addBiome(Biome.getBiome(ROOFED_FOREST_M));
this.selector.addBiome(Biome.getBiome(MUSHROOM_ISLAND));
this.selector.addBiome(Biome.getBiome(SWAMP));
this.selector.recalculate();
PopulatorCaves caves = new PopulatorCaves();
this.populators.add(caves);
PopulatorRavines ravines = new PopulatorRavines();
this.populators.add(ravines);
// PopulatorDungeon dungeons = new PopulatorDungeon();
// this.populators.add(dungeons);
PopulatorGroundCover cover = new PopulatorGroundCover();
this.generationPopulators.add(cover);
PopulatorOre ores = new PopulatorOre();
ores.setOreTypes(new OreType[]{
new OreType(new BlockOreCoal(), 20, 17, 0, 128),
new OreType(new BlockOreIron(), 20, 9, 0, 64),
new OreType(new BlockOreRedstone(), 8, 8, 0, 16),
new OreType(new BlockOreLapis(), 1, 7, 0, 16),
new OreType(new BlockOreGold(), 2, 9, 0, 32),
new OreType(new BlockOreDiamond(), 1, 8, 0, 16),
new OreType(new BlockDirt(), 10, 33, 0, 128),
new OreType(new BlockGravel(), 8, 33, 0, 128),
new OreType(new BlockStone(BlockStone.GRANITE), 10, 33, 0, 80),
new OreType(new BlockStone(BlockStone.DIORITE), 10, 33, 0, 80),
new OreType(new BlockStone(BlockStone.ANDESITE), 10, 33, 0, 80)
});
this.populators.add(ores);
}
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:65,代码来源:Normal.java
示例10: init
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
@Override
public void init(ChunkManager level, NukkitRandom random) {
this.level = level;
this.nukkitRandom = random;
this.random = new Random();
this.nukkitRandom.setSeed(this.level.getSeed());
this.localSeed1 = this.random.nextLong();
this.localSeed2 = this.random.nextLong();
this.noiseSeaFloor = new Simplex(this.nukkitRandom, 1F, 1F / 8F, 1F / 64F);
this.noiseLand = new Simplex(this.nukkitRandom, 2F, 1F / 8F, 1F / 512F);
this.noiseMountains = new Simplex(this.nukkitRandom, 4F, 1F, 1F / 500F);
this.noiseBaseGround = new Simplex(this.nukkitRandom, 4F, 1F / 4F, 1F / 64F);
this.noiseRiver = new Simplex(this.nukkitRandom, 2F, 1F, 1F / 512F);
this.nukkitRandom.setSeed(this.level.getSeed());
this.selector = new BiomeSelector(this.nukkitRandom, Biome.getBiome(Biome.OCEAN));
this.heightOffset = random.nextRange(-5, 3);
this.selector.addBiome(Biome.getBiome(Biome.OCEAN));
this.selector.addBiome(Biome.getBiome(Biome.PLAINS));
this.selector.addBiome(Biome.getBiome(Biome.DESERT));
this.selector.addBiome(Biome.getBiome(Biome.MOUNTAINS));
this.selector.addBiome(Biome.getBiome(Biome.FOREST));
this.selector.addBiome(Biome.getBiome(Biome.TAIGA));
this.selector.addBiome(Biome.getBiome(Biome.SWAMP));
this.selector.addBiome(Biome.getBiome(Biome.RIVER));
this.selector.addBiome(Biome.getBiome(Biome.ICE_PLAINS));
this.selector.addBiome(Biome.getBiome(Biome.SMALL_MOUNTAINS));
this.selector.addBiome(Biome.getBiome(Biome.BIRCH_FOREST));
this.selector.recalculate();
PopulatorCaves caves = new PopulatorCaves();
this.populators.add(caves);
PopulatorRavines ravines = new PopulatorRavines();
this.populators.add(ravines);
// PopulatorDungeon dungeons = new PopulatorDungeon();
// this.populators.add(dungeons);
PopulatorGroundCover cover = new PopulatorGroundCover();
this.generationPopulators.add(cover);
PopulatorOre ores = new PopulatorOre();
ores.setOreTypes(new OreType[]{
new OreType(new BlockOreCoal(), 20, 16, 0, 128),
new OreType(new BlockOreIron(), 20, 8, 0, 64),
new OreType(new BlockOreRedstone(), 8, 7, 0, 16),
new OreType(new BlockOreLapis(), 1, 6, 0, 32),
new OreType(new BlockOreGold(), 2, 8, 0, 32),
new OreType(new BlockOreDiamond(), 1, 7, 0, 16),
new OreType(new BlockDirt(), 20, 32, 0, 128),
new OreType(new BlockGravel(), 10, 16, 0, 128)
});
this.populators.add(ores);
}
开发者ID:NycuRO,项目名称:Apollo-OLD,代码行数:58,代码来源:Normal.java
示例11: init
import cn.nukkit.level.generator.object.ore.OreType; //导入依赖的package包/类
@Override
public void init(ChunkManager level, NukkitRandom random) {
this.level = level;
this.nukkitRandom = random;
this.random = new Random();
this.nukkitRandom.setSeed(this.level.getSeed());
this.localSeed1 = this.random.nextLong();
this.localSeed2 = this.random.nextLong();
this.noiseSeaFloor = new Simplex(this.nukkitRandom, 1F, 1F / 8F, 1F / 64F);
this.noiseLand = new Simplex(this.nukkitRandom, 2F, 1F / 8F, 1F / 512F);
this.noiseMountains = new Simplex(this.nukkitRandom, 4F, 1F, 1F / 500F);
this.noiseBaseGround = new Simplex(this.nukkitRandom, 4F, 1F / 4F, 1F / 64F);
this.noiseRiver = new Simplex(this.nukkitRandom, 2F, 1F, 1F / 512F);
this.nukkitRandom.setSeed(this.level.getSeed());
this.selector = new BiomeSelector(this.nukkitRandom, Biome.getBiome(NormalGenerator.OCEAN));
this.heightOffset = random.nextRange(-5, 3);
this.selector.addBiome(Biome.getBiome(OCEAN));
this.selector.addBiome(Biome.getBiome(PLAINS));
this.selector.addBiome(Biome.getBiome(DESERT));
this.selector.addBiome(Biome.getBiome(FOREST));
this.selector.addBiome(Biome.getBiome(TAIGA));
this.selector.addBiome(Biome.getBiome(RIVER));
this.selector.addBiome(Biome.getBiome(ICE_PLAINS));
this.selector.addBiome(Biome.getBiome(BIRCH_FOREST));
this.selector.addBiome(Biome.getBiome(JUNGLE));
this.selector.addBiome(Biome.getBiome(SAVANNA));
this.selector.addBiome(Biome.getBiome(ROOFED_FOREST));
this.selector.addBiome(Biome.getBiome(ROOFED_FOREST_M));
this.selector.addBiome(Biome.getBiome(MUSHROOM_ISLAND));
this.selector.addBiome(Biome.getBiome(SWAMP));
this.selector.recalculate();
PopulatorCaves caves = new PopulatorCaves();
this.populators.add(caves);
PopulatorRavines ravines = new PopulatorRavines();
this.populators.add(ravines);
// PopulatorDungeon dungeons = new PopulatorDungeon();
// this.populators.add(dungeons);
PopulatorGroundCover cover = new PopulatorGroundCover();
this.generationPopulators.add(cover);
PopulatorOre ores = new PopulatorOre();
ores.setOreTypes(new OreType[]{
new OreType(new BlockOreCoal(), 20, 17, 0, 128),
new OreType(new BlockOreIron(), 20, 9, 0, 64),
new OreType(new BlockOreRedstone(), 8, 8, 0, 16),
new OreType(new BlockOreLapis(), 1, 7, 0, 16),
new OreType(new BlockOreGold(), 2, 9, 0, 32),
new OreType(new BlockOreDiamond(), 1, 8, 0, 16),
new OreType(new BlockDirt(), 10, 33, 0, 128),
new OreType(new BlockGravel(), 8, 33, 0, 128),
new OreType(new BlockStone(BlockStone.GRANITE), 10, 33, 0, 80),
new OreType(new BlockStone(BlockStone.DIORITE), 10, 33, 0, 80),
new OreType(new BlockStone(BlockStone.ANDESITE), 10, 33, 0, 80)
});
this.populators.add(ores);
}
开发者ID:NycuRO,项目名称:BiomeMaster,代码行数:65,代码来源:NormalGenerator.java
注:本文中的cn.nukkit.level.generator.object.ore.OreType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论