feat(blockstates): rotation profiles and placement tracking

This commit is contained in:
Jacobwasbeast
2026-03-11 19:56:21 -05:00
parent b47e3d2354
commit d4f7603390
15 changed files with 840 additions and 26 deletions

View File

@@ -45,6 +45,8 @@ bool HookManager::Install(const SymbolResolver& symbols)
reinterpret_cast<Vec3NewTemp_fn>(symbols.Tile.pVec3NewTemp);
GameHooks::HitResult_Ctor =
reinterpret_cast<HitResultCtor_fn>(symbols.Tile.pHitResultCtor);
GameHooks::Level_GetData =
reinterpret_cast<LevelGetData_fn>(symbols.Level.pLevelGetData);
if (symbols.Core.pRunStaticCtors)
{
@@ -110,6 +112,20 @@ bool HookManager::Install(const SymbolResolver& symbols)
}
}
if (symbols.Item.pItemInstanceUseOn)
{
if (MH_CreateHook(symbols.Item.pItemInstanceUseOn,
reinterpret_cast<void*>(&GameHooks::Hooked_ItemInstanceUseOn),
reinterpret_cast<void**>(&GameHooks::Original_ItemInstanceUseOn)) != MH_OK)
{
LogUtil::Log("[WeaveLoader] Warning: Failed to hook ItemInstance::useOn");
}
else
{
LogUtil::Log("[WeaveLoader] Hooked ItemInstance::useOn (placement tracking)");
}
}
if (symbols.Item.pItemInstanceSave)
{
if (MH_CreateHook(symbols.Item.pItemInstanceSave,