Contents
Class HytaleWorldGenProvider.WorldGenBuilderCodec
java.lang.Object
com.hypixel.hytale.codec.builder.BuilderCodec<HytaleWorldGenProvider>
com.hypixel.hytale.server.worldgen.HytaleWorldGenProvider.WorldGenBuilderCodec
- All Implemented Interfaces:
Codec<HytaleWorldGenProvider>, DirectDecodeCodec<HytaleWorldGenProvider>, InheritCodec<HytaleWorldGenProvider>, RawJsonCodec<HytaleWorldGenProvider>, RawJsonInheritCodec<HytaleWorldGenProvider>, SchemaConvertable<HytaleWorldGenProvider>, ValidatableCodec<HytaleWorldGenProvider>
- Enclosing class:
HytaleWorldGenProvider
public static class HytaleWorldGenProvider.WorldGenBuilderCodec
extends BuilderCodec<HytaleWorldGenProvider>
Overrides the BuilderCodec to provide a different DefaultValue than is used for deserialization.
This allows new instances of the HytaleWorldGenProvider to be configured with the latest version
for the world generator type, whereas deserialized instances will retain the 'min' version if the
deserialization data is missing an explicit version field.
In other words: New worlds are created with the latest world-gen asset version. Existing worlds
stay at the version they were originally created with.
-
Nested Class Summary
Nested classes/interfaces inherited from class BuilderCodec
BuilderCodec.Builder<T>, BuilderCodec.BuilderBase<T,S> -
Field Summary
Fields inherited from class BuilderCodec
EMPTY_ARRAY, INITIAL_VERSION, UNSET_MAX_VERSION, UNSET_VERSIONFields inherited from interface Codec
BASE64_PATTERN, BOOLEAN, BSON_DOCUMENT, BYTE, BYTE_ARRAY, DOUBLE, DOUBLE_ARRAY, DURATION, DURATION_SECONDS, FLOAT, FLOAT_ARRAY, INSTANT, INT_ARRAY, INTEGER, LOG_LEVEL, LONG, LONG_ARRAY, NULLABLE_BOOLEAN, PATH, SHORT, STRING, STRING_ARRAY, UUID_BINARY, UUID_STRING -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultValue(ExtraInfo extraInfo) voidsetVersions(Map<String, Semver> versions) Methods inherited from class BuilderCodec
abstractBuilder, abstractBuilder, afterDecode, afterDecodeAndValidate, builder, builder, decode, decode, decodeAndInherit, decodeAndInherit, decodeAndInheritJson, decodeAndInheritJson, decodeAndInheritJson0, decodeJson, decodeJson, encode, getAfterDecode, getCodecVersion, getDefaultValue, getDocumentation, getEntries, getInnerClass, getParent, getSupplier, inherit, toSchema, toSchema, toString, validate, validateDefaultsMethods inherited from interface RawJsonCodec
decodeJson
-
Method Details
-
getDefaultValue
- Overrides:
getDefaultValuein classBuilderCodec<HytaleWorldGenProvider>
-
setVersions
-