Class JigsawStructure.Builder

java.lang.Object
dev.wyck.worldgen.structure.types.JigsawStructure.Builder
Enclosing interface:
JigsawStructure

@AsOf("3.4.0") public static final class JigsawStructure.Builder extends Object
Builder for JigsawStructure.
Since:
3.4.0
  • Constructor Details

  • Method Details

    • resourceKey

      @AsOf("3.4.0") public JigsawStructure.Builder resourceKey(ResourceKey resourceKey)
      Sets the resource key of the structure.
      Parameters:
      resourceKey - the resource key of the structure
      Returns:
      this builder
      Since:
      3.4.0
    • settings

      @AsOf("3.4.0") public JigsawStructure.Builder settings(StructureSettings settings)
      Sets the settings every structure carries.
      Parameters:
      settings - the settings of the structure
      Returns:
      this builder
      Since:
      3.4.0
    • startPool

      @AsOf("3.4.0") public JigsawStructure.Builder startPool(TemplatePool startPool)
      Sets the pool the first piece is drawn from.
      Parameters:
      startPool - the start pool
      Returns:
      this builder
      Since:
      3.4.0
    • startJigsawName

      @AsOf("3.4.0") public JigsawStructure.Builder startJigsawName(ResourceKey startJigsawName)
      Sets the jigsaw block in the start piece anchored to the structure's position.
      Parameters:
      startJigsawName - the start jigsaw name
      Returns:
      this builder
      Since:
      3.4.0
    • size

      @AsOf("3.4.0") public JigsawStructure.Builder size(int size)
      Sets how many jigsaw steps the structure grows from its start piece.
      Parameters:
      size - the maximum depth
      Returns:
      this builder
      Since:
      3.4.0
    • startHeight

      @AsOf("3.4.0") public JigsawStructure.Builder startHeight(HeightProvider startHeight)
      Sets the height the start piece is placed at.
      Parameters:
      startHeight - the start height
      Returns:
      this builder
      Since:
      3.4.0
    • useExpansionHack

      @AsOf("3.4.0") public JigsawStructure.Builder useExpansionHack(boolean useExpansionHack)
      Sets whether vanilla's village expansion hack is used.
      Parameters:
      useExpansionHack - whether the expansion hack is used
      Returns:
      this builder
      Since:
      3.4.0
    • projectStartToHeightmap

      @AsOf("3.4.0") public JigsawStructure.Builder projectStartToHeightmap(HeightmapType projectStartToHeightmap)
      Sets the heightmap the start height is measured from.
      Parameters:
      projectStartToHeightmap - the heightmap
      Returns:
      this builder
      Since:
      3.4.0
    • maxDistanceFromCenter

      @AsOf("3.4.0") public JigsawStructure.Builder maxDistanceFromCenter(JigsawStructure.MaxDistance maxDistanceFromCenter)
      Sets the furthest pieces may be placed from the start.
      Parameters:
      maxDistanceFromCenter - the maximum distance from the center
      Returns:
      this builder
      Since:
      3.4.0
    • poolAliases

      @AsOf("3.4.0") public JigsawStructure.Builder poolAliases(List<PoolAliasBinding> poolAliases)
      Sets the pool aliases resolved once per structure.
      Parameters:
      poolAliases - the pool alias bindings
      Returns:
      this builder
      Since:
      3.4.0
    • dimensionPadding

      @AsOf("3.4.0") public JigsawStructure.Builder dimensionPadding(DimensionPadding dimensionPadding)
      Sets the clearance kept from the bottom and top of the dimension.
      Parameters:
      dimensionPadding - the dimension padding
      Returns:
      this builder
      Since:
      3.4.0
    • liquidSettings

      @AsOf("3.4.0") public JigsawStructure.Builder liquidSettings(LiquidSettings liquidSettings)
      Sets whether pieces landing in water are waterlogged.
      Parameters:
      liquidSettings - the liquid settings
      Returns:
      this builder
      Since:
      3.4.0
    • poolAlias

      @AsOf("3.4.0") public JigsawStructure.Builder poolAlias(PoolAliasBinding poolAlias)
      Adds a pool alias binding.
      Parameters:
      poolAlias - the binding to add
      Returns:
      this builder
      Since:
      3.4.0
    • build

      @AsOf("3.4.0") public JigsawStructure build()
      Builds the jigsaw structure.
      Returns:
      the jigsaw structure
      Since:
      3.4.0