Interface SurfaceRule
- All Superinterfaces:
Wrapper
- All Known Implementing Classes:
SurfaceRule.Bandlands, SurfaceRule.Block, SurfaceRule.Condition, SurfaceRule.Sequence
@NullMarked
@AsOf("2.4.0")
public sealed interface SurfaceRule
extends Wrapper
permits SurfaceRule.Bandlands, SurfaceRule.Block, SurfaceRule.Sequence, SurfaceRule.Condition
Wraps the surface-rule family (
SurfaceRules.RuleSource), the tree that decides which block
is placed at the surface during generation.- Since:
- 2.4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final recordstatic interfacestatic final recordNested classes/interfaces inherited from interface Wrapper
Wrapper.Context<C> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SurfaceRuleThe badlands banded-terracotta rule.static SurfaceRulePlaces the given block's default state.static SurfaceRuleifTrue(SurfaceCondition condition, SurfaceRule then) Applies a rule only when a condition holds.static SurfaceRulesequence(List<SurfaceRule> rules) Evaluates rules in order, using the first that applies.default ObjectConvert this handle to the real Minecraft object.
-
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
-
bandlands
The badlands banded-terracotta rule.- Returns:
- the bandlands rule
- Since:
- 2.4.0
-
block
Places the given block's default state.- Parameters:
block- the block to place- Returns:
- a block rule
- Since:
- 2.4.0
-
sequence
Evaluates rules in order, using the first that applies.- Parameters:
rules- the rules to evaluate in order- Returns:
- a sequence rule
- Since:
- 2.4.0
-
ifTrue
Applies a rule only when a condition holds.- Parameters:
condition- the gating conditionthen- the rule to apply when the condition holds- Returns:
- a conditional rule
- Since:
- 2.4.0
-