Files
LegacyWeaveLoader/LegacyForgeRuntime/src/CreativeInventory.h
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

29 lines
594 B
C++

#pragma once
#include <vector>
class SymbolResolver;
struct PendingCreativeItem
{
int itemId;
int count;
int auxValue;
int groupIndex;
};
namespace CreativeInventory
{
void AddPending(int itemId, int count, int auxValue, int groupIndex);
bool ResolveSymbols(SymbolResolver& resolver);
void InjectItems();
void UpdateTabPageCounts();
extern void* pCategoryGroups;
extern void* pItemInstanceCtor;
extern void* pSharedPtrCtor;
extern void* pVectorPushBack;
extern void* pSpecs;
extern std::vector<PendingCreativeItem> s_pendingItems;
}