Package net.minecraftforge.registries
Class RegistryManager
java.lang.Object
net.minecraftforge.registries.RegistryManager
-
Field Summary
Modifier and TypeFieldDescriptionstatic final RegistryManager
static final RegistryManager
private Map<ResourceLocation,
ResourceLocation> private static final org.apache.logging.log4j.Logger
private final String
private Set<ResourceLocation>
(package private) com.google.common.collect.BiMap<ResourceLocation,
ForgeRegistry<? extends IForgeRegistryEntry<?>>> private com.google.common.collect.BiMap<Class<? extends IForgeRegistryEntry<?>>,
ResourceLocation> private Set<ResourceLocation>
static final RegistryManager
private static Set<ResourceLocation>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addLegacyName
(ResourceLocation legacyName, ResourceLocation name) void
clean()
(package private) <V extends IForgeRegistryEntry<V>>
ForgeRegistry<V>createRegistry
(ResourceLocation name, RegistryBuilder<V> builder) private void
findSuperTypes
(Class<?> type, Set<Class<?>> types) static List<org.apache.commons.lang3.tuple.Pair<String,
HandshakeMessages.S2CRegistry>> generateRegistryPackets
(boolean isLocal) getName()
<V extends IForgeRegistryEntry<V>>
ResourceLocationgetName
(IForgeRegistry<V> reg) <V extends IForgeRegistryEntry<V>>
IForgeRegistry<V>getRegistry
(Class<? super V> cls) Deprecated, for removal: This API element is subject to removal in a future version.The uniqueness of registry super types will not be guaranteed starting in 1.19.<V extends IForgeRegistryEntry<V>>
ForgeRegistry<V>getRegistry
(ResourceKey<? extends Registry<V>> key) <V extends IForgeRegistryEntry<V>>
ForgeRegistry<V><V extends IForgeRegistryEntry<V>>
ForgeRegistry<V>getRegistry
(ResourceLocation key, RegistryManager other) static List<ResourceLocation>
<V extends IForgeRegistryEntry<V>>
Class<V>static Set<ResourceLocation>
private static <V extends IForgeRegistryEntry<V>>
voidinjectForgeRegistry
(ForgeRegistry<V> forgeReg, Registry<? extends Registry<?>> rootRegistry) (package private) boolean
static CompletableFuture<List<Throwable>>
postNewRegistryEvent
(Executor executor, IModStateTransition.EventGenerator<? extends NewRegistryEvent> eventGenerator) static CompletableFuture<List<Throwable>>
preNewRegistryEvent
(Executor executor, IModStateTransition.EventGenerator<? extends NewRegistryEvent> eventGenerator) (package private) static <V extends IForgeRegistryEntry<V>>
voidregisterToBuiltinRegistry
(ForgeRegistry<V> forgeReg) (package private) static <V extends IForgeRegistryEntry<V>>
voidregisterToRootRegistry
(ForgeRegistry<V> forgeReg) takeSnapshot
(boolean savingToDisc) <V extends IForgeRegistryEntry<V>>
ResourceLocationupdateLegacyName
(ResourceLocation legacyName)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
ACTIVE
-
VANILLA
-
FROZEN
-
vanillaRegistryKeys
-
registries
com.google.common.collect.BiMap<ResourceLocation,ForgeRegistry<? extends IForgeRegistryEntry<?>>> registries -
superTypes
private com.google.common.collect.BiMap<Class<? extends IForgeRegistryEntry<?>>,ResourceLocation> superTypes -
persisted
-
synced
-
legacyNames
-
name
-
-
Constructor Details
-
RegistryManager
RegistryManager() -
RegistryManager
-
-
Method Details
-
getName
-
isStaging
boolean isStaging() -
getSuperType
-
getRegistry
-
getRegistry
public <V extends IForgeRegistryEntry<V>> ForgeRegistry<V> getRegistry(ResourceKey<? extends Registry<V>> key) -
getRegistry
@Deprecated(forRemoval=true, since="1.18.2") public <V extends IForgeRegistryEntry<V>> IForgeRegistry<V> getRegistry(Class<? super V> cls) Deprecated, for removal: This API element is subject to removal in a future version.The uniqueness of registry super types will not be guaranteed starting in 1.19. -
getName
-
updateLegacyName
public <V extends IForgeRegistryEntry<V>> ResourceLocation updateLegacyName(ResourceLocation legacyName) -
getRegistry
public <V extends IForgeRegistryEntry<V>> ForgeRegistry<V> getRegistry(ResourceLocation key, RegistryManager other) -
createRegistry
<V extends IForgeRegistryEntry<V>> ForgeRegistry<V> createRegistry(ResourceLocation name, RegistryBuilder<V> builder) -
registerToRootRegistry
-
registerToBuiltinRegistry
-
injectForgeRegistry
private static <V extends IForgeRegistryEntry<V>> void injectForgeRegistry(ForgeRegistry<V> forgeReg, Registry<? extends Registry<?>> rootRegistry) -
newRegistryEventGenerator
-
preNewRegistryEvent
public static CompletableFuture<List<Throwable>> preNewRegistryEvent(Executor executor, IModStateTransition.EventGenerator<? extends NewRegistryEvent> eventGenerator) -
postNewRegistryEvent
public static CompletableFuture<List<Throwable>> postNewRegistryEvent(Executor executor, IModStateTransition.EventGenerator<? extends NewRegistryEvent> eventGenerator) -
addLegacyName
-
findSuperTypes
-
takeSnapshot
-
clean
public void clean() -
generateRegistryPackets
public static List<org.apache.commons.lang3.tuple.Pair<String,HandshakeMessages.S2CRegistry>> generateRegistryPackets(boolean isLocal) -
getRegistryNamesForSyncToClient
-
getVanillaRegistryKeys
-