Class NoiseHeightThresholdInterpreter
java.lang.Object
com.hypixel.hytale.procedurallib.condition.NoiseHeightThresholdInterpreter
- All Implemented Interfaces:
IHeightThresholdInterpreter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final float[]protected final intprotected final intprotected final NoisePropertyprotected final IHeightThresholdInterpreter[] -
Constructor Summary
ConstructorsConstructorDescriptionNoiseHeightThresholdInterpreter(NoiseProperty noise, float[] keys, IHeightThresholdInterpreter[] values) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voiddoublegetContext(int seed, double x, double y) intintintfloatgetThreshold(int seed, double x, double z, int height) floatgetThreshold(int seed, double x, double z, int height, double context) (package private) static floatlerp(float from, float to, float t) protected doublenoise(int seed, double x, double y) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.hypixel.hytale.procedurallib.condition.IHeightThresholdInterpreter
isSpawnable
-
Field Details
-
noise
-
keys
@Nonnull protected final float[] keys -
values
-
length
protected final int length -
lowestNonOne
protected final int lowestNonOne -
highestNonZero
protected final int highestNonZero
-
-
Constructor Details
-
NoiseHeightThresholdInterpreter
public NoiseHeightThresholdInterpreter(NoiseProperty noise, @Nonnull float[] keys, @Nonnull IHeightThresholdInterpreter[] values)
-
-
Method Details
-
getLowestNonOne
public int getLowestNonOne()- Specified by:
getLowestNonOnein interfaceIHeightThresholdInterpreter
-
getHighestNonZero
public int getHighestNonZero()- Specified by:
getHighestNonZeroin interfaceIHeightThresholdInterpreter
-
noise
protected double noise(int seed, double x, double y) -
getContext
public double getContext(int seed, double x, double y) - Specified by:
getContextin interfaceIHeightThresholdInterpreter
-
getLength
public int getLength()- Specified by:
getLengthin interfaceIHeightThresholdInterpreter
-
getThreshold
public float getThreshold(int seed, double x, double z, int height) - Specified by:
getThresholdin interfaceIHeightThresholdInterpreter
-
getThreshold
public float getThreshold(int seed, double x, double z, int height, double context) - Specified by:
getThresholdin interfaceIHeightThresholdInterpreter
-
lerp
static float lerp(float from, float to, float t) -
checkInterpreterLength
-
toString
-