Class SimplexNoise

java.lang.Object
net.minecraft.world.level.levelgen.synth.SimplexNoise

public class SimplexNoise extends Object
A generator for a single octave of Simplex noise.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final double
     
    private static final double
     
    protected static final int[][]
     
    private final int[]
    A permutation array used in noise generation.
    private static final double
     
    final double
     
    final double
     
    final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static double
    dot(int[] gradient, double x, double y, double z)
     
    private double
    getCornerNoise3D(int gradientIndex, double x, double y, double z, double offset)
     
    double
    getValue(double x, double y)
     
    double
    getValue(double x, double y, double z)
     
    private int
    p(int index)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • GRADIENT

      protected static final int[][] GRADIENT
    • SQRT_3

      private static final double SQRT_3
    • F2

      private static final double F2
    • G2

      private static final double G2
    • p

      private final int[] p
      A permutation array used in noise generation. This is populated with the values [0, 256) and shuffled. Despite the array declared as 512 length, only the first 256 values are used.
      See Also:
    • xo

      public final double xo
    • yo

      public final double yo
    • zo

      public final double zo
  • Constructor Details

  • Method Details

    • p

      private int p(int index)
    • dot

      protected static double dot(int[] gradient, double x, double y, double z)
      Returns:
      The dot product of the provided three-dimensional gradient vector and the vector (x, y, z)
    • getCornerNoise3D

      private double getCornerNoise3D(int gradientIndex, double x, double y, double z, double offset)
    • getValue

      public double getValue(double x, double y)
    • getValue

      public double getValue(double x, double y, double z)