Skip to content

Optimize guardian spawning#2

Open
mitchej123 wants to merge 3 commits intomasterfrom
optimize-guardian-spawning
Open

Optimize guardian spawning#2
mitchej123 wants to merge 3 commits intomasterfrom
optimize-guardian-spawning

Conversation

@mitchej123
Copy link
Collaborator

  • Stop re-calculating spawn cap each tick; cache count every ~40 ticks
  • Use TLongHashSet instead of HashMap<ChunkCoordIntPair, Boolean> for eligible chunk counting - allocation/boxing free
  • Cache Monument Bounding Boxes and refresh periodically (~5m), avoids constant scanning/parsing of NBT

* Stop re-calculating spawn cap each tick; cache count every ~40 ticks
* Use TLongHashSet instead of HashMap<ChunkCoordIntPair, Boolean> for eligible chunk counting - allocation/boxing free
* Cache Monument Bounding Boxes and refresh periodically (~5m), avoids constant scanning/parsing of NBT
@mitchej123 mitchej123 requested review from Alexdoru and Sopel97 and removed request for Sopel97 March 19, 2026 17:04
@Dream-Master Dream-Master requested a review from Sopel97 March 19, 2026 18:56
@Dream-Master Dream-Master added the 🚧 Testing on Zeta Do not merge yet, testing this PR on Zeta label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚧 Testing on Zeta Do not merge yet, testing this PR on Zeta

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants