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 Object
implements com.google.gson.JsonDeserializer<IFormattableTextComponent>, com.google.gson.JsonSerializer<ITextComponent>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.google.gson.JsonElement p_deserialize_1_, Type p_deserialize_2_, com.google.gson.JsonDeserializationContext p_deserialize_3_) static IFormattableTextComponent
fromJson
(com.google.gson.JsonElement p_240641_0_) static IFormattableTextComponent
fromJson
(com.mojang.brigadier.StringReader p_240642_0_) static IFormattableTextComponent
static IFormattableTextComponent
fromJsonLenient
(String p_240644_0_) private static int
getPos
(com.google.gson.stream.JsonReader p_197673_0_) com.google.gson.JsonElement
serialize
(ITextComponent p_serialize_1_, Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_) private void
serializeStyle
(Style p_150695_1_, com.google.gson.JsonObject p_150695_2_, com.google.gson.JsonSerializationContext p_150695_3_) static String
toJson
(ITextComponent p_150696_0_) static com.google.gson.JsonElement
toJsonTree
(ITextComponent p_200528_0_)
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON -
JSON_READER_POS
-
JSON_READER_LINESTART
-
-
Constructor Details
-
Serializer
public Serializer()
-
-
Method Details
-
deserialize
public IFormattableTextComponent deserialize(com.google.gson.JsonElement p_deserialize_1_, Type p_deserialize_2_, com.google.gson.JsonDeserializationContext p_deserialize_3_) throws com.google.gson.JsonParseException - Specified by:
deserialize
in 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_, Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<ITextComponent>
-
toJson
-
toJsonTree
-
fromJson
-
fromJson
-
fromJsonLenient
-
fromJson
-
getPos
private static int getPos(com.google.gson.stream.JsonReader p_197673_0_)
-