- 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
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.
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
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