Interface YClampedGradient
- All Superinterfaces:
DensityFunction, Keyed, Registerable<YClampedGradient>, Wrapper
@NullMarked
@AsOf("3.0.0")
public interface YClampedGradient
extends DensityFunction, Registerable<YClampedGradient>
Clamps the Y coordinate between
fromY and toY and then linearly maps it to the range
[fromValue, toValue].- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic YClampedGradient.Builderbuilder()Creates a new builder.doubleThe value thatfromY()maps to.intfromY()The Y coordinate that maps tofromValue().static YClampedGradientof(int fromY, int toY, double fromValue, double toValue) Creates a new y clamped gradient density function.static YClampedGradientof(@Nullable ResourceKey resourceKey, int fromY, int toY, double fromValue, double toValue) Creates a new y clamped gradient density function.default YClampedGradient.BuilderConverts this object back to a builder.doubletoValue()The value thattoY()maps to.inttoY()The Y coordinate that maps totoValue().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
-
fromY
The Y coordinate that maps tofromValue().- Returns:
- the lower Y coordinate
- Since:
- 3.0.0
-
toY
-
fromValue
-
toValue
-
toBuilder
Converts this object back to a builder.- Returns:
- a builder with the same values as this object
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") static YClampedGradient of(@Nullable ResourceKey resourceKey, int fromY, int toY, double fromValue, double toValue) Creates a new y clamped gradient density function.- Parameters:
resourceKey- the resource key, or nullfromY- the Y coordinate that maps tofromValuetoY- the Y coordinate that maps totoValuefromValue- the value thatfromYmaps totoValue- the value thattoYmaps to- Returns:
- a new y clamped gradient density function
- Since:
- 3.0.0
-
of
Creates a new y clamped gradient density function.- Parameters:
fromY- the Y coordinate that maps tofromValuetoY- the Y coordinate that maps totoValuefromValue- the value thatfromYmaps totoValue- the value thattoYmaps to- Returns:
- a new y clamped gradient density function
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-