Interface SurfaceCondition
- All Superinterfaces:
Wrapper
- All Known Implementing Classes:
SurfaceCondition.AbovePreliminarySurface, SurfaceCondition.Biome, SurfaceCondition.Hole, SurfaceCondition.Noise, SurfaceCondition.Not, SurfaceCondition.Steep, SurfaceCondition.StoneDepth, SurfaceCondition.Temperature, SurfaceCondition.VerticalGradient, SurfaceCondition.Water, SurfaceCondition.YCheck
@NullMarked
@AsOf("2.4.0")
public sealed interface SurfaceCondition
extends Wrapper
permits SurfaceCondition.StoneDepth, SurfaceCondition.Not, SurfaceCondition.Water, SurfaceCondition.Biome, SurfaceCondition.Noise, SurfaceCondition.YCheck, SurfaceCondition.VerticalGradient, SurfaceCondition.Steep, SurfaceCondition.Hole, SurfaceCondition.AbovePreliminarySurface, SurfaceCondition.Temperature
Wraps the surface rule condition family (
SurfaceRules.ConditionSource), the predicates that
gate where a SurfaceRule applies.- Since:
- 2.4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic enumWhich face of the stone column a depth check measures from.static interfacestatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordNested classes/interfaces inherited from interface Wrapper
Wrapper.Context<C> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SurfaceConditionMatches above the preliminary surface level.static SurfaceConditionhole()Matches in surface holes.static SurfaceConditionisBiome(List<ResourceKey> biomes) Matches when the current biome is one of the given biomes.static SurfaceConditionnoiseCondition(ResourceKey noise, double minThreshold) Matches when a registered noise sampled at this position is at or above the threshold.static SurfaceConditionnoiseCondition(ResourceKey noise, double minThreshold, double maxThreshold) Matches when a registered noise sampled at this position is within the threshold range.static SurfaceConditionnot(SurfaceCondition target) Inverts another condition.static SurfaceConditionsteep()Matches on steep terrain.static SurfaceConditionstoneDepth(int offset, boolean addSurfaceDepth, int secondaryDepthRange, SurfaceCondition.CaveSurface surfaceType) Matches within a given depth of stone from the floor or ceiling, with a secondary depth range.static SurfaceConditionstoneDepth(int offset, boolean addSurfaceDepth, SurfaceCondition.CaveSurface surfaceType) Matches within a given depth of stone from the floor or ceiling.static SurfaceConditionMatches where the biome is cold enough to snow.default ObjectConvert this handle to the real Minecraft object.static SurfaceConditionverticalGradient(String randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) A noisy vertical gradient that is true below one anchor and false above another, fading between.static SurfaceConditionwaterBlockCheck(int offset, int surfaceDepthMultiplier) Matches relative to the water level at the current block.static SurfaceConditionwaterStartCheck(int offset, int surfaceDepthMultiplier) Matches relative to the water level at the column start.static SurfaceConditionyBlockCheck(VerticalAnchor anchor, int surfaceDepthMultiplier) Matches at or above a vertical anchor, evaluated per block.static SurfaceConditionyStartCheck(VerticalAnchor anchor, int surfaceDepthMultiplier) Matches at or above a vertical anchor, evaluated at the column start.
-
Field Details
-
WIRE
-
-
Method Details
-
toMinecraft
Description copied from interface:WrapperConvert this handle to the real Minecraft object.- Specified by:
toMinecraftin interfaceWrapper- Returns:
- the real Minecraft object
-
stoneDepth
@AsOf("2.4.0") static SurfaceCondition stoneDepth(int offset, boolean addSurfaceDepth, SurfaceCondition.CaveSurface surfaceType) Matches within a given depth of stone from the floor or ceiling.- Parameters:
offset- the depth offsetaddSurfaceDepth- whether the biome surface depth is added to the offsetsurfaceType- the face to measure from- Returns:
- a stone-depth condition
- Since:
- 2.4.0
-
stoneDepth
@AsOf("2.4.0") static SurfaceCondition stoneDepth(int offset, boolean addSurfaceDepth, int secondaryDepthRange, SurfaceCondition.CaveSurface surfaceType) Matches within a given depth of stone from the floor or ceiling, with a secondary depth range.- Parameters:
offset- the depth offsetaddSurfaceDepth- whether the biome surface depth is added to the offsetsecondaryDepthRange- the secondary depth rangesurfaceType- the face to measure from- Returns:
- a stone-depth condition
- Since:
- 2.4.0
-
not
Inverts another condition.- Parameters:
target- the condition to invert- Returns:
- a negated condition
- Since:
- 2.4.0
-
waterBlockCheck
Matches relative to the water level at the current block.- Parameters:
offset- the offset from the water levelsurfaceDepthMultiplier- the surface depth multiplier- Returns:
- a water condition
- Since:
- 2.4.0
-
waterStartCheck
Matches relative to the water level at the column start.- Parameters:
offset- the offset from the water levelsurfaceDepthMultiplier- the surface depth multiplier- Returns:
- a water condition
- Since:
- 2.4.0
-
isBiome
Matches when the current biome is one of the given biomes.- Parameters:
biomes- the biome keys to match- Returns:
- a biome condition
- Since:
- 2.4.0
-
noiseCondition
Matches when a registered noise sampled at this position is at or above the threshold.- Parameters:
noise- the noise parameters keyminThreshold- the lower threshold, inclusive- Returns:
- a noise condition
- Since:
- 2.4.0
-
noiseCondition
@AsOf("2.4.0") static SurfaceCondition noiseCondition(ResourceKey noise, double minThreshold, double maxThreshold) Matches when a registered noise sampled at this position is within the threshold range.- Parameters:
noise- the noise parameters keyminThreshold- the lower threshold, inclusivemaxThreshold- the upper threshold, inclusive- Returns:
- a noise condition
- Since:
- 2.4.0
-
yBlockCheck
@AsOf("2.4.0") static SurfaceCondition yBlockCheck(VerticalAnchor anchor, int surfaceDepthMultiplier) Matches at or above a vertical anchor, evaluated per block.- Parameters:
anchor- the vertical anchorsurfaceDepthMultiplier- the surface depth multiplier- Returns:
- a y condition
- Since:
- 2.4.0
-
yStartCheck
@AsOf("2.4.0") static SurfaceCondition yStartCheck(VerticalAnchor anchor, int surfaceDepthMultiplier) Matches at or above a vertical anchor, evaluated at the column start.- Parameters:
anchor- the vertical anchorsurfaceDepthMultiplier- the surface depth multiplier- Returns:
- a y condition
- Since:
- 2.4.0
-
verticalGradient
@AsOf("2.4.0") static SurfaceCondition verticalGradient(String randomName, VerticalAnchor trueAtAndBelow, VerticalAnchor falseAtAndAbove) A noisy vertical gradient that is true below one anchor and false above another, fading between.- Parameters:
randomName- the seed name for the gradient noisetrueAtAndBelow- the anchor at and below which the condition is truefalseAtAndAbove- the anchor at and above which the condition is false- Returns:
- a vertical-gradient condition
- Since:
- 2.4.0
-
steep
Matches on steep terrain.- Returns:
- a steep condition
- Since:
- 2.4.0
-
hole
Matches in surface holes.- Returns:
- a hole condition
- Since:
- 2.4.0
-
abovePreliminarySurface
Matches above the preliminary surface level.- Returns:
- an above-preliminary-surface condition
- Since:
- 2.4.0
-
temperature
Matches where the biome is cold enough to snow.- Returns:
- a temperature condition
- Since:
- 2.4.0
-