Class FastNoiseLite
java.lang.Object
net.rodofire.easierworldcreator.util.FastNoiseLite
Noise to generate perlin noise. It is a powerful class to add "randomness" to build. It can also be used to chose a Block
BlockPlaceUtil-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents distance functions used in cellular noise generation.static enumRepresents the return types for cellular noise calculations.static enumRepresents types of domain warping for noise generation.static enumRepresents different types of fractal noise.static enumRepresents different types of noise functions used in noise generation.static enumRepresents different rotation types for 3D noise transformations.static classremove javadoc warns, don't noticestatic classremove javadoc warns, don't notice -
Constructor Summary
ConstructorsConstructorDescriptionCreate new FastNoise object with default seedFastNoiseLite(int seed) Create new FastNoise object with specified seed -
Method Summary
Modifier and TypeMethodDescriptionfloatGetNoise(float x, float y) 2D noise at given position using current settingsfloatGetNoise(float x, float y, float z) 3D noise at given position using current settingsfloatGetNoise(net.minecraft.util.math.BlockPos pos) addition for simpler use This is only used to return the value for a 3d noise.voidSetCellularDistanceFunction(FastNoiseLite.CellularDistanceFunction cellularDistanceFunction) Sets distance function used in cellular noise calculationsvoidSetCellularJitter(float cellularJitter) Sets the maximum distance a cellular point can move from it's grid positionvoidSetCellularReturnType(FastNoiseLite.CellularReturnType cellularReturnType) Sets return type from cellular noise calculationsvoidSetDomainWarpAmp(float domainWarpAmp) Sets the maximum warp distance from original position when using DomainWarp(...)voidSetDomainWarpType(FastNoiseLite.DomainWarpType domainWarpType) Sets the warp algorithm when using DomainWarp(...)voidSetFractalGain(float gain) Sets octave gain for all fractal noise typesvoidSetFractalLacunarity(float lacunarity) Sets octave lacunarity for all fractal noise typesvoidSetFractalOctaves(int octaves) Sets octave count for all fractal noise typesvoidSetFractalPingPongStrength(float pingPongStrength) Sets strength of the fractal ping pong effectvoidSetFractalType(FastNoiseLite.FractalType fractalType) Sets method for combining octaves in all fractal noise typesvoidSetFractalWeightedStrength(float weightedStrength) Sets octave weighting for all none DomainWarp fratal typesvoidSetFrequency(float frequency) Sets frequency for all noise typesvoidSetNoiseType(FastNoiseLite.NoiseType noiseType) Sets noise algorithm used for GetNoise(...)voidSetRotationType3D(FastNoiseLite.RotationType3D rotationType3D) Sets domain rotation type for 3D Noise and 3D DomainWarp.voidSetSeed(int seed) Sets seed used for all noise types
-
Constructor Details
-
FastNoiseLite
public FastNoiseLite()Create new FastNoise object with default seed -
FastNoiseLite
public FastNoiseLite(int seed) Create new FastNoise object with specified seed- Parameters:
seed- the seed of the noise
-
-
Method Details
-
SetSeed
public void SetSeed(int seed) Sets seed used for all noise types- Parameters:
seed- the seed of the noise, Default: 1337
-
SetFrequency
public void SetFrequency(float frequency) Sets frequency for all noise types- Parameters:
frequency- Default: 0.01
-
SetNoiseType
Sets noise algorithm used for GetNoise(...)- Parameters:
noiseType- Default: OpenSimplex2
-
SetRotationType3D
Sets domain rotation type for 3D Noise and 3D DomainWarp. Can aid in reducing directional artifacts when sampling a 2D plane in 3D- Parameters:
rotationType3D- Default: None
-
SetFractalType
Sets method for combining octaves in all fractal noise types- Parameters:
fractalType- Default: None Note: FractalType.DomainWarp... only affects DomainWarp(...)
-
SetFractalOctaves
public void SetFractalOctaves(int octaves) Sets octave count for all fractal noise types- Parameters:
octaves- Default: 3
-
SetFractalLacunarity
public void SetFractalLacunarity(float lacunarity) Sets octave lacunarity for all fractal noise types- Parameters:
lacunarity- Default: 2.0
-
SetFractalGain
public void SetFractalGain(float gain) Sets octave gain for all fractal noise types- Parameters:
gain- Default: 0.5
-
SetFractalWeightedStrength
public void SetFractalWeightedStrength(float weightedStrength) Sets octave weighting for all none DomainWarp fratal types- Parameters:
weightedStrength- Default: 0.0 Note: Keep between 0...1 to maintain -1...1 output bounding
-
SetFractalPingPongStrength
public void SetFractalPingPongStrength(float pingPongStrength) Sets strength of the fractal ping pong effect- Parameters:
pingPongStrength- Default: 2.0
-
SetCellularDistanceFunction
public void SetCellularDistanceFunction(FastNoiseLite.CellularDistanceFunction cellularDistanceFunction) Sets distance function used in cellular noise calculations- Parameters:
cellularDistanceFunction- Default: Distance
-
SetCellularReturnType
Sets return type from cellular noise calculations- Parameters:
cellularReturnType- Default: EuclideanSq
-
SetCellularJitter
public void SetCellularJitter(float cellularJitter) Sets the maximum distance a cellular point can move from it's grid position- Parameters:
cellularJitter- Default: 1.0 Note: Setting this higher than 1 will cause artifacts
-
SetDomainWarpType
Sets the warp algorithm when using DomainWarp(...)- Parameters:
domainWarpType- Default: OpenSimplex2
-
SetDomainWarpAmp
public void SetDomainWarpAmp(float domainWarpAmp) Sets the maximum warp distance from original position when using DomainWarp(...)- Parameters:
domainWarpAmp- Default: 1.0
-
GetNoise
public float GetNoise(net.minecraft.util.math.BlockPos pos) addition for simpler use This is only used to return the value for a 3d noise.- Parameters:
pos- the pos of the noise.- Returns:
- the value of the noise.
-
GetNoise
public float GetNoise(float x, float y) 2D noise at given position using current settings- Parameters:
x- the coordinates of the noisey- the coordinates of the noise- Returns:
- Noise output bounded between -1...1
-
GetNoise
public float GetNoise(float x, float y, float z) 3D noise at given position using current settings- Parameters:
x- the coordinates of the noisey- the coordinates of the noisez- the coordinates of the noise- Returns:
- Noise output bounded between -1...1
-