Interface ProcessorRule
- All Superinterfaces:
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:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionWhat happens to the placed block's block entity data.static ProcessorRule.BuilderCreates a new builder that replaces any template block passinginputPredicatewithoutputState, wherever it lands.static ProcessorRuleReads a Minecraft processor rule.The test the template block has to pass.The test the world block being replaced has to pass.static ProcessorRuleof(RuleTest inputPredicate, RuleTest locationPredicate, PosRuleTest positionPredicate, BlockData outputState, BlockEntityModifier blockEntityModifier) Creates a new rule.The block placed when every test passes.The test the block's position within the template has to pass.default ProcessorRule.BuilderConverts this object back to a builder.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
inputPredicate
-
locationPredicate
-
positionPredicate
The test the block's position within the template has to pass.- Returns:
- the position predicate
- Since:
- 3.4.0
-
outputState
-
blockEntityModifier
What happens to the placed block's block entity data.- Returns:
- the block entity modifier
- Since:
- 3.4.0
-
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 passlocationPredicate- the test the world block being replaced has to passpositionPredicate- the test the block's position has to passoutputState- the block placed when every test passesblockEntityModifier- what happens to the placed block's block entity data- Returns:
- a new rule
- Since:
- 3.4.0
-
builder
Creates a new builder that replaces any template block passinginputPredicatewithoutputState, wherever it lands.- Parameters:
inputPredicate- the test the template block has to passoutputState- the block placed when every test passes- Returns:
- a new builder
- Since:
- 3.4.0
-
decode
Reads a Minecraft processor rule.- Parameters:
minecraftRule- the rule to read- Returns:
- the decoded rule
- Since:
- 3.4.0
-