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 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

      public BlockState getOutputState()
    • getOutputTag

      @Nullable public CompoundTag getOutputTag(RandomSource random, @Nullable CompoundTag tag)