Package com.minecolonies.core.event
Class DataPackSyncEventHandler.ServerEvents
java.lang.Object
com.minecolonies.core.event.DataPackSyncEventHandler.ServerEvents
- Enclosing class:
- DataPackSyncEventHandler
Events subscribed on both client and server (but mostly for server-side events).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidonDataPackSync(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 voidonServerStarted(@NotNull net.minecraftforge.event.server.ServerStartedEvent event) Fires on a server side only, when the server has started.
-
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
-