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 -
Constructor Summary
ConstructorsConstructorDescriptionQuiltDataFixerBuilder(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int dataVersion) Creates a newQuiltDataFixerBuilder. -
Method Summary
Modifier and TypeMethodDescription@NotNull com.mojang.datafixers.DataFixerbuild(Set<com.mojang.datafixers.DSL.TypeReference> types, @NotNull Supplier<Executor> executorGetter) Builds the finalDataFixer.@org.jetbrains.annotations.Range(from=0L, to=2147483647L) intReturns the current data version.Methods inherited from class com.mojang.datafixers.DataFixerBuilder
addFixer, addSchema, addSchema, addSchema, buildOptimized, buildUnoptimized
-
Field Details
-
dataVersion
protected final int dataVersion
-
-
Constructor Details
-
QuiltDataFixerBuilder
public QuiltDataFixerBuilder(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int dataVersion) Creates a newQuiltDataFixerBuilder.- 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 finalDataFixer.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
-