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
  • Field Details

  • Method Details

    • toMinecraft

      @AsOf("2.4.0") default Object toMinecraft()
      Description copied from interface: Wrapper
      Convert this handle to the real Minecraft object.
      Specified by:
      toMinecraft in interface Wrapper
      Returns:
      the real Minecraft object
    • bandlands

      @AsOf("2.4.0") static SurfaceRule bandlands()
      The badlands banded-terracotta rule.
      Returns:
      the bandlands rule
      Since:
      2.4.0
    • block

      @AsOf("2.4.0") static SurfaceRule block(Material block)
      Places the given block's default state.
      Parameters:
      block - the block to place
      Returns:
      a block rule
      Since:
      2.4.0
    • sequence

      @AsOf("2.4.0") static SurfaceRule sequence(List<SurfaceRule> rules)
      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

      @AsOf("2.4.0") static SurfaceRule ifTrue(SurfaceCondition condition, SurfaceRule then)
      Applies a rule only when a condition holds.
      Parameters:
      condition - the gating condition
      then - the rule to apply when the condition holds
      Returns:
      a conditional rule
      Since:
      2.4.0