50 Commits

Author SHA1 Message Date
Jacob
cf49aafc57 Update README with archive notice and project status
Added archive notice and updated project status.
2026-03-17 21:14:05 -05:00
Jacobwasbeast
aa71a81de8 wip(loot): snapshot runtime loot hook refactor and diagnostics 2026-03-13 20:23:01 -05:00
Jacobwasbeast
faada7fbc4 feat(api): expand block/item hooks and debug tools 2026-03-12 20:25:45 -05:00
Jacobwasbeast
24dbf8b96b feat(api): add default minecraft item models 2026-03-12 02:05:29 -05:00
Jacobwasbeast
a7a30ce83f feat(items): item display transforms and custom renderers 2026-03-12 01:51:16 -05:00
Jacobwasbeast
7111d83082 fix(rotation): compute placement data before setTile 2026-03-11 22:39:02 -05:00
Jacobwasbeast
5871a38fab perf(models): skip model hooks for vanilla blocks 2026-03-11 22:04:41 -05:00
Jacobwasbeast
a481822593 fix(world): preserve block data during chunk remap 2026-03-11 21:54:40 -05:00
Jacobwasbeast
d4f7603390 feat(blockstates): rotation profiles and placement tracking 2026-03-11 19:56:21 -05:00
Jacobwasbeast
b47e3d2354 feat(runtime): render block models in inventory 2026-03-11 17:40:40 -05:00
Jacobwasbeast
788b7167a2 feat(models): add block model boxes + picking 2026-03-11 15:12:35 -05:00
Jacobwasbeast
6fabb8fd39 rework(docs): better, more readable docs 2026-03-10 22:37:07 -05:00
Jacobwasbeast
f4ae519d9f feat(launcher): pass through game args v1.0.0-alpha-6 2026-03-10 21:52:21 -05:00
Jacobwasbeast
ce1397b532 fix(runtime): suppress CRT assert dialogs 2026-03-10 21:37:20 -05:00
Jacobwasbeast
4a48472b99 feat(runtime): async metadata + chunk save guard 2026-03-10 21:01:47 -05:00
Jacobwasbeast
86cbf225dc refactor(creative): prepend support and logging 2026-03-10 19:44:17 -05:00
Jacobwasbeast
15c02e14ae refactor(runtime): group symbol resolver 2026-03-10 18:40:35 -05:00
Jacobwasbeast
8da88dcff9 fix(runtime): generate and redirect atlas mipmaps 2026-03-10 18:08:05 -05:00
Jacobwasbeast
be327befa4 feat(modloader): pdb mapping, dynamic invoke, mixins 2026-03-10 17:45:25 -05:00
Jacobwasbeast
70dbff3fac feat(api/runtime): java-style assets and localization sync 2026-03-10 14:36:23 -05:00
Jacobwasbeast
36094e0ea9 fix(runtime): reserve vanilla terrain rows and clamp atlas height v1.0.0-alpha-5 2026-03-10 10:07:14 -05:00
Jacobwasbeast
480abcafd2 fix(runtime): rework atlas merging and texture pack hooks 2026-03-10 04:33:12 -05:00
Jacobwasbeast
9118ce6682 runtime: add launcher-driven extensive symbol scan mode 2026-03-09 21:36:19 -05:00
Jacobwasbeast
3293f1e181 feat(api): add missing block/item placeholder textures
- Add mod_assets for weaveloader.api:missing_block and missing_item
- CopyModAssets target to deploy placeholders to mods/WeaveLoader.API/assets/
- WorldIdRemap: use placeholder icons instead of bedrock/apple
2026-03-09 00:27:28 -05:00
Jacobwasbeast
4027ee4ef2 fix(runtime): fix chunk remap setTile crashes and use missing block fallback
- Clear invalid block IDs before setTile to prevent setTileAndData crashes
- Add CompressedTileStorage::set for direct block write when Tile::tiles[old] is null
- Use missing block placeholder with API-resolved IDs instead of bedrock
- Work around raw_pdb GetRecordAtOffset removal via ForEachSymbol iteration
2026-03-08 23:50:21 -05:00
Jacobwasbeast
887d75eb79 fix(runtime): remap modded block ids using save hooks 2026-03-08 22:35:05 -05:00
Jacobwasbeast
2a959e2e4f fix(runtime): preserve namespace tag for missing item fallback 2026-03-08 21:02:43 -05:00
Jacobwasbeast
656693ad95 fix(runtime): remap modded item ids using namespace tags 2026-03-08 20:53:45 -05:00
Jacobwasbeast
c6aac86e69 feat(modloader): add managed block callbacks and ruby block examples v1.0.0-alpha-4 2026-03-08 18:24:51 -05:00
Jacobwasbeast
d2be935ada feat(pickaxe): implement Hooked_PickaxeItemGetDestroySpeed and Hooked_PickaxeItemCanDestroySpecial
- Add hook implementations for custom pickaxe tier support
- Hooked_PickaxeItemGetDestroySpeed: use CustomPickaxeRegistry destroy speed for configured pickaxes when mining effective blocks
- Hooked_PickaxeItemCanDestroySpecial: use CustomPickaxeRegistry effective blocks and harvest level (obsidian requires level 3)
- Add TryReadItemIdFromPickaxe and TryReadTileId helpers for reading item/tile IDs from native pointers
v1.0.0-alpha-3
2026-03-08 00:16:15 -06:00
Jacobwasbeast
b924105102 fix(runtime): guard animated texture crashes 2026-03-07 21:21:41 -06:00
Jacobwasbeast
ed78317b96 fix(runtime): route dropped item billboard atlas binds v1.0.0-alpha-2 2026-03-07 20:54:17 -06:00
Jacobwasbeast
0b4c87acbc feat(modloader): add item use and summon APIs
Add managed item use hooks, server-authoritative summon support, and side-aware use item context.

Include IdHelper mappings, example ruby wand usage, and related runtime/crash-handler updates.
2026-03-07 19:54:52 -06:00
Jacobwasbeast
eabf8fe858 Implement virtual atlas routing and multi-page mod texture support
- add runtime hooks for texture bind/load and stitched UV sampling

- extend symbol resolution for texture and atlas entry points

- add per-icon atlas page routing and pending-page state

- build mod block/item atlas pages and virtual atlas outputs

- route terrain/item atlas requests through virtual paths for mod icons

- keep creative injection changes and hook plumbing in sync with new routing
v1.0.0-alpha-1
2026-03-07 15:27:19 -06:00
Jacobwasbeast
6464263d12 feat(items): add managed custom item callbacks and native pickaxe support
Introduce a managed custom item API with mine-block callbacks and cancellation semantics, plus native runtime support for registering pickaxe items.

Key changes:

- add WeaveLoader.API Item base/PickaxeItem and dispatcher plumbing

- register managed item instances in ItemRegistry

- add native export for pickaxe registration and wire through GameObjectFactory

- resolve/hook item mineBlock paths (ItemInstance/Item/DiggerItem) and dispatch to managed host

- expose managed OnItemMineBlock entry in WeaveLoader.Core and DotNetHost

- add Ruby Pickaxe example item + placeholder texture

- keep logger usable even before managed handler setup via native fallback
2026-03-07 13:42:46 -06:00
Jacobwasbeast
4119522cde Add runtime furnace recipe registration support 2026-03-07 02:55:24 -06:00
Jacobwasbeast
02118c8055 Fix crash when .NET host fails; add .NET init diagnostics
- Skip UpdateTabPageCounts when no mod items injected (prevents TabSpec
  corruption and crash when .NET fails to load)
- Add assembly/config existence checks with clear error messages
- Log which managed entry point fails to resolve
- Log hostfxr and load_assembly error codes for debugging
2026-03-07 00:48:45 -06:00
Jacobwasbeast
b2664e0f19 Replace file overwrite with CreateFileW hook for mod texture loading
Instead of backing up and overwriting vanilla terrain.png/items.png,
hook CreateFileW to redirect file opens to merged atlases in
mods/ModLoader/generated/. The hook is active only during init and
removed once textures are loaded into GPU memory. Vanilla game files
are never modified.
2026-03-07 00:14:06 -06:00
Jacobwasbeast
455abc155a Rewrite README and CONTRIBUTING with comprehensive documentation 2026-03-06 23:53:05 -06:00
Jacobwasbeast
fa195fdc2e Rebrand LegacyForge to Weave Loader
Rename across entire codebase:
- LegacyForge -> WeaveLoader (identifiers, namespaces, classes, DLLs)
- LegacyForgeRuntime -> WeaveLoaderRuntime (C++ project)
- LegacyForge.API/Core/Launcher -> WeaveLoader.API/Core/Launcher (C# projects)
- [LegacyForge] -> [WeaveLoader] (log prefixes)
- legacyforge -> weaveloader (config files, log files, backup suffixes)
- Display name "Weave Loader" in README, CONTRIBUTING, LICENSE
2026-03-06 23:31:18 -06:00
Jacobwasbeast
f5805fc740 Fix mod item names by injecting strings directly into game's StringTable
CMinecraftApp::GetString is inlined by the MSVC linker at call sites like
Item::getHoverName, so the MinHook-based GetString hook never fires for
item name lookups. The game's StringTable::getString(int) does a simple
vector index lookup, and mod IDs (10000+) are beyond the vector size,
returning empty strings.

Fix: parse the GetString function's x64 machine code before hooking to
locate the RIP-relative reference to app.m_stringTable, then after mods
register their strings, resize m_stringsVec and inject mod strings at the
correct indices. Also adds GetString fallback to CConsoleMinecraftApp
variant and diagnostic logging.
2026-03-06 23:20:31 -06:00
Jacobwasbeast
7a63261088 Update ExampleMod ruby textures 2026-03-06 22:47:24 -06:00
Jacobwasbeast
44fd4416e5 Fix creative inventory: inject mod items before TabSpec page count calculation
- Inject items before Original_CreativeStaticCtor so TabSpec constructors
  include mod items when calculating m_staticItems and m_pages
- Add UpdateTabPageCounts() to recalculate TabSpec page counts after
  staticCtor as safety measure (handles different binary layouts)
- Resolve specs symbol for TabSpec array access
- Add diagnostic logging for ItemInstance vtable, shared_ptr, vector sizes
2026-03-06 22:47:08 -06:00
Jacobwasbeast
2280cb1192 Mod textures, display names, and atlas injection
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
2026-03-06 22:04:15 -06:00
Jacobwasbeast
336e037730 Fix block/item game object creation and texture fallback
- Add GameObjectFactory: create actual Tile/TileItem/Item objects via PDB symbols
- Fix IdRegistry ID ranges: BLOCK_MOD_START=174, ITEM_MOD_START=3000
- Add icon parameter to item registration (API, NativeInterop, NativeExports)
- Use protected (IEAA/MEAA) decorated names for Tile/Item constructors
- Lazy-dereference Material/SoundType pointers (NULL until staticCtor runs)
- CrashHandler: skip __debugbreak() from game exe so missing texture fallback runs
- ExampleMod: add .Icon("ruby") to item registration
2026-03-06 20:10:13 -06:00
Jacobwasbeast
7af64bf83c Resolve crash stack traces to PDB symbol names
- Add PdbParser::BuildAddressIndex() to build a sorted RVA->name table
  from public and module symbols before closing the PDB file
- Add PdbParser::FindNameByRVA() for O(log n) reverse lookup at crash time
- Update crash handler to resolve Minecraft.Client.exe addresses to
  decorated function names (e.g. Minecraft.Client.exe!?tick@Minecraft+0x30)
- Resolve the faulting address itself in the crash report header
2026-03-06 19:26:32 -06:00
Jacobwasbeast
17f3a03aa0 Add crash handler, game debug capture, timestamped logging, and logs/ directory
- Add vectored exception handler (CrashHandler) installed from DllMain to
  reliably catch crashes before game CRT/SEH can override it, with x64
  stack walking via RtlVirtualUnwind and re-entrancy protection
- Hook OutputDebugStringA to capture game debug output into game_debug.log
- Move all log files into a logs/ subdirectory (legacyforge.log,
  game_debug.log, crash.log)
- Add millisecond-precision timestamps to all log entries
- Replace all raw printf calls with LogUtil::Log across every source file
  for consistent timestamped, file-persisted logging
2026-03-06 19:19:33 -06:00
Jacobwasbeast
34177e1507 Add main menu overlay, creative inventory injection, mod discovery, logging, and Wine/Proton support
- Replace dbghelp with raw_pdb library for cross-platform PDB symbol resolution
- Add main menu branding overlay via C4JRender::Present hook
- Add creative inventory item injection from mods
- Add file-based logging (LogUtil) alongside console output
- Fix mod discovery with custom AssemblyLoadContext for proper type identity
- Add file dialog for game path selection in launcher
- Add CreativeTab enum and block/item creative tab assignment
- Unify build output to single ModLoader/build directory
2026-03-06 18:59:02 -06:00
Jacobwasbeast
65ef99fc11 Use exact decorated symbol names verified against Minecraft.Client.pdb
Verified all hook targets exist in the compiled game's PDB:
- ?MinecraftWorld_RunStaticCtors@@YAXXZ
- ?tick@Minecraft@@QEAAX_N0@Z
- ?init@Minecraft@@QEAAXXZ
- ?ExitGame@CConsoleMinecraftApp@@UEAAXXZ (replaces destroy which is inlined)

Minecraft::destroy/run_end/stop are not public symbols (likely inlined),
so the shutdown hook now targets CConsoleMinecraftApp::ExitGame instead.
2026-03-06 15:16:06 -06:00
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