Interface StoneDepthConditionSource
- All Superinterfaces:
ConditionSource, SurfaceRule, Wrapper
Checks if the current position is within a specified distance from the surface, either upward or
downward, using terrain depth. Used in vanilla to place grass blocks and dirt layers on the surface
in the overworld, and soul sand, soul soil, gravel and basalt floors and ceilings in the nether.
- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the surface depth is added to the offset.builder()Creates a new builder.static StoneDepthConditionSourceof(int offset, boolean addSurfaceDepth, int secondaryDepthRange, CaveSurface surfaceType) Creates a new stone depth condition source.static StoneDepthConditionSourceof(int offset, boolean addSurfaceDepth, CaveSurface surfaceType) Creates a new stone depth condition source without a secondary depth range.intoffset()The vertical offset.intAdds a mapped value of the secondary surface depth to the offset.The face the depth is measured from.Converts this object back to a builder.Methods inherited from interface ConditionSource
not, thenMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
offset
-
addSurfaceDepth
Whether the surface depth is added to the offset. Note: this is notadd_stone_depth.- Returns:
- whether the surface depth is added
- Since:
- 3.0.0
-
secondaryDepthRange
Adds a mapped value of the secondary surface depth to the offset.- Returns:
- the secondary depth range
- Since:
- 3.0.0
-
surfaceType
The face the depth is measured from.- Returns:
- the surface type
- Since:
- 3.0.0
-
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 StoneDepthConditionSource of(int offset, boolean addSurfaceDepth, int secondaryDepthRange, CaveSurface surfaceType) Creates a new stone depth condition source.- Parameters:
offset- the vertical offsetaddSurfaceDepth- whether the surface depth is added to the offsetsecondaryDepthRange- the secondary depth range added to the offsetsurfaceType- the face the depth is measured from- Returns:
- the stone depth condition source
- Since:
- 3.0.0
-
of
@AsOf("3.0.0") static StoneDepthConditionSource of(int offset, boolean addSurfaceDepth, CaveSurface surfaceType) Creates a new stone depth condition source without a secondary depth range.- Parameters:
offset- the vertical offsetaddSurfaceDepth- whether the surface depth is added to the offsetsurfaceType- the face the depth is measured from- Returns:
- the stone depth condition source
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-