当前位置: 首页>>代码示例>>Java>>正文


Java Simplex类代码示例

本文整理汇总了Java中cn.nukkit.level.generator.noise.Simplex的典型用法代码示例。如果您正苦于以下问题:Java Simplex类的具体用法?Java Simplex怎么用?Java Simplex使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Simplex类属于cn.nukkit.level.generator.noise包,在下文中一共展示了Simplex类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import cn.nukkit.level.generator.noise.Simplex; //导入依赖的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

示例2: initPopulate

import cn.nukkit.level.generator.noise.Simplex; //导入依赖的package包/类
public void initPopulate(NukkitRandom random) {
    if (this.cavesSimplex != null) {
        return;
    }
    this.cavesSimplex = new Simplex(random, 4.1F, 15F, 1F / 200F);
    //实在太密啦啦啦
}
 
开发者ID:Creeperface01,项目名称:NukkitGT,代码行数:8,代码来源:PopulatorCaves.java

示例3: init

import cn.nukkit.level.generator.noise.Simplex; //导入依赖的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

示例4: BiomeSelector

import cn.nukkit.level.generator.noise.Simplex; //导入依赖的package包/类
public BiomeSelector(NukkitRandom random, Biome fallback) {
    this.fallback = fallback;
    this.temperature = new Simplex(random, 2F, 1F / 8F, 1F / 1024F);
    this.rainfall = new Simplex(random, 2F, 1F / 8F, 1F / 1024F);
}
 
开发者ID:Rsplwe,项目名称:Nukkit-Java9,代码行数:6,代码来源:BiomeSelector.java

示例5: init

import cn.nukkit.level.generator.noise.Simplex; //导入依赖的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

示例6: init

import cn.nukkit.level.generator.noise.Simplex; //导入依赖的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

示例7: init

import cn.nukkit.level.generator.noise.Simplex; //导入依赖的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

示例8: init

import cn.nukkit.level.generator.noise.Simplex; //导入依赖的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.noise.Simplex类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。