Package org.bukkit.util.noise
Class SimplexOctaveGenerator
java.lang.Object
org.bukkit.util.noise.OctaveGenerator
org.bukkit.util.noise.SimplexOctaveGenerator
Creates simplex noise through unbiased octaves
- 
Field SummaryFields inherited from class org.bukkit.util.noise.OctaveGeneratoroctaves, xScale, yScale, zScale
- 
Constructor SummaryConstructorsConstructorDescriptionSimplexOctaveGenerator(long seed, int octaves) Creates a simplex octave generator for the given worldSimplexOctaveGenerator(@NotNull Random rand, int octaves) Creates a simplex octave generator for the givenRandomSimplexOctaveGenerator(@NotNull World world, int octaves) Creates a simplex octave generator for the given world
- 
Method SummaryModifier and TypeMethodDescriptiondoubleGets the scale used for each W-coordinates passeddoublenoise(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 parametersdoublenoise(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 parametersvoidsetScale(double scale) Sets the scale used for all coordinates passed to this generator.voidsetWScale(double scale) Sets the scale used for each W-coordinates passed
- 
Constructor Details- 
SimplexOctaveGeneratorCreates a simplex octave generator for the given world- Parameters:
- world- World to construct this generator for
- octaves- Amount of octaves to create
 
- 
SimplexOctaveGeneratorpublic 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
 
- 
SimplexOctaveGeneratorCreates a simplex octave generator for the givenRandom- Parameters:
- rand- Random object to construct this generator for
- octaves- Amount of octaves to create
 
 
- 
- 
Method Details- 
setScalepublic void setScale(double scale) Description copied from class:OctaveGeneratorSets the scale used for all coordinates passed to this generator.This is the equivalent to setting each coordinate to the specified value. - Overrides:
- setScalein class- OctaveGenerator
- Parameters:
- scale- New value to scale each coordinate by
 
- 
getWScalepublic double getWScale()Gets the scale used for each W-coordinates passed- Returns:
- W scale
 
- 
setWScalepublic void setWScale(double scale) Sets the scale used for each W-coordinates passed- Parameters:
- scale- New W scale
 
- 
noisepublic 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
 
- 
noisepublic 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
 
 
-