Interface Processor
public interface Processor
A structure processor affecting blocks in a structure.
Minecraft 26.2-snapshot-1 collapsed the previous split between a
processor instance and a standalone "processor type" object. A processor now
carries its own codec, and the vanilla
minecraft:worldgen/structure_processor registry stores those codecs keyed
by resource keys. See Processors for the set of
vanilla-provided processor IDs.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceImplementation-provided factory forProcessor. -
Method Summary
Modifier and TypeMethodDescriptionstatic Processorparse(RegistryHolder registries, ResourceKey id, DataView config) Parses aProcessorof the given registry ID from a serializedconfiguration.Returns the processor configuration.type()Returns the registry ID of this processor.
-
Method Details
-
parse
static Processor parse(RegistryHolder registries, ResourceKey id, DataView config) throws IOException Parses aProcessorof the given registry ID from a serializedconfiguration.The
RegistryHolderis required because processor codecs may reference holder entries from other registries (tags, block states, etc.) during deserialization.- Parameters:
registries- the registry holder used to resolve holder referencesid- the registry ID of the processor, as registered inminecraft:worldgen/structure_processor(seeProcessors)config- the serialized processor configuration- Returns:
- the parsed processor
- Throws:
IOException- if the configuration is malformed or the ID is unknown
-
type
ResourceKey type()Returns the registry ID of this processor.This is the key under which this processor's codec is registered in the
minecraft:worldgen/structure_processorregistry.- Returns:
- the processor registry ID
-
toContainer
DataContainer toContainer()Returns the processor configuration.- Returns:
- the processor configuration
-