mirror of
https://github.com/Jacobwasbeast/LegacyWeaveLoader.git
synced 2026-06-07 21:43:09 +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:
58
LegacyForge.API/Block/BlockProperties.cs
Normal file
58
LegacyForge.API/Block/BlockProperties.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
namespace LegacyForge.API.Block;
|
||||
|
||||
public enum MaterialType
|
||||
{
|
||||
Air = 0,
|
||||
Stone = 1,
|
||||
Wood = 2,
|
||||
Cloth = 3,
|
||||
Plant = 4,
|
||||
Dirt = 5,
|
||||
Sand = 6,
|
||||
Glass = 7,
|
||||
Water = 8,
|
||||
Lava = 9,
|
||||
Ice = 10,
|
||||
Metal = 11,
|
||||
Snow = 12,
|
||||
Clay = 13,
|
||||
Explosive = 14,
|
||||
Web = 15
|
||||
}
|
||||
|
||||
public enum SoundType
|
||||
{
|
||||
None = 0,
|
||||
Stone = 1,
|
||||
Wood = 2,
|
||||
Gravel = 3,
|
||||
Grass = 4,
|
||||
Metal = 5,
|
||||
Glass = 6,
|
||||
Cloth = 7,
|
||||
Sand = 8,
|
||||
Snow = 9
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fluent builder for defining block properties.
|
||||
/// </summary>
|
||||
public class BlockProperties
|
||||
{
|
||||
internal MaterialType MaterialValue = MaterialType.Stone;
|
||||
internal float HardnessValue = 1.0f;
|
||||
internal float ResistanceValue = 5.0f;
|
||||
internal SoundType SoundValue = SoundType.Stone;
|
||||
internal string IconValue = "stone";
|
||||
internal float LightEmissionValue = 0.0f;
|
||||
internal int LightBlockValue = 255;
|
||||
|
||||
public BlockProperties Material(MaterialType material) { MaterialValue = material; return this; }
|
||||
public BlockProperties Hardness(float hardness) { HardnessValue = hardness; return this; }
|
||||
public BlockProperties Resistance(float resistance) { ResistanceValue = resistance; return this; }
|
||||
public BlockProperties Sound(SoundType sound) { SoundValue = sound; return this; }
|
||||
public BlockProperties Icon(string iconName) { IconValue = iconName; return this; }
|
||||
public BlockProperties LightLevel(float level) { LightEmissionValue = level; return this; }
|
||||
public BlockProperties LightBlocking(int level) { LightBlockValue = level; return this; }
|
||||
public BlockProperties Indestructible() { HardnessValue = -1.0f; ResistanceValue = 6000000f; return this; }
|
||||
}
|
||||
Reference in New Issue
Block a user