Class OrbisDataFixes

java.lang.Object
org.empirewar.orbis.datafixer.OrbisDataFixes

public final class OrbisDataFixes extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.gson.JsonElement
    fix(com.mojang.datafixers.DSL.TypeReference typeReference, @NonNull com.google.gson.JsonObject object)
     
    static int
    getFixerVersion(@NonNull com.google.gson.JsonElement element)
    Gets the current fixer version of an element.
    static @Nullable com.google.gson.JsonElement
    updateFixerVersion(@Nullable com.google.gson.JsonElement element)
    Updates the fixer version of an element.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)