Interface RuleSource

All Superinterfaces:
SurfaceRule, Wrapper
All Known Subinterfaces:
BandlandsRuleSource, BlockRuleSource, ConditionRuleSource, SequenceRuleSource

@NullMarked @AsOf("3.0.0") public interface RuleSource extends SurfaceRule
A surface rule source — the tree (SurfaceRules.RuleSource) that decides which block is placed at the surface during generation.
Since:
3.0.0
See Also:
  • Method Details

    • when

      @AsOf("3.0.0") default ConditionRuleSource when(ConditionSource condition)
      Applies this rule only where the given condition holds.
      Parameters:
      condition - the gating condition
      Returns:
      a rule gated by the condition
      Since:
      3.0.0
    • decode

      @AsOf("3.3.0") static RuleSource decode(Object minecraftRule)
      Reads a Minecraft surface-rule source.
      Parameters:
      minecraftRule - the rule to read
      Returns:
      the decoded rule
      Since:
      3.3.0