java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor
johnsmith.enchantingoverhauled.api.structure.processor.ProcessorList

public class ProcessorList extends net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor
A composite StructureProcessor that sequentially delegates block processing across a list of referenced StructureProcessorList holders.

Allows modular processor lists (such as roof, wall, frame, and mossify processor lists) to be composed and reused cleanly within a single parent processor list JSON file.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<ProcessorList>
    The MapCodec for serializing and deserializing a composite ProcessorList from JSON.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcessorList(List<net.minecraft.core.Holder<net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList>> processorLists)
    Constructs a new composite ProcessorList.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorType<?>
    Retrieves the registered StructureProcessorType for this composite processor.
    net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo
    processBlock(net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos offset, net.minecraft.core.BlockPos pos, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo blockInfoIn, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo blockInfoOut, net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings settings)
    Sequentially pipes blockInfoOut through every processor in each nested StructureProcessorList.

    Methods inherited from class net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor

    finalizeProcessing

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<ProcessorList> CODEC
      The MapCodec for serializing and deserializing a composite ProcessorList from JSON.
  • Constructor Details

    • ProcessorList

      public ProcessorList(List<net.minecraft.core.Holder<net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList>> processorLists)
      Constructs a new composite ProcessorList.
      Parameters:
      processorLists - The list of StructureProcessorList holders to chain.
  • Method Details

    • processBlock

      @Nullable public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo processBlock(net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos offset, net.minecraft.core.BlockPos pos, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo blockInfoIn, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo blockInfoOut, net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings settings)
      Sequentially pipes blockInfoOut through every processor in each nested StructureProcessorList. If any processor returns null (removing the block), processing halts immediately and returns null.
      Overrides:
      processBlock in class net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor
      Parameters:
      level - The level reader.
      offset - The template offset position.
      pos - The structure pivot position.
      blockInfoIn - The unrotated original block info from the template.
      blockInfoOut - The current transformed block info in world coordinates.
      settings - The structure placement settings.
      Returns:
      The final processed StructureTemplate.StructureBlockInfo, or null if removed.
    • getType

      protected net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorType<?> getType()
      Retrieves the registered StructureProcessorType for this composite processor.
      Specified by:
      getType in class net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor
      Returns:
      StructureProcessors.LIST_PROCESSOR.