mirror of
https://github.com/Jacobwasbeast/LegacyWeaveLoader.git
synced 2026-05-27 08:04:32 +00:00
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
This commit is contained in:
41
LegacyForge.API/ModAttribute.cs
Normal file
41
LegacyForge.API/ModAttribute.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user