Package software.bluelib.event
Class ReloadEventHandler
java.lang.Object
software.bluelib.event.ReloadEventHandler
- Direct Known Subclasses:
ReloadHandler
A
class responsible for handling events related to reloading entity variants.
This class provides functionality to register entity variants from specified locations when the server starts.
Key Features:
registerEntityVariants(String, MinecraftServer, String, String)- Registers entity variants from specified locations.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidregisterEntityVariants(String pFolderPath, net.minecraft.server.MinecraftServer pServer, String pModID, String pEntityName) Aprotected static voidthat registers entity variants from specified locations.
-
Constructor Details
-
ReloadEventHandler
public ReloadEventHandler()
-
-
Method Details
-
registerEntityVariants
protected static void registerEntityVariants(String pFolderPath, net.minecraft.server.MinecraftServer pServer, String pModID, String pEntityName) Aprotected static voidthat registers entity variants from specified locations.This method attempts to load variants from both mod and datapack locations. It logs status information and handles exceptions that occur during the loading process.
- Parameters:
pFolderPath-String- The folder path location within the mod or datapack where variants are stored.pServer-MinecraftServer- The server instance of the current world.pModID-String- The mod ID used to locate the entity variant resources. (Use your Mod's ID)pEntityName-String- The entity name to load.- Throws:
com.google.gson.JsonParseException- if there is an error parsing the JSON files.RuntimeException- if an unexpected error occurs during the registration process.- Since:
- 1.0.0
- See Also:
-