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

public class VinesProcessor extends net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor
A StructureProcessor that attaches vines (Blocks.VINE) to the sides of solid blocks.

Iterates through non-air blocks in the structure. If a block has a sturdy horizontal face adjacent to an air block, it randomly places a vine in the adjacent air space oriented back toward the solid face.

  • Field Summary

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

    Constructors
    Constructor
    Description
    VinesProcessor(float probability)
    Constructs a new VinesProcessor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected @NotNull net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorType<?>
    Retrieves the registered StructureProcessorType for this processor.
    net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo
    processBlock(@NotNull net.minecraft.world.level.LevelReader levelReader, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.core.BlockPos pivot, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo originalBlockInfo, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo currentBlockInfo, @NotNull net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings data)
    Processes a single block during structure placement, attempting to attach vines to adjacent horizontal air blocks if the current block is solid.

    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<VinesProcessor> CODEC
      The MapCodec for serializing and deserializing a VinesProcessor from JSON.
  • Constructor Details

    • VinesProcessor

      public VinesProcessor(float probability)
      Constructs a new VinesProcessor.
      Parameters:
      probability - The chance (0.0 to 1.0) to spawn vines on a valid face.
  • Method Details

    • processBlock

      @Nullable public net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo processBlock(@NotNull @NotNull net.minecraft.world.level.LevelReader levelReader, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.core.BlockPos pivot, @NotNull net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo originalBlockInfo, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo currentBlockInfo, @NotNull @NotNull net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings data)
      Processes a single block during structure placement, attempting to attach vines to adjacent horizontal air blocks if the current block is solid.
      Overrides:
      processBlock in class net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor
      Parameters:
      levelReader - The level reader.
      pos - The template offset position.
      pivot - The structure pivot position.
      originalBlockInfo - The unrotated original block info from the template.
      currentBlockInfo - The transformed block info in world coordinates.
      data - The structure placement settings.
      Returns:
      The unmodified currentBlockInfo.
    • getType

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