Interface MappedTransformer
- All Superinterfaces:
DensityFunction, Keyed, PureTransformer, Registerable<PureTransformer>, Wrapper
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumSingle-argument value transforms applied to a density function's output. -
Method Summary
Modifier and TypeMethodDescriptionstatic MappedTransformerabs(DensityFunction input) Maps the input throughMappedTransformer.Transform.ABS, yielding its absolute value.static MappedTransformercube(DensityFunction input) Maps the input throughMappedTransformer.Transform.CUBE, yielding its cube.static MappedTransformerhalfNegative(DensityFunction input) Maps the input throughMappedTransformer.Transform.HALF_NEGATIVE, halving only its negative values.static MappedTransformerinvert(DensityFunction input) Maps the input throughMappedTransformer.Transform.INVERT, negating it.static MappedTransformerof(@Nullable ResourceKey resourceKey, DensityFunction input, MappedTransformer.Transform transformation) Creates a new mapped density function.static MappedTransformerof(DensityFunction input, MappedTransformer.Transform transformation) Creates a new mapped density function.static MappedTransformerof(MappedTransformer.Transform transformation, DensityFunction input) Convenience method forof(DensityFunction, Transform).static MappedTransformerquarterNegative(DensityFunction input) Maps the input throughMappedTransformer.Transform.QUARTER_NEGATIVE, quartering only its negative values.static MappedTransformersquare(DensityFunction input) Maps the input throughMappedTransformer.Transform.SQUARE, yielding its square.static MappedTransformersqueeze(DensityFunction input) Maps the input throughMappedTransformer.Transform.SQUEEZE, applying the vanilla squeeze curve.The transformation to apply to the input 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 PureTransformer
inputMethods inherited from interface Registerable
registerMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
transformation
The transformation to apply to the input value.- Returns:
- the transformation
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") static MappedTransformer of(@Nullable ResourceKey resourceKey, DensityFunction input, MappedTransformer.Transform transformation) Creates a new mapped density function.- Parameters:
resourceKey- the resource key, or nullinput- the input density functiontransformation- the transformation to apply to the input value- Returns:
- the mapped density function
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") static MappedTransformer of(DensityFunction input, MappedTransformer.Transform transformation) Creates a new mapped density function.- Parameters:
input- the input density functiontransformation- the transformation to apply to the input value- Returns:
- the mapped density function
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") static MappedTransformer of(MappedTransformer.Transform transformation, DensityFunction input) Convenience method forof(DensityFunction, Transform).- Parameters:
transformation- the transformation to apply to the input valueinput- the input density function- Returns:
- the mapped density function
- Since:
- 3.0.0
-
abs
Maps the input throughMappedTransformer.Transform.ABS, yielding its absolute value.- Parameters:
input- the input density function- Returns:
- a mapped density function producing
|input| - Since:
- 3.0.0
-
square
Maps the input throughMappedTransformer.Transform.SQUARE, yielding its square.- Parameters:
input- the input density function- Returns:
- a mapped density function producing
input * input - Since:
- 3.0.0
-
cube
Maps the input throughMappedTransformer.Transform.CUBE, yielding its cube.- Parameters:
input- the input density function- Returns:
- a mapped density function producing
input * input * input - Since:
- 3.0.0
-
halfNegative
Maps the input throughMappedTransformer.Transform.HALF_NEGATIVE, halving only its negative values.- Parameters:
input- the input density function- Returns:
- a mapped density function producing
inputwhere positive andinput * 0.5where negative - Since:
- 3.0.0
-
quarterNegative
Maps the input throughMappedTransformer.Transform.QUARTER_NEGATIVE, quartering only its negative values.- Parameters:
input- the input density function- Returns:
- a mapped density function producing
inputwhere positive andinput * 0.25where negative - Since:
- 3.0.0
-
invert
Maps the input throughMappedTransformer.Transform.INVERT, negating it.- Parameters:
input- the input density function- Returns:
- a mapped density function producing
-input - Since:
- 3.0.0
-
squeeze
Maps the input throughMappedTransformer.Transform.SQUEEZE, applying the vanilla squeeze curve.- Parameters:
input- the input density function- Returns:
- a mapped density function producing the squeezed value of
input - Since:
- 3.0.0
-