Class SevenElementsRegistryLoader.IdentifiedEntry<T,R>
java.lang.Object
io.github.xrickastley.sevenelements.registry.dynamic.SevenElementsRegistryLoader.Entry<T,R>
io.github.xrickastley.sevenelements.registry.dynamic.SevenElementsRegistryLoader.IdentifiedEntry<T,R>
- Enclosing class:
- SevenElementsRegistryLoader
public static class SevenElementsRegistryLoader.IdentifiedEntry<T,R>
extends SevenElementsRegistryLoader.Entry<T,R>
Variant of Entry that creates a "builder" object, then passes an Identifier to create the
target object.
Here,
Here,
T is the "builder" for the serialized data and T is the result object of the builder.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIdentifiedEntry(Class<T> resultClass, RegistryKey<? extends Registry<T>> registryKey, com.mojang.serialization.Codec<R> resultCodec, BiFunction<R, Identifier, T> resultFn) -
Method Summary
Modifier and TypeMethodDescriptionparse(RegistryOps<com.google.gson.JsonElement> ops, com.google.gson.JsonElement jsonElement, Identifier identifier) parse(RegistryOps<NbtElement> ops, NbtElement nbt, Identifier identifier) Methods inherited from class io.github.xrickastley.sevenelements.registry.dynamic.SevenElementsRegistryLoader.Entry
asRegistryLoaderEntry, getPath, isUnmodifiable, requireUnmodifiableEntries, shouldUseNamespace
-
Field Details
-
resultFn
-
-
Constructor Details
-
IdentifiedEntry
public IdentifiedEntry(Class<T> resultClass, RegistryKey<? extends Registry<T>> registryKey, com.mojang.serialization.Codec<R> resultCodec, BiFunction<R, Identifier, T> resultFn)
-
-
Method Details
-
parse
public Pair<T,com.mojang.serialization.DataResult<R>> parse(RegistryOps<com.google.gson.JsonElement> ops, com.google.gson.JsonElement jsonElement, Identifier identifier) - Overrides:
parsein classSevenElementsRegistryLoader.Entry<T,R>
-
parse
public Pair<T,com.mojang.serialization.DataResult<R>> parse(RegistryOps<NbtElement> ops, NbtElement nbt, Identifier identifier) - Overrides:
parsein classSevenElementsRegistryLoader.Entry<T,R>
-