Interface FileMappingsSpecBuilder

All Known Implementing Classes:
FileMappingsSpecBuilderImpl

@Experimental public interface FileMappingsSpecBuilder
A builder for a file mappings layer. This layer type supports any mapping type that mapping-io can read.
  • Method Details

    • mappingPath

      FileMappingsSpecBuilder mappingPath(String mappingPath)
      Sets the mapping path inside a zip or jar. This will have no effect if the file of this mapping spec is not a zip.

      Path components within the path should be separated with /.

      The default mapping path is mappings/mappings.tiny, matching regular mapping dependency jars such as Yarn's.

      Parameters:
      mappingPath - the mapping path
      Returns:
      this builder
    • fallbackNamespaces

      FileMappingsSpecBuilder fallbackNamespaces(String sourceNamespace, String targetNamespace)
      Sets the fallback namespaces. They will be used if the mapping format itself doesn't provide namespaces with names (e.g. Enigma mappings).

      The default fallback namespaces are intermediary as the source namespace and named as the target namespace as in Yarn.

      Parameters:
      sourceNamespace - the fallback source namespace
      targetNamespace - the fallback target namespace
      Returns:
      this builder
    • enigmaMappings

      FileMappingsSpecBuilder enigmaMappings()
      Marks that the file contains Enigma mappings. Because they are stored in a directory, the format cannot be auto-detected.
      Returns:
      this builder
    • containsAnnotations

      FileMappingsSpecBuilder containsAnnotations()
      Marks that the zip file contains annotation data.
      Returns:
      this builder
    • containsUnpick

      FileMappingsSpecBuilder containsUnpick()
      Marks that the zip file contains unpick data.
      Returns:
      this builder
    • mergeNamespace

      FileMappingsSpecBuilder mergeNamespace(MappingsNamespace namespace)
      Sets the merge namespace of this mappings spec.

      The merge namespace is the namespace that is used to match up this layer's names to the rest of the mappings. For example, Yarn mappings should be merged through the intermediary names.

      The default merge namespace is MappingsNamespace.INTERMEDIARY.

      Parameters:
      namespace - the new merge namespace
      Returns:
      this builder
    • mergeNamespace

      FileMappingsSpecBuilder mergeNamespace(String namespace)
      Sets the merge namespace of this mappings spec.

      The merge namespace is the namespace that is used to match up this layer's names to the rest of the mappings. For example, Yarn mappings should be merged through the intermediary names.

      The default merge namespace is intermediary.

      Parameters:
      namespace - the new merge namespace
      Returns:
      this builder