ProcessingDataProvider
Runtime data provider for processing skills (cooking, firemaking, smelting, smithing). Builds lookup tables from recipe manifest files loaded by DataManager. Location:packages/shared/src/data/ProcessingDataProvider.ts
Overview
ProcessingDataProvider is a singleton that:- Loads recipe manifests from
recipes/directory - Builds efficient lookup tables for runtime queries
- Provides methods to check requirements and availability
- Falls back to embedded item data if manifests missing
Initialization
Cooking Methods
isCookableItem
Check if an item can be cooked.getCookingData
Get cooking data for a raw food item.getCookableItemIds
Get all cookable item IDs.getCookingLevel
Get cooking level requirement for an item.getCookingXP
Get cooking XP for an item.Firemaking Methods
isBurneableLog
Check if an item can be burned.getFiremakingData
Get firemaking data for a log.getBurneableLogIds
Get all burneable log IDs.getFiremakingLevel
Get firemaking level requirement for a log.getFiremakingXP
Get firemaking XP for a log.Smelting Methods
isSmeltableBar
Check if an item is a smeltable bar.getSmeltingData
Get smelting data for a bar.getSmeltableBarsFromInventory
Get all bars that can be smelted from inventory.isSmeltableOre
Check if an item is an ore that can be used for smelting.getSmeltableOreIds
Get all ore IDs that can be used for smelting.getSmeltableBarIds
Get all smeltable bar IDs.getSmeltingLevel
Get smelting level requirement for a bar.getSmeltingXP
Get smelting XP for a bar.getSmeltingTicks
Get smelting ticks for a bar (time in game ticks).Smithing Methods
isSmithableItem
Check if an item can be smithed.getSmithingRecipe
Get smithing recipe data for an output item.getSmithableItemsFromInventory
Get all items that can be smithed from inventory (deprecated - usegetSmithableItemsWithAvailability instead).
getSmithableItemsWithAvailability
Get all smithable items with availability info for UI display.This method returns ALL recipes for bar types the player has, including items they can’t make yet. Use the
meetsLevel and hasBars flags to grey out unavailable items in the UI.getSmithingRecipesForBar
Get all recipes for a specific bar type.getSmithingRecipesByCategory
Get recipes grouped by category for a specific bar type.getAllSmithingRecipes
Get all smithing recipes.getAvailableSmithingRecipes
Get all recipes the player can make with their smithing level.getSmithableItemIds
Get all smithable item IDs.getSmithingLevel
Get smithing level requirement for an item.getSmithingXP
Get smithing XP for an item.getSmithingTicks
Get smithing ticks for an item (time in game ticks).Utility Methods
getSummary
Get summary of loaded data.rebuild
Rebuild all lookup tables (for testing or after manifest reload).Performance Optimizations
Pre-Allocated Buffers
ProcessingDataProvider uses pre-allocated buffers to reduce GC pressure:Manifest Loading
ProcessingDataProvider loads recipes from JSON manifests:Loading Order
- DataManager loads recipe manifests from
recipes/directory - DataManager calls
processingDataProvider.loadCookingRecipes(manifest) - DataManager calls
processingDataProvider.loadSmeltingRecipes(manifest) - DataManager calls
processingDataProvider.loadSmithingRecipes(manifest) - DataManager calls
processingDataProvider.rebuild()