Package net.minecraft.util.text
Class ITextComponent.Serializer
- java.lang.Object
-
- net.minecraft.util.text.ITextComponent.Serializer
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<IFormattableTextComponent>,com.google.gson.JsonSerializer<ITextComponent>
- Enclosing interface:
- ITextComponent
public static class ITextComponent.Serializer extends java.lang.Object implements com.google.gson.JsonDeserializer<IFormattableTextComponent>, com.google.gson.JsonSerializer<ITextComponent>
-
-
Field Summary
Fields Modifier and Type Field Description private static com.google.gson.GsonGSONprivate static java.lang.reflect.FieldJSON_READER_LINESTARTprivate static java.lang.reflect.FieldJSON_READER_POS
-
Constructor Summary
Constructors Constructor Description Serializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IFormattableTextComponentdeserialize(com.google.gson.JsonElement p_deserialize_1_, java.lang.reflect.Type p_deserialize_2_, com.google.gson.JsonDeserializationContext p_deserialize_3_)static IFormattableTextComponentfromJson(com.google.gson.JsonElement p_240641_0_)static IFormattableTextComponentfromJson(com.mojang.brigadier.StringReader p_240642_0_)static IFormattableTextComponentfromJson(java.lang.String p_240643_0_)static IFormattableTextComponentfromJsonLenient(java.lang.String p_240644_0_)private static intgetPos(com.google.gson.stream.JsonReader p_197673_0_)com.google.gson.JsonElementserialize(ITextComponent p_serialize_1_, java.lang.reflect.Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_)private voidserializeStyle(Style p_150695_1_, com.google.gson.JsonObject p_150695_2_, com.google.gson.JsonSerializationContext p_150695_3_)static java.lang.StringtoJson(ITextComponent p_150696_0_)static com.google.gson.JsonElementtoJsonTree(ITextComponent p_200528_0_)
-
-
-
Method Detail
-
deserialize
public IFormattableTextComponent deserialize(com.google.gson.JsonElement p_deserialize_1_, java.lang.reflect.Type p_deserialize_2_, com.google.gson.JsonDeserializationContext p_deserialize_3_) throws com.google.gson.JsonParseException
- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<IFormattableTextComponent>- Throws:
com.google.gson.JsonParseException
-
serializeStyle
private void serializeStyle(Style p_150695_1_, com.google.gson.JsonObject p_150695_2_, com.google.gson.JsonSerializationContext p_150695_3_)
-
serialize
public com.google.gson.JsonElement serialize(ITextComponent p_serialize_1_, java.lang.reflect.Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_)
- Specified by:
serializein interfacecom.google.gson.JsonSerializer<ITextComponent>
-
toJson
public static java.lang.String toJson(ITextComponent p_150696_0_)
-
toJsonTree
public static com.google.gson.JsonElement toJsonTree(ITextComponent p_200528_0_)
-
fromJson
@Nullable public static IFormattableTextComponent fromJson(java.lang.String p_240643_0_)
-
fromJson
@Nullable public static IFormattableTextComponent fromJson(com.google.gson.JsonElement p_240641_0_)
-
fromJsonLenient
@Nullable public static IFormattableTextComponent fromJsonLenient(java.lang.String p_240644_0_)
-
fromJson
public static IFormattableTextComponent fromJson(com.mojang.brigadier.StringReader p_240642_0_)
-
getPos
private static int getPos(com.google.gson.stream.JsonReader p_197673_0_)
-
-