2020-06-07 17:57:17 -04:00
|
|
|
CLASS net/minecraft/class_5330 net/minecraft/util/JsonSerializing
|
2021-07-19 07:57:43 -04:00
|
|
|
METHOD method_29306 createSerializerBuilder (Lnet/minecraft/class_2378;Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;)Lnet/minecraft/class_5330$class_5331;
|
2020-06-07 17:57:17 -04:00
|
|
|
ARG 0 registry
|
|
|
|
ARG 1 rootFieldName
|
|
|
|
ARG 2 idFieldName
|
2021-07-19 07:57:43 -04:00
|
|
|
ARG 3 typeGetter
|
|
|
|
CLASS class_5331 SerializerBuilder
|
|
|
|
COMMENT A builder for serializing types to JSON that can either obtain a type from
|
2020-06-07 17:57:17 -04:00
|
|
|
COMMENT a registry to handle JSON conversion or handle with a custom logic bound
|
|
|
|
COMMENT to a type.
|
|
|
|
COMMENT
|
2021-07-19 07:57:43 -04:00
|
|
|
COMMENT <p>When the root element read is an object, the built serializer obtains the type
|
2020-06-07 17:57:17 -04:00
|
|
|
COMMENT from registry to handle reading; otherwise, it falls back to custom
|
2021-04-11 08:08:07 -04:00
|
|
|
COMMENT logic.
|
2020-06-07 17:57:17 -04:00
|
|
|
FIELD field_25192 registry Lnet/minecraft/class_2378;
|
|
|
|
FIELD field_25193 rootFieldName Ljava/lang/String;
|
|
|
|
FIELD field_25194 idFieldName Ljava/lang/String;
|
2021-07-19 07:57:43 -04:00
|
|
|
FIELD field_25195 typeGetter Ljava/util/function/Function;
|
|
|
|
FIELD field_25196 elementSerializer Lcom/mojang/datafixers/util/Pair;
|
|
|
|
FIELD field_28444 defaultType Lnet/minecraft/class_5336;
|
2021-05-18 11:38:15 -04:00
|
|
|
METHOD <init> (Lnet/minecraft/class_2378;Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;)V
|
|
|
|
ARG 1 registry
|
|
|
|
ARG 2 rootFieldName
|
|
|
|
ARG 3 idFieldName
|
|
|
|
ARG 4 typeIdentification
|
2021-07-19 07:57:43 -04:00
|
|
|
METHOD method_29307 build ()Ljava/lang/Object;
|
|
|
|
METHOD method_32385 elementSerializer (Lnet/minecraft/class_5336;Lnet/minecraft/class_5330$class_5332;)Lnet/minecraft/class_5330$class_5331;
|
|
|
|
COMMENT Sets the element serializer and its target type. It can serialize and
|
|
|
|
COMMENT deserialize instances of one type to non-{@link com.google.gson.JsonObject}
|
|
|
|
COMMENT elements.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @apiNote There can only be one element serializer for this builder and
|
|
|
|
COMMENT the built serializer. Calling this method replaces any previous serializer.
|
|
|
|
ARG 1 type
|
|
|
|
COMMENT the target type of the element serializer
|
|
|
|
ARG 2 serializer
|
|
|
|
COMMENT the element serializer
|
|
|
|
METHOD method_33409 defaultType (Lnet/minecraft/class_5336;)Lnet/minecraft/class_5330$class_5331;
|
|
|
|
COMMENT Sets the default type that is used when there's no ID field.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @return this instance
|
|
|
|
ARG 1 defaultType
|
|
|
|
COMMENT the default type
|
|
|
|
CLASS class_5332 ElementSerializer
|
2020-06-07 17:57:17 -04:00
|
|
|
METHOD method_29308 fromJson (Lcom/google/gson/JsonElement;Lcom/google/gson/JsonDeserializationContext;)Ljava/lang/Object;
|
|
|
|
ARG 1 json
|
|
|
|
ARG 2 context
|
|
|
|
METHOD method_29309 toJson (Ljava/lang/Object;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;
|
|
|
|
ARG 1 object
|
|
|
|
ARG 2 context
|
|
|
|
CLASS class_5333 GsonSerializer
|
|
|
|
FIELD field_25197 registry Lnet/minecraft/class_2378;
|
|
|
|
FIELD field_25198 rootFieldName Ljava/lang/String;
|
|
|
|
FIELD field_25199 idFieldName Ljava/lang/String;
|
2021-07-19 07:57:43 -04:00
|
|
|
FIELD field_25200 typeGetter Ljava/util/function/Function;
|
2020-06-07 17:57:17 -04:00
|
|
|
FIELD field_25201 elementSerializer Lcom/mojang/datafixers/util/Pair;
|
2021-07-19 07:57:43 -04:00
|
|
|
FIELD field_28445 defaultType Lnet/minecraft/class_5336;
|
2021-06-04 08:02:31 -04:00
|
|
|
METHOD <init> (Lnet/minecraft/class_2378;Ljava/lang/String;Ljava/lang/String;Ljava/util/function/Function;Lnet/minecraft/class_5336;Lcom/mojang/datafixers/util/Pair;)V
|
|
|
|
ARG 1 registry
|
|
|
|
ARG 2 rootFieldName
|
|
|
|
ARG 3 idFieldName
|
2021-07-19 07:57:43 -04:00
|
|
|
ARG 4 typeGetter
|
|
|
|
ARG 5 defaultType
|
2021-06-04 08:02:31 -04:00
|
|
|
ARG 6 elementSerializer
|
2021-05-07 23:39:34 -04:00
|
|
|
METHOD deserialize (Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Ljava/lang/Object;
|
|
|
|
ARG 1 json
|
|
|
|
ARG 2 type
|
|
|
|
ARG 3 context
|
|
|
|
METHOD serialize (Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement;
|
|
|
|
ARG 1 object
|
|
|
|
ARG 2 type
|
|
|
|
ARG 3 context
|