Package net.neoforged.neoforge.event
Class AddServerReloadListenersEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.SortedReloadListenerEvent
net.neoforged.neoforge.event.AddServerReloadListenersEvent
The main ResourceManager is recreated on each reload, just after
ReloadableServerResources's creation.
The event is fired on each reload and lets modders add their own ReloadListeners, for server-side resources.
The event is fired on the NeoForge.EVENT_BUS-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.SortedReloadListenerEvent
SortedReloadListenerEvent.NameLookup -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryAccessprivate final ReloadableServerResources -
Constructor Summary
ConstructorsConstructorDescriptionAddServerReloadListenersEvent(ReloadableServerResources serverResources, RegistryAccess registryAccess) -
Method Summary
Modifier and TypeMethodDescriptionThis context object holds data relevant to the current reload, such as staged tags.Provides access to the loaded registries associated with these server resources.private static ResourceLocationlookupName(PreparableReloadListener listener) Methods inherited from class net.neoforged.neoforge.event.SortedReloadListenerEvent
addDependency, addListener, getGraph, getLastVanillaListener, getNameLookup, getRegistry
-
Field Details
-
serverResources
-
registryAccess
-
-
Constructor Details
-
AddServerReloadListenersEvent
@Internal public AddServerReloadListenersEvent(ReloadableServerResources serverResources, RegistryAccess registryAccess)
-
-
Method Details
-
getServerResources
- Returns:
- The
ReloadableServerResourcesbeing reloaded.
-
getConditionContext
This context object holds data relevant to the current reload, such as staged tags.- Returns:
- The condition context for the currently active reload.
-
getRegistryAccess
Provides access to the loaded registries associated with these server resources. All built-in and dynamic registries are loaded and frozen by this point.- Returns:
- The RegistryAccess context for the currently active reload.
-
lookupName
-