Class ProcessorList
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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ProcessorList> TheMapCodecfor serializing and deserializing a compositeProcessorListfrom JSON. -
Constructor Summary
ConstructorsConstructorDescriptionProcessorList(List<net.minecraft.core.Holder<net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList>> processorLists) Constructs a new compositeProcessorList. -
Method Summary
Modifier and TypeMethodDescriptionprotected net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorType<?> getType()Retrieves the registeredStructureProcessorTypefor this composite processor.net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfoprocessBlock(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 pipesblockInfoOutthrough every processor in each nestedStructureProcessorList.Methods inherited from class net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor
finalizeProcessing
-
Field Details
-
CODEC
TheMapCodecfor serializing and deserializing a compositeProcessorListfrom JSON.
-
-
Constructor Details
-
ProcessorList
public ProcessorList(List<net.minecraft.core.Holder<net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorList>> processorLists) Constructs a new compositeProcessorList.- Parameters:
processorLists- The list ofStructureProcessorListholders 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 pipesblockInfoOutthrough every processor in each nestedStructureProcessorList. If any processor returnsnull(removing the block), processing halts immediately and returnsnull.- Overrides:
processBlockin classnet.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, ornullif removed.
-
getType
protected net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorType<?> getType()Retrieves the registeredStructureProcessorTypefor this composite processor.- Specified by:
getTypein classnet.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor- Returns:
StructureProcessors.LIST_PROCESSOR.
-