Interface ConstantSimpleFunction
- All Superinterfaces:
DensityFunction, Keyed, Registerable<ConstantSimpleFunction>, SimpleFunction, Wrapper
@NullMarked
@AsOf("3.0.0")
public interface ConstantSimpleFunction
extends SimpleFunction, Registerable<ConstantSimpleFunction>
A density function that always returns the same value.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConstantSimpleFunctionof(double value) Creates a new constant density function.static ConstantSimpleFunctionof(@Nullable ResourceKey resourceKey, double value) Creates a new constant density function.doublevalue()The constant value.Methods inherited from interface DensityFunction
abs, add, blendDensity, cache2d, cacheAllInCell, cacheOnce, clamp, cube, findTopSurface, flatCache, halfNegative, interpolated, invert, max, min, mul, quarterNegative, rangeChoice, resourceKey, square, squeeze, wrapMethods inherited from interface Registerable
registerMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
value
-
of
Creates a new constant density function.- Parameters:
resourceKey- the resource key, or nullvalue- the constant value- Returns:
- the constant density function
- Since:
- 3.0.0
-
of
Creates a new constant density function.- Parameters:
value- the constant value- Returns:
- the constant density function
- Since:
- 3.0.0
-