Package net.minecraft.text
Class Style.Serializer
java.lang.Object
net.minecraft.text.Style.Serializer
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<Style>,com.google.gson.JsonSerializer<Style>
- Enclosing class:
Style
public static class Style.Serializer
extends Object
implements com.google.gson.JsonDeserializer<Style>, com.google.gson.JsonSerializer<Style>
A JSON serializer for
Style.- Mappings:
Namespace Name official uh$bintermediary net/minecraft/class_2583$class_2584named net/minecraft/text/Style$Serializer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Styledeserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext) private static @Nullable ClickEventgetClickEvent(com.google.gson.JsonObject root) private static @Nullable IdentifiergetFont(com.google.gson.JsonObject root) private static @Nullable HoverEventgetHoverEvent(com.google.gson.JsonObject root) private static @Nullable TextColorparseColor(com.google.gson.JsonObject root) private static @Nullable StringparseInsertion(com.google.gson.JsonObject root) private static @Nullable BooleanparseNullableBoolean(com.google.gson.JsonObject root, String key) @Nullable com.google.gson.JsonElementserialize(Style style, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)
-
Constructor Details
-
Serializer
public Serializer()
-
-
Method Details
-
deserialize
@Nullable public @Nullable Style deserialize(com.google.gson.JsonElement jsonElement, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext) throws com.google.gson.JsonParseException - Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<Style>- Throws:
com.google.gson.JsonParseException- Mappings:
Namespace Name Mixin selector official aLuh$b;a(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Luh;intermediary method_10991Lnet/minecraft/class_2583$class_2584;method_10991(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Lnet/minecraft/class_2583;named deserializeLnet/minecraft/text/Style$Serializer;deserialize(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Lnet/minecraft/text/Style;
-
getFont
- Mappings:
Namespace Name Mixin selector official aLuh$b;a(Lcom/google/gson/JsonObject;)Laew;intermediary method_27710Lnet/minecraft/class_2583$class_2584;method_27710(Lcom/google/gson/JsonObject;)Lnet/minecraft/class_2960;named getFontLnet/minecraft/text/Style$Serializer;getFont(Lcom/google/gson/JsonObject;)Lnet/minecraft/util/Identifier;
-
getHoverEvent
- Mappings:
Namespace Name Mixin selector official bLuh$b;b(Lcom/google/gson/JsonObject;)Ltq;intermediary method_27712Lnet/minecraft/class_2583$class_2584;method_27712(Lcom/google/gson/JsonObject;)Lnet/minecraft/class_2568;named getHoverEventLnet/minecraft/text/Style$Serializer;getHoverEvent(Lcom/google/gson/JsonObject;)Lnet/minecraft/text/HoverEvent;
-
getClickEvent
- Mappings:
Namespace Name Mixin selector official cLuh$b;c(Lcom/google/gson/JsonObject;)Ltj;intermediary method_27713Lnet/minecraft/class_2583$class_2584;method_27713(Lcom/google/gson/JsonObject;)Lnet/minecraft/class_2558;named getClickEventLnet/minecraft/text/Style$Serializer;getClickEvent(Lcom/google/gson/JsonObject;)Lnet/minecraft/text/ClickEvent;
-
parseInsertion
- Mappings:
Namespace Name Mixin selector official dLuh$b;d(Lcom/google/gson/JsonObject;)Ljava/lang/String;intermediary method_27714Lnet/minecraft/class_2583$class_2584;method_27714(Lcom/google/gson/JsonObject;)Ljava/lang/String;named parseInsertionLnet/minecraft/text/Style$Serializer;parseInsertion(Lcom/google/gson/JsonObject;)Ljava/lang/String;
-
parseColor
- Mappings:
Namespace Name Mixin selector official eLuh$b;e(Lcom/google/gson/JsonObject;)Luj;intermediary method_27715Lnet/minecraft/class_2583$class_2584;method_27715(Lcom/google/gson/JsonObject;)Lnet/minecraft/class_5251;named parseColorLnet/minecraft/text/Style$Serializer;parseColor(Lcom/google/gson/JsonObject;)Lnet/minecraft/text/TextColor;
-
parseNullableBoolean
@Nullable private static @Nullable Boolean parseNullableBoolean(com.google.gson.JsonObject root, String key) - Mappings:
Namespace Name Mixin selector official aLuh$b;a(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/Boolean;intermediary method_27711Lnet/minecraft/class_2583$class_2584;method_27711(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/Boolean;named parseNullableBooleanLnet/minecraft/text/Style$Serializer;parseNullableBoolean(Lcom/google/gson/JsonObject;Ljava/lang/String;)Ljava/lang/Boolean;
-
serialize
@Nullable public @Nullable com.google.gson.JsonElement serialize(Style style, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext) - Specified by:
serializein interfacecom.google.gson.JsonSerializer<Style>- Mappings:
Namespace Name Mixin selector official aLuh$b;a(Luh;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;intermediary method_10990Lnet/minecraft/class_2583$class_2584;method_10990(Lnet/minecraft/class_2583;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;named serializeLnet/minecraft/text/Style$Serializer;serialize(Lnet/minecraft/text/Style;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;
-