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
  • Field Details

  • Constructor Details

  • Method Details

    • addListener

      public void addListener(PreparableReloadListener listener)
      Parameters:
      listener - the listener to add to the ResourceManager on reload
    • getListeners

      public List<PreparableReloadListener> getListeners()
    • getServerResources

      public ReloadableServerResources getServerResources()
      Returns:
      The ReloableServerResources being reloaded.
    • getConditionContext

      public ICondition.IContext 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

      public RegistryAccess 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.