Class DataFixerTransformation.Builder

java.lang.Object
org.spongepowered.configurate.extra.dfu.v7.DataFixerTransformation.Builder
Enclosing class:
DataFixerTransformation

public static class DataFixerTransformation.Builder extends Object
Since:
4.3.0
  • Constructor Details

  • Method Details

    • dataFixer

      public DataFixerTransformation.Builder dataFixer(com.mojang.datafixers.DataFixer fixer)
      Set the fixer to use to process.
      Parameters:
      fixer - the fixer
      Returns:
      this builder
      Since:
      4.3.0
    • versionKey

      Set the path of the node to query and store the node's schema version at.
      Parameters:
      path - the path
      Returns:
      this builder
      Since:
      4.3.0
    • versionKey

      Set the path of the node to query and store the node's schema version at.
      Parameters:
      path - the path
      Returns:
      this builder
      Since:
      4.3.0
    • targetVersion

      public DataFixerTransformation.Builder targetVersion(int targetVersion)
      Set the desired target version. If none is specified, the newest available version will be determined from the DataFixer.
      Parameters:
      targetVersion - target version
      Returns:
      this builder
      Since:
      4.3.0
    • addType

      public DataFixerTransformation.Builder addType(com.mojang.datafixers.DSL.TypeReference type, Object... path)
      Map values at path to being of type.
      Parameters:
      type - value type reference
      path - target path
      Returns:
      this builder
      Since:
      4.3.0
    • addType

      public DataFixerTransformation.Builder addType(com.mojang.datafixers.DSL.TypeReference type, NodePath path)
      Map values at path to being of type.
      Parameters:
      type - value type reference
      path - target path
      Returns:
      this builder
      Since:
      4.3.0
    • build

      Create a new transformation based on the provided info.
      Returns:
      new transformation
      Since:
      4.3.0