Files
LegacyWeaveLoader/LegacyForge.API/IMod.cs
Jacobwasbeast de22a24100 Initial commit: LegacyForge mod loader for Minecraft Legacy Edition
SKSE-style external mod loader with zero game source modifications.
- LegacyForge.Launcher: C# console app that injects runtime DLL into game process
- LegacyForgeRuntime: C++ DLL with PDB symbol resolution, MinHook function hooking, and .NET CoreCLR hosting
- LegacyForge.Core: C# mod discovery and lifecycle management
- LegacyForge.API: Fabric-style mod API with namespaced string IDs, fluent property builders, and event system
- ExampleMod: Sample mod demonstrating block/item registration
2026-03-06 15:11:53 -06:00

40 lines
1.2 KiB
C#

namespace LegacyForge.API;
/// <summary>
/// The main interface all LegacyForge mods must implement.
/// Default interface methods allow mods to only override what they need.
/// </summary>
public interface IMod
{
/// <summary>
/// Called before vanilla registries are populated.
/// Use for very early setup that must happen before any game content loads.
/// </summary>
void OnPreInit() { }
/// <summary>
/// Called after vanilla registries are populated.
/// This is the main initialization point -- register your blocks, items,
/// entities, recipes, and event handlers here.
/// </summary>
void OnInitialize();
/// <summary>
/// Called after the game client has finished its own initialization.
/// Use for client-side setup like custom renderers or UI.
/// </summary>
void OnPostInitialize() { }
/// <summary>
/// Called once per game tick (20 times per second).
/// Use for ongoing mod logic.
/// </summary>
void OnTick() { }
/// <summary>
/// Called when the game is shutting down.
/// Use for cleanup and saving mod state.
/// </summary>
void OnShutdown() { }
}