Mystical Agriculture Optimization

Provided performance optimizations for Mystical Agriculture.

Provided performance optimizations for Mystical Agriculture.

No.OriginalChangeEffect
1Soul Extractor queries the recipe manager every tick, even with an empty input slot (full scan of 39 soul extraction recipes)Returns null immediately when the input slot is emptyOne full recipe scan and one CraftingInput allocation saved per idle machine per tick; scales with machine count
2Infusion Altar scans its 8 pedestal positions and performs a recipe lookup every tick while it has an input; the client HUD does the same every frameReturns null immediately when the input slot is emptyEmpty altars cost nothing per tick on the server or per frame on the client
3Awakening Altar scans its pedestal/vessel positions and performs a recipe lookup every tick while it has an inputReturns null immediately when the input slot is emptySame as 2
4Infusion Altar rescans all 8 pedestal positions on every call; the client HUD calls it every frameReuses the pedestal list for the current game tick8 position lookups per frame become one per tick while pointing at an altar; no behavior change
5Every mob death linearly scans all 23 mob soul types (registry key lookup + set contains per type)Caches the EntityType → MobSoulType mapping; cleared on register/add/remove23 scans per death become one hash lookup in soul farms
6Every XP orb pickup scans the whole inventory (36 slots + offhand) for an experience capsuleScans once per player per tick and reuses the result within that tickXP farms no longer rescan the inventory for every orb
7Running machines broadcast their full BE NBT (Harvester: 16-slot inventory) to every player within 64 blocks every tickMachines without a TESR sync only while a player has their GUI open; the Soulium Spawner syncs only when a player is within 64 blocks; other BEs unchangedNo packets or NBT serialization when nobody is watching; identical behavior while the GUI is open

Mystical Agriculture Optimization Team

profile avatar
  • 3
    Followers
  • 17
    Projects
  • 17.6K
    Downloads

If you have any good ideas, or if you simply want to say a few words, feel free to send me a private message. I might not be very timely in replying, but right now it seems I have nothing left besides building projects.

More from anderlyerView all