mirror of
https://github.com/Jacobwasbeast/LegacyWeaveLoader.git
synced 2026-05-22 05:34:36 +00:00
Mod Atlas (ModAtlas.cpp/h): - Build merged terrain.png and items.png from mod assets (blocks/*.png, items/*.png) - Scan vanilla atlas for empty (fully transparent) cells; place mod textures only there - Install merged atlases over game files before Minecraft::init; restore originals after - Hook loadUVs to create SimpleIcon objects for mod textures - Hook registerIcon to return mod icons when requested by name - FixupModIcons: copy field_0x48 (source-image ptr) from vanilla icons after init Mod Strings (ModStrings.cpp/h): - Store mod display names by description ID - Hook GetString to serve mod names for blocks/items API changes: - BlockProperties/ItemProperties: .Name(displayName), namespaced .Icon() - NativeInterop: displayName params, native_allocate_description_id, native_register_string - Registry.Assets for string registration - Output: mods/LegacyForge.API/, mods/ExampleMod/ (per-mod folders) Mod discovery: - Scan mods/*/ for mod folders; load DLLs from each - LegacyForge.API as mod in mods/LegacyForge.API/ ExampleMod: - Ruby ore block and ruby item with custom textures and names - Assets: blocks/ruby_ore.png, items/ruby.png, lang files - Furnace recipe: ruby_ore -> ruby Runtime: loadUVs, registerIcon, getResourceAsStream, GetString hooks; stb_image for PNG
28 lines
1005 B
XML
28 lines
1005 B
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
<RootNamespace>ExampleMod</RootNamespace>
|
|
<AssemblyName>ExampleMod</AssemblyName>
|
|
<Description>Example mod for LegacyForge demonstrating the mod API</Description>
|
|
<Version>1.0.0</Version>
|
|
<OutputPath>..\build\mods\ExampleMod</OutputPath>
|
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<!-- Private=false: do not copy LegacyForge.API into ExampleMod. API lives in mods/LegacyForge.API/ -->
|
|
<ProjectReference Include="..\LegacyForge.API\LegacyForge.API.csproj">
|
|
<Private>false</Private>
|
|
</ProjectReference>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Content Include="assets\**\*" CopyToOutputDirectory="PreserveNewest" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|