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 pInputPredicate, RuleTest pLocPredicate, BlockState pOutputState) ProcessorRule
(RuleTest pInputPredicate, RuleTest pLocPredicate, PosRuleTest pPosPredicate, BlockState pOutputState) ProcessorRule
(RuleTest pInputPredicate, RuleTest pLocPredicate, PosRuleTest pPosPredicate, BlockState pOutputState, RuleBlockEntityModifier p_277808_) -
Method Summary
Modifier and TypeMethodDescriptiongetOutputTag
(RandomSource pRandom, CompoundTag pTag) boolean
test
(BlockState pInputState, BlockState pExistingState, BlockPos pLocalPos, BlockPos pRelativePos, BlockPos pStructurePos, RandomSource pRandom)
-
Field Details
-
DEFAULT_BLOCK_ENTITY_MODIFIER
-
CODEC
-
inputPredicate
-
locPredicate
-
posPredicate
-
outputState
-
blockEntityModifier
-
-
Constructor Details
-
ProcessorRule
-
ProcessorRule
public ProcessorRule(RuleTest pInputPredicate, RuleTest pLocPredicate, PosRuleTest pPosPredicate, BlockState pOutputState) -
ProcessorRule
public ProcessorRule(RuleTest pInputPredicate, RuleTest pLocPredicate, PosRuleTest pPosPredicate, BlockState pOutputState, RuleBlockEntityModifier p_277808_)
-
-
Method Details
-
test
public boolean test(BlockState pInputState, BlockState pExistingState, BlockPos pLocalPos, BlockPos pRelativePos, BlockPos pStructurePos, RandomSource pRandom) - Parameters:
pInputState
- The incoming state from the structure.pExistingState
- The current state in the world.pLocalPos
- The local position of the target state, relative to the structure origin.pRelativePos
- The actual position of the target state.existingState
is the current in world state at this position.pStructurePos
- The origin position of the structure.
-
getOutputState
-
getOutputTag
-