Class Codecs
java.lang.Object
fr.robie.machineengine.api.data.Codecs
Codecs for common value types.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StorageCodec<Boolean> static final StorageCodec<byte[]> static final StorageCodec<Double> Decimals, never for amounts (D10); a whole number decodes too.static final StorageCodec<Integer> static final StorageCodec<net.kyori.adventure.key.Key> Keys are stored as theirnamespace:valuestring.static final StorageCodec<Long> static final StorageCodec<String> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NotNull StorageCodec<List<T>> list(@NotNull StorageCodec<T> element) static @NotNull Result<net.kyori.adventure.key.Key>
-
Field Details
-
STRING
-
LONG
-
INT
-
DOUBLE
Decimals, never for amounts (D10); a whole number decodes too. -
BOOL
-
BYTES
-
KEY
Keys are stored as theirnamespace:valuestring.
-
-
Method Details
-
list
@NotNull public static <T> @NotNull StorageCodec<List<T>> list(@NotNull @NotNull StorageCodec<T> element) -
parseKey
-