Class ProcessorRule
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.ProcessorRule
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RuleBlockEntityModifier
static final com.mojang.serialization.Codec
<ProcessorRule> static final Passthrough
private final RuleTest
private final RuleTest
private final BlockState
private final PosRuleTest
-
Constructor Summary
ConstructorsConstructorDescriptionProcessorRule
(RuleTest inputPredicate, RuleTest locPredicate, BlockState outputState) ProcessorRule
(RuleTest inputPredicate, RuleTest locPredicate, PosRuleTest posPredicate, BlockState outputState) ProcessorRule
(RuleTest inputPredicate, RuleTest locPredicate, PosRuleTest posPredicate, BlockState outputState, RuleBlockEntityModifier blockEntityModifier) -
Method Summary
Modifier and TypeMethodDescriptiongetOutputTag
(RandomSource random, CompoundTag tag) boolean
test
(BlockState inputState, BlockState existingState, BlockPos localPos, BlockPos relativePos, BlockPos structurePos, RandomSource random)
-
Field Details
-
DEFAULT_BLOCK_ENTITY_MODIFIER
-
CODEC
-
inputPredicate
-
locPredicate
-
posPredicate
-
outputState
-
blockEntityModifier
-
-
Constructor Details
-
ProcessorRule
-
ProcessorRule
public ProcessorRule(RuleTest inputPredicate, RuleTest locPredicate, PosRuleTest posPredicate, BlockState outputState) -
ProcessorRule
public ProcessorRule(RuleTest inputPredicate, RuleTest locPredicate, PosRuleTest posPredicate, BlockState outputState, RuleBlockEntityModifier blockEntityModifier)
-
-
Method Details
-
test
public boolean test(BlockState inputState, BlockState existingState, BlockPos localPos, BlockPos relativePos, BlockPos structurePos, RandomSource random) - Parameters:
inputState
- The incoming state from the structure.existingState
- The current state in the world.localPos
- The local position of the target state, relative to the structure origin.relativePos
- The actual position of the target state.existingState
is the current in world state at this position.structurePos
- The origin position of the structure.
-
getOutputState
-
getOutputTag
-