Package org.empirewar.orbis.datafixer
Class OrbisDataFixes
java.lang.Object
org.empirewar.orbis.datafixer.OrbisDataFixes
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonElementfix(com.mojang.datafixers.DSL.TypeReference typeReference, @NonNull com.google.gson.JsonObject object) static intgetFixerVersion(@NonNull com.google.gson.JsonElement element) Gets the current fixer version of an element.static @Nullable com.google.gson.JsonElementupdateFixerVersion(@Nullable com.google.gson.JsonElement element) Updates the fixer version of an element.
-
Method Details
-
updateFixerVersion
public static @Nullable com.google.gson.JsonElement updateFixerVersion(@Nullable com.google.gson.JsonElement element) Updates the fixer version of an element.- Parameters:
element- the element to set the version on- Returns:
- the modified element
-
getFixerVersion
public static int getFixerVersion(@NonNull com.google.gson.JsonElement element) Gets the current fixer version of an element.- Parameters:
element- the element to get the version from- Returns:
- the version of the element, or the lowest version (1) if it is not set
-
fix
public static com.google.gson.JsonElement fix(com.mojang.datafixers.DSL.TypeReference typeReference, @NonNull com.google.gson.JsonObject object)
-