Interface Marker
- All Superinterfaces:
DensityFunction, Keyed, Registerable<Marker>, Wrapper
Marker functions are commonly used to cache the output of a density function.
- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MarkerblendDensity(DensityFunction input) Used in vanilla for smooth transition to chunks generated in old versions.static Markercache2d(DensityFunction input) Only computes the input density once per horizontal position.static MarkercacheAllInCell(DensityFunction input) Used by the game ontoNoiseRouter.finalDensity().static MarkercacheOnce(DensityFunction input) If this density function is referenced twice, it is only computed once per block position.static MarkerflatCache(DensityFunction input) Calculate the value per 4×4 column (Value at each block in one column is the same).input()The input density function.static Markerinterpolated(DensityFunction input) Interpolates at each block in one cell based on the input density function value of some cells around.static Markerof(@Nullable ResourceKey resourceKey, Marker.Type type, DensityFunction input) Creates a new marker.static Markerof(Marker.Type type, DensityFunction input) Creates a new marker.type()The type of the marker.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
-
type
The type of the marker.- Returns:
- the type of the marker
- Since:
- 3.0.0
-
input
The input density function.- Returns:
- the input density function
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") static Marker of(@Nullable ResourceKey resourceKey, Marker.Type type, DensityFunction input) Creates a new marker.- Parameters:
resourceKey- the resource key, or nulltype- the type of the markerinput- the input density function- Returns:
- the marker
- Since:
- 3.0.0
-
of
Creates a new marker.- Parameters:
type- the type of the markerinput- the input density function- Returns:
- the marker
- Since:
- 3.0.0
-
interpolated
Interpolates at each block in one cell based on the input density function value of some cells around. The size of each cell is size_horizontal * 4 and size_vertical * 4. Used often in combination with flat_cache.- Parameters:
input- the input density function- Returns:
- the marker
- Since:
- 3.0.0
-
flatCache
Calculate the value per 4×4 column (Value at each block in one column is the same). And it is calculated only once per column, at Y=0. Used often in combination with interpolated.- Parameters:
input- the input density function- Returns:
- the marker
- Since:
- 3.0.0
-
cache2d
Only computes the input density once per horizontal position.- Parameters:
input- the input density function- Returns:
- the marker
- Since:
- 3.0.0
-
cacheOnce
If this density function is referenced twice, it is only computed once per block position.- Parameters:
input- the input density function- Returns:
- the marker
- Since:
- 3.0.0
-
cacheAllInCell
Used by the game ontoNoiseRouter.finalDensity().- Parameters:
input- the input density function- Returns:
- the marker
- Since:
- 3.0.0
-
blendDensity
Used in vanilla for smooth transition to chunks generated in old versions.- Parameters:
input- the input density function- Returns:
- the marker
- Since:
- 3.0.0
-