Interface TwoArgumentSimpleFunction
- All Superinterfaces:
DensityFunction, Keyed, Registerable<TwoArgumentSimpleFunction>, SimpleFunction, Wrapper
@NullMarked
@AsOf("3.0.0")
public interface TwoArgumentSimpleFunction
extends SimpleFunction, Registerable<TwoArgumentSimpleFunction>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAvailable operations. -
Method Summary
Modifier and TypeMethodDescriptionstatic TwoArgumentSimpleFunctionadd(DensityFunction first, DensityFunction second) Adds two density functions together.static TwoArgumentSimpleFunctiondiv(DensityFunction first, DensityFunction second) Divides the first density function by the second.first()The first density function.default DensityFunctionleft()Alias forfirst().static TwoArgumentSimpleFunctionmax(DensityFunction first, DensityFunction second) Returns the maximum of two density functions.static TwoArgumentSimpleFunctionmin(DensityFunction first, DensityFunction second) Returns the minimum of two density functions.static TwoArgumentSimpleFunctionmul(DensityFunction first, DensityFunction second) Multiplies two density functions together.static TwoArgumentSimpleFunctionof(@Nullable ResourceKey resourceKey, TwoArgumentSimpleFunction.Operation operation, DensityFunction first, DensityFunction second) Performs anTwoArgumentSimpleFunction.Operationon two density functions.static TwoArgumentSimpleFunctionof(TwoArgumentSimpleFunction.Operation operation, DensityFunction first, DensityFunction second) Performs anTwoArgumentSimpleFunction.Operationon two density functions.The operation to perform.default DensityFunctionright()Alias forsecond().second()The second density function.static TwoArgumentSimpleFunctionsub(DensityFunction first, DensityFunction second) Subtracts the second density function from the first.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
-
operation
The operation to perform.- Returns:
- the operation
- Since:
- 3.0.0
-
first
The first density function.- Returns:
- the first density function
- Since:
- 3.0.0
-
second
The second density function.- Returns:
- the second density function
- Since:
- 3.0.0
-
left
-
right
-
of
@AsOf("3.0.0") static TwoArgumentSimpleFunction of(@Nullable ResourceKey resourceKey, TwoArgumentSimpleFunction.Operation operation, DensityFunction first, DensityFunction second) Performs anTwoArgumentSimpleFunction.Operationon two density functions.- Parameters:
resourceKey- the resource key, or nulloperation- the operation to performfirst- the first density functionsecond- the second density function- Returns:
- the result of the operation
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") static TwoArgumentSimpleFunction of(TwoArgumentSimpleFunction.Operation operation, DensityFunction first, DensityFunction second) Performs anTwoArgumentSimpleFunction.Operationon two density functions.- Parameters:
operation- the operation to performfirst- the first density functionsecond- the second density function- Returns:
- the result of the operation
- Since:
- 3.0.0
-
add
Adds two density functions together.- Parameters:
first- the first density functionsecond- the second density function- Returns:
- the sum of the two density functions
- Since:
- 3.0.0
-
sub
Subtracts the second density function from the first.- Parameters:
first- the left density functionsecond- the right density function- Returns:
- the difference of the two density functions
- Since:
- 4.0.0
-
mul
Multiplies two density functions together.- Parameters:
first- the first density functionsecond- the second density function- Returns:
- the product of the two density functions
- Since:
- 3.0.0
-
div
Divides the first density function by the second.- Parameters:
first- the dividend density functionsecond- the divisor density function- Returns:
- the quotient of the two density functions
- Since:
- 4.0.0
-
min
Returns the minimum of two density functions.- Parameters:
first- the first density functionsecond- the second density function- Returns:
- the minimum of the two density functions
- Since:
- 3.0.0
-
max
Returns the maximum of two density functions.- Parameters:
first- the first density functionsecond- the second density function- Returns:
- the maximum of the two density functions
- Since:
- 3.0.0
-