Class IdentifierGson

java.lang.Object
com.google.gson.TypeAdapter<net.minecraft.util.Identifier>
com.igrium.videolib.util.IdentifierGson

public class IdentifierGson extends com.google.gson.TypeAdapter<net.minecraft.util.Identifier>
A simple Gson type adapter for identifiers. (I don't get why Mojang doesn't have a default one.)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.util.Identifier
    read(com.google.gson.stream.JsonReader reader)
     
    void
    write(com.google.gson.stream.JsonWriter writer, net.minecraft.util.Identifier val)
     

    Methods inherited from class com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    Methods inherited from class java.lang.Object

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

    • IdentifierGson

      public IdentifierGson()
  • Method Details

    • read

      public net.minecraft.util.Identifier read(com.google.gson.stream.JsonReader reader) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<net.minecraft.util.Identifier>
      Throws:
      IOException
    • write

      public void write(com.google.gson.stream.JsonWriter writer, net.minecraft.util.Identifier val) throws IOException
      Specified by:
      write in class com.google.gson.TypeAdapter<net.minecraft.util.Identifier>
      Throws:
      IOException