Interface StructureProcessor

All Superinterfaces:
Wrapper
All Known Subinterfaces:
BlackstoneReplaceProcessor, BlockAgeProcessor, BlockIgnoreProcessor, BlockRotProcessor, CappedProcessor, GravityProcessor, JigsawReplacementProcessor, LavaSubmergedBlockProcessor, NopProcessor, ProtectedBlocksProcessor, RuleProcessor

@NullMarked @AsOf("3.4.0") public interface StructureProcessor extends Wrapper
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 Details

    • blackstoneReplace

      @AsOf("3.4.0") static BlackstoneReplaceProcessor blackstoneReplace()
      Swaps stone and cobblestone blocks for their blackstone equivalents.
      Returns:
      the blackstone-replace processor
      Since:
      3.4.0
    • blockAge

      @AsOf("3.4.0") static BlockAgeProcessor blockAge(float mossiness)
      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

      @AsOf("3.4.0") static BlockIgnoreProcessor blockIgnore(Material... blocks)
      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

      @AsOf("3.4.0") static BlockRotProcessor blockRot(float integrity)
      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

      @AsOf("3.4.0") static BlockRotProcessor blockRot(TagSet<Material> rottableBlocks, float integrity)
      Drops template blocks from the given set at random.
      Parameters:
      rottableBlocks - the blocks that may be dropped
      integrity - the chance, from 0 to 1, that a block is kept
      Returns:
      a new block-rot processor
      Since:
      3.4.0
    • capped

      @AsOf("3.4.0") static CappedProcessor capped(StructureProcessor delegate, IntProvider limit)
      Applies another processor to at most a limited number of blocks.
      Parameters:
      delegate - the processor that is applied
      limit - how many blocks the processor is applied to
      Returns:
      a new capped processor
      Since:
      3.4.0
    • gravity

      @AsOf("3.4.0") static GravityProcessor gravity(HeightmapType heightmap, int offset)
      Drops every template block onto the terrain.
      Parameters:
      heightmap - the heightmap blocks are placed relative to
      offset - the offset from the heightmap blocks are placed at
      Returns:
      a new gravity processor
      Since:
      3.4.0
    • jigsawReplacement

      @AsOf("3.4.0") static JigsawReplacementProcessor jigsawReplacement()
      Replaces jigsaw blocks with the block they are set to turn into.
      Returns:
      the jigsaw-replacement processor
      Since:
      3.4.0
    • lavaSubmergedBlock

      @AsOf("3.4.0") static LavaSubmergedBlockProcessor lavaSubmergedBlock()
      Keeps template blocks from overwriting lava.
      Returns:
      the lava-submerged-block processor
      Since:
      3.4.0
    • nop

      @AsOf("3.4.0") static NopProcessor nop()
      Does nothing.
      Returns:
      the no-op processor
      Since:
      3.4.0
    • protectedBlocks

      @AsOf("3.4.0") static ProtectedBlocksProcessor protectedBlocks(TagSet<Material> cannotReplace)
      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

      @AsOf("3.4.0") static RuleProcessor rule(ProcessorRule... rules)
      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

      @AsOf("3.4.0") static StructureProcessor decode(Object minecraftProcessor)
      Reads a Minecraft structure processor.
      Parameters:
      minecraftProcessor - the processor to read
      Returns:
      the decoded processor
      Since:
      3.4.0