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[] pGradient, double pX, double pY, double pZ)
     
    private double
    getCornerNoise3D(int pGradientIndex, double pX, double pY, double pZ, double pOffset)
     
    double
    getValue(double pX, double pY)
     
    double
    getValue(double pX, double pY, double pZ)
     
    private int
    p(int pIndex)
     

    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 pIndex)
    • dot

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

      private double getCornerNoise3D(int pGradientIndex, double pX, double pY, double pZ, double pOffset)
    • getValue

      public double getValue(double pX, double pY)
    • getValue

      public double getValue(double pX, double pY, double pZ)