Class QuiltDataFixerBuilder

java.lang.Object
com.mojang.datafixers.DataFixerBuilder
org.quiltmc.qsl.frozenblock.misc.datafixerupper.api.QuiltDataFixerBuilder

public class QuiltDataFixerBuilder extends com.mojang.datafixers.DataFixerBuilder
An extended variant of the DataFixerBuilder class, which provides an extra method.

Modified to work on Fabric

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    QuiltDataFixerBuilder(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int dataVersion)
    Creates a new QuiltDataFixerBuilder.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull com.mojang.datafixers.DataFixer
    build(Set<com.mojang.datafixers.DSL.TypeReference> types, @NotNull Supplier<Executor> executorGetter)
    Builds the final DataFixer.
    @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int
    Returns the current data version.

    Methods inherited from class com.mojang.datafixers.DataFixerBuilder

    addFixer, addSchema, addSchema, addSchema, buildOptimized, buildUnoptimized

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • dataVersion

      protected final int dataVersion
  • Constructor Details

    • QuiltDataFixerBuilder

      public QuiltDataFixerBuilder(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int dataVersion)
      Creates a new QuiltDataFixerBuilder.
      Parameters:
      dataVersion - the current data version
  • Method Details

    • getDataVersion

      public @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int getDataVersion()
      Returns the current data version.
      Returns:
      the current data version
    • build

      @Contract("_, _ -> new") @NotNull public @NotNull com.mojang.datafixers.DataFixer build(Set<com.mojang.datafixers.DSL.TypeReference> types, @NotNull @NotNull Supplier<Executor> executorGetter)
      Builds the final DataFixer.

      This will build either an unoptimized fixer or an optimized fixer, depending on the vanilla game's settings.

      Parameters:
      executorGetter - the executor supplier, only invoked if the game is using optimized data fixers
      Returns:
      the newly built data fixer