Interface SurfaceRule.Factory
- Enclosing interface:
- SurfaceRule
public static interface SurfaceRule.Factory
-
Method Summary
Modifier and TypeMethodDescriptionaboveBottom
(int blocks) Returns anSurfaceRule.VerticalAnchor
above the bottom of the world.absolute
(int y) Returns anSurfaceRule.VerticalAnchor
at given y position.badlands()
Returns the badlands surface rule.belowTop
(int blocks) Returns anSurfaceRule.VerticalAnchor
below the top of the world.biome
(List<RegistryReference<Biome>> biomes) Returns the surface condition for biomesblock
(BlockState blockState) Returns the surface rule for setting aBlockState
.blockAbove
(SurfaceRule.VerticalAnchor anchor, int depthMultiplier) Returns the surface condition to check for blocks above a y coordinatebottom()
Returns anSurfaceRule.VerticalAnchor
at the bottom of the world.ceiling
(int offset, boolean useDepth, int secondaryDepth) Returns the surface condition to check for blocks around ceiling surfaces.end()
Returns the surface rules for the vanilla end.firstOf
(List<SurfaceRule> surfaceRules) Returns the surface rule for a list of surface rules of which only the first successful rule is applied.firstOf
(SurfaceRule... surfaceRules) Returns the surface rule for a list of surface rules of which only the first successful rule is applied.floor
(int offset, boolean useDepth, int secondaryDepth) Returns the surface condition to check for blocks around floor surfaces.hole()
Returns the surface condition for holes.liquidDepth
(int offset, int depthMultiplier) Returns the surface condition to check for liquid depthliquidDepthFromSurface
(int offset, int depthMultiplier) Returns the surface condition to check for liquid depth from the nearest surface.Returns the surface condition for blocks near to the surface of the world.nether()
Returns the surface rules for the vanilla nether.noiseThreshold
(RegistryReference<Noise> noise, double min, double max) Returns the surface condition to match a range of givenNoise
.not
(SurfaceRule.Condition condition) Returns the inverted surface condition.Returns the surface condition to check for blocks on ceiling surfaces.onFloor()
Returns the surface condition to check for blocks on floor surfaces.Returns the surface rules for the vanilla overworld.overworldLike
(boolean nearSurface, boolean bedrockRoof, boolean bedrockFloor) Returns the surface rules for a vanilla like overworld.Returns the surface condition to check for temperatures allowing snowfall.steep()
Returns the surface condition for steep inclines.surfaceAbove
(SurfaceRule.VerticalAnchor anchor, int depthMultiplier) Returns the surface condition to check for surface blocks above a y coordinatetest
(List<SurfaceRule.Condition> conditions, SurfaceRule rule) Returns a conditional surface rule.test
(SurfaceRule.Condition condition, SurfaceRule rule) Returns a conditional surface rule.top()
Returns anSurfaceRule.VerticalAnchor
at the top of the world.underCeiling
(int depth) Returns the surface condition to check for blocks under ceiling surfaces.underFloor
(int depth) Returns the surface condition to check for blocks under floor surfaces.verticalGradient
(String randomSource, int fromY, int toY) Returns the surface condition to select blocks in a vertical gradient.verticalGradient
(String randomSource, SurfaceRule.VerticalAnchor fromY, SurfaceRule.VerticalAnchor toY) Returns the surface condition to select blocks in a vertical gradient.
-
Method Details
-
overworld
SurfaceRule overworld()Returns the surface rules for the vanilla overworld.- Returns:
- the surface rules
-
overworldLike
Returns the surface rules for a vanilla like overworld.- Parameters:
nearSurface
- whether to only apply most surface rules to the surface of the worldbedrockRoof
- whether to place a bedrock roofbedrockFloor
- whether to place a bedrock floor- Returns:
- the custom surface rules
-
nether
SurfaceRule nether()Returns the surface rules for the vanilla nether.- Returns:
- the surface rules.
-
end
SurfaceRule end()Returns the surface rules for the vanilla end.- Returns:
- the surface rules.
-
firstOf
Returns the surface rule for a list of surface rules of which only the first successful rule is applied.- Parameters:
surfaceRules
- The surface rules- Returns:
- the surface rule
-
firstOf
Returns the surface rule for a list of surface rules of which only the first successful rule is applied.- Parameters:
surfaceRules
- The surface rules- Returns:
- the surface rule
-
badlands
SurfaceRule badlands()Returns the badlands surface rule.- Returns:
- The surface rule
-
block
Returns the surface rule for setting aBlockState
.- Parameters:
blockState
- The block state- Returns:
- the surface rule
-
test
Returns a conditional surface rule.- Parameters:
conditions
- The conditionsrule
- The surface rule to conditionally apply- Returns:
- the surface rule
-
test
Returns a conditional surface rule.- Parameters:
condition
- The conditionrule
- The surface rule to conditionally apply- Returns:
- the surface rule
-
not
Returns the inverted surface condition.- Parameters:
condition
- The surface condition to invert- Returns:
- The inverted surface condition
-
liquidDepth
Returns the surface condition to check for liquid depth- Parameters:
offset
- The offsetdepthMultiplier
- The depth multiplier- Returns:
- The surface condition
-
liquidDepthFromSurface
Returns the surface condition to check for liquid depth from the nearest surface.- Parameters:
offset
- The offsetdepthMultiplier
- The depth multiplier- Returns:
- The surface condition
-
biome
Returns the surface condition for biomes- Parameters:
biomes
- The list of biomes- Returns:
- The surface condition
-
nearSurface
SurfaceRule.Condition nearSurface()Returns the surface condition for blocks near to the surface of the world.- Returns:
- The surface condition
-
hole
SurfaceRule.Condition hole()Returns the surface condition for holes. Holes are located where thesurface noise
results in depth of zero or less.- Returns:
- The surface condition
-
verticalGradient
Returns the surface condition to select blocks in a vertical gradient.- Parameters:
randomSource
- The random sourcefromY
- the lowest blocktoY
- the highest block- Returns:
- The surface condition
-
verticalGradient
SurfaceRule.Condition verticalGradient(String randomSource, SurfaceRule.VerticalAnchor fromY, SurfaceRule.VerticalAnchor toY) Returns the surface condition to select blocks in a vertical gradient.- Parameters:
randomSource
- The random sourcefromY
- the lowest blocktoY
- the highest block- Returns:
- The surface condition
-
steep
SurfaceRule.Condition steep()Returns the surface condition for steep inclines.- Returns:
- The surface condition
-
onFloor
SurfaceRule.Condition onFloor()Returns the surface condition to check for blocks on floor surfaces.- Returns:
- The surface condition
-
underFloor
Returns the surface condition to check for blocks under floor surfaces.- Parameters:
depth
- The depth- Returns:
- The surface condition
-
floor
Returns the surface condition to check for blocks around floor surfaces.- Parameters:
offset
- The offsetuseDepth
- Whether to use depthsecondaryDepth
- The secondary depth. 0 to disable.- Returns:
- The surface condition
-
onCeiling
SurfaceRule.Condition onCeiling()Returns the surface condition to check for blocks on ceiling surfaces.- Returns:
- The surface condition
-
underCeiling
Returns the surface condition to check for blocks under ceiling surfaces.- Parameters:
depth
- The depth- Returns:
- The surface condition
-
ceiling
Returns the surface condition to check for blocks around ceiling surfaces.- Parameters:
offset
- The offsetuseDepth
- Whether to use depthsecondaryDepth
- The secondary depth. 0 to disable.- Returns:
- The surface condition
-
snowyTemperature
SurfaceRule.Condition snowyTemperature()Returns the surface condition to check for temperatures allowing snowfall.- Returns:
- The surface condition
-
blockAbove
Returns the surface condition to check for blocks above a y coordinate- Parameters:
anchor
- The lowest block positiondepthMultiplier
- The multiplier to apply to the surface noise- Returns:
- The surface condition
-
surfaceAbove
Returns the surface condition to check for surface blocks above a y coordinate- Parameters:
anchor
- The lowest block positiondepthMultiplier
- The multiplier to apply to the surface noise- Returns:
- The surface condition
-
noiseThreshold
Returns the surface condition to match a range of givenNoise
.- Parameters:
noise
- The noisemin
- the minimum valuemax
- the maximum value- Returns:
- The surface condition
-
absolute
Returns anSurfaceRule.VerticalAnchor
at given y position.- Parameters:
y
- The y position- Returns:
- The anchor
-
top
Returns anSurfaceRule.VerticalAnchor
at the top of the world.- Returns:
- The anchor
-
belowTop
Returns anSurfaceRule.VerticalAnchor
below the top of the world.- Parameters:
blocks
- The amount of block below the top of the world- Returns:
- The anchor
-
bottom
SurfaceRule.VerticalAnchor bottom()Returns anSurfaceRule.VerticalAnchor
at the bottom of the world.- Returns:
- The anchor
-
aboveBottom
Returns anSurfaceRule.VerticalAnchor
above the bottom of the world.- Parameters:
blocks
- The amount of block above the bottom of the world- Returns:
- The anchor
-