Class DataPackSyncEventHandler.ServerEvents

java.lang.Object
com.minecolonies.core.event.DataPackSyncEventHandler.ServerEvents
Enclosing class:
DataPackSyncEventHandler

public static class DataPackSyncEventHandler.ServerEvents extends Object
Events subscribed on both client and server (but mostly for server-side events).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    onDataPackSync(net.minecraftforge.event.OnDatapackSyncEvent event)
    This event fires on server-side both at initial world load and whenever a new player joins the server (with getPlayer() != null), and also on datapack reload (with null).
    static void
    onServerStarted(@NotNull net.minecraftforge.event.server.ServerStartedEvent event)
    Fires on a server side only, when the server has started.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServerEvents

      public ServerEvents()
  • Method Details

    • onDataPackSync

      public static void onDataPackSync(net.minecraftforge.event.OnDatapackSyncEvent event)
      This event fires on server-side both at initial world load and whenever a new player joins the server (with getPlayer() != null), and also on datapack reload (with null). Note that at this point the client has not yet received the recipes/tags.
      Parameters:
      event - OnDatapackSyncEvent
    • onServerStarted

      public static void onServerStarted(@NotNull @NotNull net.minecraftforge.event.server.ServerStartedEvent event)
      Fires on a server side only, when the server has started. This event is the first reliable point for server-only parsing of available smelting recipes, which are required for FurnaceRecipes and CompatibilityManager.discoverOres and .discoverFood.
      Parameters:
      event - ServerStartedEvent