Interface ProcessorRule

All Superinterfaces:
Wrapper

@NullMarked @AsOf("3.4.0") public interface ProcessorRule extends Wrapper
One rule of a RuleProcessor: when the template block passes inputPredicate(), the world block it lands on passes locationPredicate(), and its position passes positionPredicate(), the block is replaced with outputState().
Since:
3.4.0
See Also:
  • Method Details

    • inputPredicate

      @AsOf("3.4.0") RuleTest inputPredicate()
      The test the template block has to pass.
      Returns:
      the input predicate
      Since:
      3.4.0
    • locationPredicate

      @AsOf("3.4.0") RuleTest locationPredicate()
      The test the world block being replaced has to pass.
      Returns:
      the location predicate
      Since:
      3.4.0
    • positionPredicate

      @AsOf("3.4.0") PosRuleTest positionPredicate()
      The test the block's position within the template has to pass.
      Returns:
      the position predicate
      Since:
      3.4.0
    • outputState

      @AsOf("3.4.0") BlockData outputState()
      The block placed when every test passes.
      Returns:
      the output state
      Since:
      3.4.0
    • blockEntityModifier

      @AsOf("3.4.0") BlockEntityModifier blockEntityModifier()
      What happens to the placed block's block entity data.
      Returns:
      the block entity modifier
      Since:
      3.4.0
    • toBuilder

      @AsOf("3.4.0") default ProcessorRule.Builder toBuilder()
      Converts this object back to a builder.
      Returns:
      a builder with the same values as this object
      Since:
      3.4.0
    • of

      @AsOf("3.4.0") static ProcessorRule of(RuleTest inputPredicate, RuleTest locationPredicate, PosRuleTest positionPredicate, BlockData outputState, BlockEntityModifier blockEntityModifier)
      Creates a new rule.
      Parameters:
      inputPredicate - the test the template block has to pass
      locationPredicate - the test the world block being replaced has to pass
      positionPredicate - the test the block's position has to pass
      outputState - the block placed when every test passes
      blockEntityModifier - what happens to the placed block's block entity data
      Returns:
      a new rule
      Since:
      3.4.0
    • builder

      @AsOf("3.4.0") static ProcessorRule.Builder builder(RuleTest inputPredicate, BlockData outputState)
      Creates a new builder that replaces any template block passing inputPredicate with outputState, wherever it lands.
      Parameters:
      inputPredicate - the test the template block has to pass
      outputState - the block placed when every test passes
      Returns:
      a new builder
      Since:
      3.4.0
    • decode

      @AsOf("3.4.0") static ProcessorRule decode(Object minecraftRule)
      Reads a Minecraft processor rule.
      Parameters:
      minecraftRule - the rule to read
      Returns:
      the decoded rule
      Since:
      3.4.0