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, throughDataPackRegistries
'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 theMinecraftForge.EVENT_BUS
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AddReloadListenerEvent.WrappedStateAwareListener
-
Field Summary
Fields Modifier and Type Field Description private DataPackRegistries
dataPackRegistries
private java.util.List<IFutureReloadListener>
listeners
-
Constructor Summary
Constructors Constructor Description AddReloadListenerEvent(DataPackRegistries dataPackRegistries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(IFutureReloadListener listener)
DataPackRegistries
getDataPackRegistries()
java.util.List<IFutureReloadListener>
getListeners()
-
-
-
Field Detail
-
listeners
private final java.util.List<IFutureReloadListener> listeners
-
dataPackRegistries
private final DataPackRegistries dataPackRegistries
-
-
Constructor Detail
-
AddReloadListenerEvent
public AddReloadListenerEvent(DataPackRegistries dataPackRegistries)
-
-
Method Detail
-
addListener
public void addListener(IFutureReloadListener listener)
- Parameters:
listener
- the listener to add to the ResourceManager on reload
-
getListeners
public java.util.List<IFutureReloadListener> getListeners()
-
getDataPackRegistries
public DataPackRegistries getDataPackRegistries()
-
-