java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.ProcessorRule

public class ProcessorRule extends Object
  • Field Details

    • DEFAULT_BLOCK_ENTITY_MODIFIER

      public static final Passthrough DEFAULT_BLOCK_ENTITY_MODIFIER
    • CODEC

      public static final com.mojang.serialization.Codec<ProcessorRule> CODEC
    • inputPredicate

      private final RuleTest inputPredicate
    • locPredicate

      private final RuleTest locPredicate
    • posPredicate

      private final PosRuleTest posPredicate
    • outputState

      private final BlockState outputState
    • blockEntityModifier

      private final RuleBlockEntityModifier blockEntityModifier
  • Constructor Details

  • 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

      public BlockState getOutputState()
    • getOutputTag

      @Nullable public CompoundTag getOutputTag(RandomSource pRandom, @Nullable CompoundTag pTag)