Class SevenElementsRegistryLoader
java.lang.Object
io.github.xrickastley.sevenelements.registry.dynamic.SevenElementsRegistryLoader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA dynamic registry entry.static classVariant of Entry that creates a "builder" object, then passes an Identifier to create the target object. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final List<SevenElementsRegistryLoader.Entry<?,?>> private static final com.google.common.collect.Multimap<RegistryKey<?>,Identifier> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidadd(SevenElementsRegistryLoader.Entry<?, ?> entry) (package private) static voidaddUnmodifiableEntries(RegistryKey<? extends Registry<?>> key, List<Identifier> ids) (package private) static voidaddUnmodifiableEntries(RegistryKey<? extends Registry<?>> key, Identifier... ids) private static <T,C> @Nullable SevenElementsRegistryLoader.Entry<T, C> getDynamicRegistry(Registry<T> registry) private static <T,C> @Nullable SevenElementsRegistryLoader.Entry<T, C> getDynamicRegistry(RegistryKey<? extends Registry<T>> registryKey) static booleanisDynamicRegistry(Registry<?> registry) static booleanisDynamicRegistry(RegistryKey<? extends Registry<?>> registryKey) static <E> voidload(RegistryOps.RegistryInfoGetter registryInfoGetter, ResourceManager resourceManager, RegistryKey<? extends Registry<E>> registryRef, MutableRegistry<E> newRegistry, com.mojang.serialization.Decoder<E> decoder, Map<RegistryKey<?>, Exception> exceptions) static <E> voidparseAndAdd(MutableRegistry<E> registry, SevenElementsRegistryLoader.Entry<E, ?> entry, RegistryOps<com.google.gson.JsonElement> ops, RegistryKey<E> key, Identifier identifier, Resource resource)
-
Field Details
-
DYNAMIC_REGISTRIES
-
UNMODIFIABLE_ENTRIES
private static final com.google.common.collect.Multimap<RegistryKey<?>,Identifier> UNMODIFIABLE_ENTRIES
-
-
Constructor Details
-
SevenElementsRegistryLoader
public SevenElementsRegistryLoader()
-
-
Method Details
-
add
-
addUnmodifiableEntries
-
addUnmodifiableEntries
-
load
public static <E> void load(RegistryOps.RegistryInfoGetter registryInfoGetter, ResourceManager resourceManager, RegistryKey<? extends Registry<E>> registryRef, MutableRegistry<E> newRegistry, com.mojang.serialization.Decoder<E> decoder, Map<RegistryKey<?>, Exception> exceptions) -
parseAndAdd
public static <E> void parseAndAdd(MutableRegistry<E> registry, SevenElementsRegistryLoader.Entry<E, ?> entry, RegistryOps<com.google.gson.JsonElement> ops, RegistryKey<E> key, Identifier identifier, Resource resource) throws IOException- Throws:
IOException
-
isDynamicRegistry
-
isDynamicRegistry
-
getDynamicRegistry
@Nullable private static <T,C> @Nullable SevenElementsRegistryLoader.Entry<T,C> getDynamicRegistry(Registry<T> registry) -
getDynamicRegistry
@Nullable private static <T,C> @Nullable SevenElementsRegistryLoader.Entry<T,C> getDynamicRegistry(RegistryKey<? extends Registry<T>> registryKey)
-