Files
LegacyWeaveLoader/LegacyForge.API/ModAttribute.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

42 lines
1.1 KiB
C#

namespace LegacyForge.API;
/// <summary>
/// Marks a class as a LegacyForge mod and provides metadata.
/// The class must also implement <see cref="IMod"/>.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class ModAttribute : Attribute
{
/// <summary>
/// The unique mod identifier (e.g. "examplemod"). Used as the default namespace
/// for content registered by this mod.
/// </summary>
public string Id { get; }
/// <summary>
/// Human-readable display name.
/// </summary>
public string Name { get; set; } = "";
/// <summary>
/// Semantic version string (e.g. "1.0.0").
/// </summary>
public string Version { get; set; } = "1.0.0";
/// <summary>
/// Mod author(s).
/// </summary>
public string Author { get; set; } = "";
/// <summary>
/// Short description of the mod.
/// </summary>
public string Description { get; set; } = "";
public ModAttribute(string id)
{
ArgumentException.ThrowIfNullOrWhiteSpace(id);
Id = id;
}
}