Package org.bukkit.util.noise

Examples of org.bukkit.util.noise.SimplexOctaveGenerator


        /* With default settings, this is 5 octaves. With tscale=256,terrainheight=50,
         * this comes out to 14 octaves, which makes more complex terrain at the cost
         * of more complex generation. Without this, the terrain looks bad, especially
         * on higher tscale/terrainheight pairs. */
        double value = Math.round(Math.sqrt(50 * 256.0 / (128 - 50)) * 1.1 - 0.2);
        OctaveGenerator gen = new SimplexOctaveGenerator(seed, Math.max((int) value, 5));
        gen.setScale(1 / 256.0);
        octaves.put("height", gen);

        gen = new SimplexOctaveGenerator(seed, gen.getOctaves().length / 2);
        gen.setScale(Math.min(256.0 / 1024, 1 / 32.0));
        octaves.put("jitter", gen);

        gen = new SimplexOctaveGenerator(seed, 2);
        gen.setScale(1 / WORLD_DEPTH);
        octaves.put("type", gen);
    }
View Full Code Here


    @Override
    protected void createWorldOctaves(World world, Map<String, OctaveGenerator> octaves) {
        Random seed = new Random(world.getSeed());

        OctaveGenerator gen = new SimplexOctaveGenerator(seed, 10);
        gen.setScale(1 / 64.0);
        octaves.put("floor", gen);

        gen = new SimplexOctaveGenerator(seed, 10);
        gen.setScale(1 / 64.0);
        octaves.put("ceiling", gen);

        gen = new SimplexOctaveGenerator(seed, 5);
        gen.setScale(1 / 32.0);
        octaves.put("jitter1", gen);

        gen = new SimplexOctaveGenerator(seed, 5);
        gen.setScale(1 / 32.0);
        octaves.put("jitter2", gen);

        gen = new SimplexOctaveGenerator(seed, 10);
        gen.setScale(1 / 32.0);
        octaves.put("stalactite", gen);

        gen = new SimplexOctaveGenerator(seed, 10);
        gen.setScale(1 / 48.0);
        octaves.put("stalagmite", gen);

        gen = new SimplexOctaveGenerator(seed, 7);
        gen.setScale(1 / 32.0);
        octaves.put("platform1", gen);

        gen = new SimplexOctaveGenerator(seed, 8);
        gen.setScale(1 / 96.0);
        octaves.put("platform2", gen);
    }
View Full Code Here

    super(generator, odds);
   
    floodY = seaLevel + 20;

    long seed = generator.getWorldSeed();
    duneFeature1 = new SimplexOctaveGenerator(seed + 20, featureOctaves);
    duneFeature1.setScale(featureHorizontalScale);
    duneFeature2 = new SimplexOctaveGenerator(seed + 30, featureOctaves * 2);
    duneFeature2.setScale(featureHorizontalScale);
//    duneNoise = new SimplexOctaveGenerator(seed + 40, noiseOctaves);
//    duneNoise.setScale(noiseHorizontalScale);
  }
View Full Code Here

    super(generator, odds);
   
    World world = generator.getWorld();
    long seed = generator.getWorldSeed();
   
    landShape1 = new SimplexOctaveGenerator(seed, 4);
    landShape1.setScale(landHorizontalScale1);
    landShape2 = new SimplexOctaveGenerator(seed, 6);
    landShape2.setScale(landHorizontalScale2);
    seaShape = new SimplexOctaveGenerator(seed + 2, 8);
    seaShape.setScale(seaHorizontalScale);
    noiseShape = new SimplexOctaveGenerator(seed + 3, 16);
    noiseShape.setScale(noiseHorizontalScale);
    featureShape = new SimplexOctaveGenerator(seed + 4, 2);
    featureShape.setScale(featureHorizontalScale);
   
//    caveShape = new SimplexNoiseGenerator(seed);
    ecoShape = new SimplexNoiseGenerator(seed + 5);
   
View Full Code Here

    super(generator, odds);
   
    floodY = seaLevel + 15;

    long seed = generator.getWorldSeed();
    duneFeature1 = new SimplexOctaveGenerator(seed + 20, featureOctaves);
    duneFeature1.setScale(featureHorizontalScale);
    duneFeature2 = new SimplexOctaveGenerator(seed + 30, featureOctaves * 2);
    duneFeature2.setScale(featureHorizontalScale);
//    duneNoise = new SimplexOctaveGenerator(seed + 40, noiseOctaves);
//    duneNoise.setScale(noiseHorizontalScale);
  }
View Full Code Here

  public ShapeProvider_Normal(WorldGenerator generator, Odds odds) {
    super(generator, odds);
    World world = generator.getWorld();
    long seed = generator.getWorldSeed();
   
    landShape1 = new SimplexOctaveGenerator(seed, 4);
    landShape1.setScale(landHorizontalScale1);
    landShape2 = new SimplexOctaveGenerator(seed, 6);
    landShape2.setScale(landHorizontalScale2);
    seaShape = new SimplexOctaveGenerator(seed + 2, 8);
    seaShape.setScale(seaHorizontalScale);
    noiseShape = new SimplexOctaveGenerator(seed + 3, 16);
    noiseShape.setScale(noiseHorizontalScale);
    featureShape = new SimplexOctaveGenerator(seed + 4, 2);
    featureShape.setScale(featureHorizontalScale);
   
    caveShape = new SimplexNoiseGenerator(seed);
    mineShape = new SimplexNoiseGenerator(seed + 1);
   
View Full Code Here

TOP

Related Classes of org.bukkit.util.noise.SimplexOctaveGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.