Class BlockIgnoreProcessor
java.lang.Object
com.github.darksoulq.abyssallib.world.structure.processor.StructureProcessor
com.github.darksoulq.abyssallib.world.structure.processor.impl.BlockIgnoreProcessor
A structure processor that prevents specific blocks from being placed.
This processor checks the namespaced ID of every block in the structure against a list of ignored IDs. If a match is found, the block placement is cancelled. It supports both vanilla Minecraft blocks and AbyssalLib custom blocks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BlockIgnoreProcessor> The codec used for serializing and deserializing the block ignore processor.static final StructureProcessorType<BlockIgnoreProcessor> The registered type definition for the block ignore structure processor. -
Constructor Summary
ConstructorsConstructorDescriptionBlockIgnoreProcessor(List<String> ignoredIds) Constructs a new BlockIgnoreProcessor. -
Method Summary
Modifier and TypeMethodDescriptiongetType()Retrieves the specific type definition for this processor.process(WorldGenAccess level, org.bukkit.Location origin, BlockInfo current, BlockInfo original) Processes a block placement in a world generation context.Processes a block placement in a standard world context.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the block ignore processor.It maps the "blocks" field, which is a list of strings representing the namespaced IDs to be ignored.
-
TYPE
The registered type definition for the block ignore structure processor.
-
-
Constructor Details
-
BlockIgnoreProcessor
-
-
Method Details
-
process
public BlockInfo process(org.bukkit.World world, org.bukkit.Location origin, BlockInfo current, BlockInfo original) Processes a block placement in a standard world context.- Specified by:
processin classStructureProcessor- Parameters:
world- The Bukkit world.origin- The structure origin.current- The currentBlockInfo.original- The originalBlockInfo.- Returns:
nullif the block is ignored, otherwise thecurrentblock info.
-
process
public BlockInfo process(WorldGenAccess level, org.bukkit.Location origin, BlockInfo current, BlockInfo original) Processes a block placement in a world generation context.- Specified by:
processin classStructureProcessor- Parameters:
level- The generation accessor.origin- The structure origin.current- The currentBlockInfo.original- The originalBlockInfo.- Returns:
nullif the block is ignored, otherwise thecurrentblock info.
-
getType
Retrieves the specific type definition for this processor.- Specified by:
getTypein classStructureProcessor- Returns:
- The
StructureProcessorTypeassociated withBlockIgnoreProcessor.
-