Class ProcessorRule

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 locState, BlockPos inTemplatePos, BlockPos worldPos, BlockPos reference, RandomSource random)
      Parameters:
      inputState - The incoming state from the structure.
      locState - The current state in the world.
      inTemplatePos - The local position of the target state, relative to the structure origin.
      worldPos - The actual position of the target state. existingState is the current in world state at this position.
      reference - The origin position of the structure.
    • getOutputState

      public BlockState getOutputState()
    • getOutputTag

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