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.

  • Method Details

    • parse

      static Processor parse(RegistryHolder registries, ResourceKey id, DataView config) throws IOException
      Parses a Processor of the given registry ID from a serialized configuration.

      The RegistryHolder is 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 references
      id - the registry ID of the processor, as registered in minecraft:worldgen/structure_processor (see Processors)
      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_processor registry.

      Returns:
      the processor registry ID
    • toContainer

      DataContainer toContainer()
      Returns the processor configuration.
      Returns:
      the processor configuration