Class SimplexOctaveGenerator

java.lang.Object
org.bukkit.util.noise.OctaveGenerator
org.bukkit.util.noise.SimplexOctaveGenerator

public class SimplexOctaveGenerator extends OctaveGenerator
Creates simplex noise through unbiased octaves
  • Constructor Details

    • SimplexOctaveGenerator

      public SimplexOctaveGenerator(@NotNull @NotNull World world, int octaves)
      Creates a simplex octave generator for the given world
      Parameters:
      world - World to construct this generator for
      octaves - Amount of octaves to create
    • SimplexOctaveGenerator

      public SimplexOctaveGenerator(long seed, int octaves)
      Creates a simplex octave generator for the given world
      Parameters:
      seed - Seed to construct this generator for
      octaves - Amount of octaves to create
    • SimplexOctaveGenerator

      public SimplexOctaveGenerator(@NotNull @NotNull Random rand, int octaves)
      Creates a simplex octave generator for the given Random
      Parameters:
      rand - Random object to construct this generator for
      octaves - Amount of octaves to create
  • Method Details

    • setScale

      public void setScale(double scale)
      Description copied from class: OctaveGenerator
      Sets the scale used for all coordinates passed to this generator.

      This is the equivalent to setting each coordinate to the specified value.

      Overrides:
      setScale in class OctaveGenerator
      Parameters:
      scale - New value to scale each coordinate by
    • getWScale

      public double getWScale()
      Gets the scale used for each W-coordinates passed
      Returns:
      W scale
    • setWScale

      public void setWScale(double scale)
      Sets the scale used for each W-coordinates passed
      Parameters:
      scale - New W scale
    • noise

      public double noise(double x, double y, double z, double w, double frequency, double amplitude)
      Generates noise for the 3D coordinates using the specified number of octaves and parameters
      Parameters:
      x - X-coordinate
      y - Y-coordinate
      z - Z-coordinate
      w - W-coordinate
      frequency - How much to alter the frequency by each octave
      amplitude - How much to alter the amplitude by each octave
      Returns:
      Resulting noise
    • noise

      public double noise(double x, double y, double z, double w, double frequency, double amplitude, boolean normalized)
      Generates noise for the 3D coordinates using the specified number of octaves and parameters
      Parameters:
      x - X-coordinate
      y - Y-coordinate
      z - Z-coordinate
      w - W-coordinate
      frequency - How much to alter the frequency by each octave
      amplitude - How much to alter the amplitude by each octave
      normalized - If true, normalize the value to [-1, 1]
      Returns:
      Resulting noise