Interface StructureProcessor
- All Superinterfaces:
Wrapper
- All Known Subinterfaces:
BlackstoneReplaceProcessor, BlockAgeProcessor, BlockIgnoreProcessor, BlockRotProcessor, CappedProcessor, GravityProcessor, JigsawReplacementProcessor, LavaSubmergedBlockProcessor, NopProcessor, ProtectedBlocksProcessor, RuleProcessor
Wraps Minecraft's StructureProcessor: a step every block of a structure template passes through as
the template is placed, which can replace, age, drop or keep it.
- Since:
- 3.4.0
- See Also:
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic BlackstoneReplaceProcessorSwaps stone and cobblestone blocks for their blackstone equivalents.static BlockAgeProcessorblockAge(float mossiness) Ages stone bricks and similar blocks as they are placed.static BlockIgnoreProcessorblockIgnore(Material... blocks) Skips the given blocks when placing a template.static BlockRotProcessorblockRot(float integrity) Drops template blocks at random.static BlockRotProcessorDrops template blocks from the given set at random.static CappedProcessorcapped(StructureProcessor delegate, IntProvider limit) Applies another processor to at most a limited number of blocks.static StructureProcessorReads a Minecraft structure processor.static GravityProcessorgravity(HeightmapType heightmap, int offset) Drops every template block onto the terrain.static JigsawReplacementProcessorReplaces jigsaw blocks with the block they are set to turn into.static LavaSubmergedBlockProcessorKeeps template blocks from overwriting lava.static NopProcessornop()Does nothing.static ProtectedBlocksProcessorprotectedBlocks(TagSet<Material> cannotReplace) Keeps the template from overwriting the given world blocks.static RuleProcessorrule(ProcessorRule... rules) Replaces template blocks according to rules, the first matching rule winning.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
blackstoneReplace
Swaps stone and cobblestone blocks for their blackstone equivalents.- Returns:
- the blackstone-replace processor
- Since:
- 3.4.0
-
blockAge
Ages stone bricks and similar blocks as they are placed.- Parameters:
mossiness- the chance, from 0 to 1, of an aged block becoming mossy- Returns:
- a new block-age processor
- Since:
- 3.4.0
-
blockIgnore
Skips the given blocks when placing a template.- Parameters:
blocks- the blocks that are not placed- Returns:
- a new block-ignore processor
- Since:
- 3.4.0
-
blockRot
Drops template blocks at random.- Parameters:
integrity- the chance, from 0 to 1, that a block is kept- Returns:
- a new block-rot processor
- Since:
- 3.4.0
-
blockRot
Drops template blocks from the given set at random.- Parameters:
rottableBlocks- the blocks that may be droppedintegrity- the chance, from 0 to 1, that a block is kept- Returns:
- a new block-rot processor
- Since:
- 3.4.0
-
capped
Applies another processor to at most a limited number of blocks.- Parameters:
delegate- the processor that is appliedlimit- how many blocks the processor is applied to- Returns:
- a new capped processor
- Since:
- 3.4.0
-
gravity
Drops every template block onto the terrain.- Parameters:
heightmap- the heightmap blocks are placed relative tooffset- the offset from the heightmap blocks are placed at- Returns:
- a new gravity processor
- Since:
- 3.4.0
-
jigsawReplacement
Replaces jigsaw blocks with the block they are set to turn into.- Returns:
- the jigsaw-replacement processor
- Since:
- 3.4.0
-
lavaSubmergedBlock
Keeps template blocks from overwriting lava.- Returns:
- the lava-submerged-block processor
- Since:
- 3.4.0
-
nop
-
protectedBlocks
Keeps the template from overwriting the given world blocks.- Parameters:
cannotReplace- the world blocks the template may not overwrite- Returns:
- a new protected-blocks processor
- Since:
- 3.4.0
-
rule
Replaces template blocks according to rules, the first matching rule winning.- Parameters:
rules- the rules tried in order- Returns:
- a new rule processor
- Since:
- 3.4.0
-
decode
Reads a Minecraft structure processor.- Parameters:
minecraftProcessor- the processor to read- Returns:
- the decoded processor
- Since:
- 3.4.0
-