Package net.minecraftforge.event
Class AddReloadListenerEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.AddReloadListenerEvent
public class AddReloadListenerEvent
extends net.minecraftforge.eventbus.api.Event
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 MinecraftForge.EVENT_BUS
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<PreparableReloadListener>
private final ReloadableServerResources
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(PreparableReloadListener listener) This context object holds data relevant to the current reload, such as staged tags.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
listeners
-
serverResources
-
-
Constructor Details
-
AddReloadListenerEvent
-
-
Method Details
-
addListener
- Parameters:
listener
- the listener to add to the ResourceManager on reload
-
getListeners
-
getServerResources
- Returns:
- The ReloableServerResources being 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.
-