Package net.minecraft.util.text
Class Style.Serializer
java.lang.Object
net.minecraft.util.text.Style.Serializer
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<Style>
,com.google.gson.JsonSerializer<Style>
- Enclosing class:
- Style
-
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_) private static ClickEvent
getClickEvent
(com.google.gson.JsonObject p_240735_0_) private static ResourceLocation
getFont
(com.google.gson.JsonObject p_240732_0_) private static HoverEvent
getHoverEvent
(com.google.gson.JsonObject p_240734_0_) private static String
getInsertion
(com.google.gson.JsonObject p_240736_0_) private static Boolean
getOptionalFlag
(com.google.gson.JsonObject p_240733_0_, String p_240733_1_) private static Color
getTextColor
(com.google.gson.JsonObject p_240737_0_) com.google.gson.JsonElement
serialize
(Style p_serialize_1_, Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_)
-
Constructor Details
-
Serializer
public Serializer()
-
-
Method Details
-
deserialize
@Nullable public Style 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<Style>
- Throws:
com.google.gson.JsonParseException
-
getFont
-
getHoverEvent
-
getClickEvent
-
getInsertion
-
getTextColor
-
getOptionalFlag
-
serialize
@Nullable public com.google.gson.JsonElement serialize(Style p_serialize_1_, Type p_serialize_2_, com.google.gson.JsonSerializationContext p_serialize_3_) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<Style>
-