Class JSONSerializableDataHandler

java.lang.Object
com.hrznstudio.titanium.recipe.serializer.JSONSerializableDataHandler

public class JSONSerializableDataHandler extends Object
  • Constructor Details

    • JSONSerializableDataHandler

      public JSONSerializableDataHandler()
  • Method Details

    • map

      public static <T> void map(Class<T> type, JSONSerializableDataHandler.Writer<T> writer, JSONSerializableDataHandler.Reader<T> reader)
    • acceptField

      public static boolean acceptField(Field f, Class<?> type)
    • read

      public static <T> T read(Class<T> type, com.google.gson.JsonElement element)
    • write

      public static com.google.gson.JsonElement write(Class<?> type, Object value)
    • writeItemStack

      public static com.google.gson.JsonObject writeItemStack(net.minecraft.world.item.ItemStack stack)
    • writeFluidStack

      public static com.google.gson.JsonElement writeFluidStack(net.minecraftforge.fluids.FluidStack fluidStack)
    • readFluidStack

      public static net.minecraftforge.fluids.FluidStack readFluidStack(com.google.gson.JsonElement object)
    • readItemStack

      public static net.minecraft.world.item.ItemStack readItemStack(com.google.gson.JsonObject object)
    • writeRegistryKey

      public static com.google.gson.JsonObject writeRegistryKey(net.minecraft.resources.ResourceKey<?> registryKey)
    • readRegistryKey

      public static net.minecraft.resources.ResourceKey<?> readRegistryKey(com.google.gson.JsonElement object)