Class VinesProcessor
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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VinesProcessor> TheMapCodecfor serializing and deserializing aVinesProcessorfrom JSON. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorType<?> getType()Retrieves the registeredStructureProcessorTypefor this processor.net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfoprocessBlock(@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
-
Field Details
-
CODEC
TheMapCodecfor serializing and deserializing aVinesProcessorfrom JSON.
-
-
Constructor Details
-
VinesProcessor
public VinesProcessor(float probability) Constructs a newVinesProcessor.- Parameters:
probability- The chance (0.0to1.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:
processBlockin classnet.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 registeredStructureProcessorTypefor this processor.- Specified by:
getTypein classnet.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessor- Returns:
StructureProcessors.ADD_VINES.
-