Class FabricRegistryHandler<T>
java.lang.Object
dev.upcraft.sparkweave.fabric.impl.registry.FabricRegistryHandler<T>
- All Implemented Interfaces:
RegistryCreator<T>,RegistryHandler<T>,ViewableRegistryHandler<T>,Consumer<RegistryService>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> FabricRegistryHandler<T> create(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registryKey, String modid) net.minecraft.core.Registry<T> createNewRegistry(boolean sync, @Nullable net.minecraft.resources.ResourceLocation defaultEntry) List<RegistrySupplier<? extends T>> <S extends T>
FabricRegistrySupplier<T, S> <S extends T>
FabricRegistrySupplier<T, S> net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registry()Stream<RegistrySupplier<? extends T>> stream()Map<net.minecraft.resources.ResourceLocation, RegistrySupplier<? extends T>> values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.upcraft.sparkweave.api.registry.RegistryCreator
createNewRegistry, createNewRegistryMethods inherited from interface dev.upcraft.sparkweave.api.registry.RegistryHandler
accept
-
Method Details
-
create
public static <T> FabricRegistryHandler<T> create(net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<T>> registryKey, String modid) -
register
- Specified by:
registerin interfaceRegistryHandler<T>
-
register
public <S extends T> FabricRegistrySupplier<T,S> register(net.minecraft.resources.ResourceKey<T> id, Supplier<S> factory) - Specified by:
registerin interfaceRegistryHandler<T>
-
values
- Specified by:
valuesin interfaceViewableRegistryHandler<T>
-
getEntriesOrdered
- Specified by:
getEntriesOrderedin interfaceViewableRegistryHandler<T>
-
stream
- Specified by:
streamin interfaceViewableRegistryHandler<T>
-
registry
- Specified by:
registryin interfaceViewableRegistryHandler<T>
-
getNamespace
- Specified by:
getNamespacein interfaceViewableRegistryHandler<T>
-
createNewRegistry
public net.minecraft.core.Registry<T> createNewRegistry(boolean sync, @Nullable @Nullable net.minecraft.resources.ResourceLocation defaultEntry) - Specified by:
createNewRegistryin interfaceRegistryCreator<T>- Parameters:
sync- Whether the registry int IDs should be synchronized to each clientdefaultEntry- The default entry for the registry. ifnullthis method will return aMappedRegistry, otherwise aDefaultedRegistry
-