Skip to content

Fix Vanilla Bug, use official Hytale API for ActiveChunkUnloader with configurable offset and implement chunkunloader whitelist#20

Open
Xytronix wants to merge 3 commits intoIroriPowered:masterfrom
Xytronix:fix/chunk-unloader-paused-players
Open

Fix Vanilla Bug, use official Hytale API for ActiveChunkUnloader with configurable offset and implement chunkunloader whitelist#20
Xytronix wants to merge 3 commits intoIroriPowered:masterfrom
Xytronix:fix/chunk-unloader-paused-players

Conversation

@Xytronix
Copy link
Contributor

@Xytronix Xytronix commented Mar 14, 2026

Summary

Fixes a bug where paused players' chunks unload when standing still on pause screen for 7,5 seconds.

I implemented a configurable spawn exclusion list and rewrote ActiveChunkUnloader to use official patched methods.

Key changes:

  • Fixed vanilla ChunkUnloadingSystem to skip paused players (null transformComponent)
  • Added spawn chunk protection for both vanilla and Refixes systems
  • Implemented persistent chunk loader service
  • Added /refixes chunkloader command, supports add, remove and list

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)

Implementation details

  • MixinChunkUnloadingSystem: Overwrote collectTrackers() to use ChunkTracker.shouldBeVisible() instead of getChunkVisibility(), properly handling paused players
  • Added spawn protection injection to prevent spawn chunks from unloading
  • MixinPlayerChunkTrackerSystems: Sets minLoadedChunksRadius on player add
  • MixinPlayerViewRadius: Updates radius when view distance changes dynamically
  • ActiveChunkUnloader: Reduced in size and uses now official vanilla API
  • ChunkLoaderService: Managing persistent chunk loaders
  • ChunkLoaderCommand: Command with support for coordinates, current position and label
  • ChunkLoaderWorldListener: Restores chunk loaders on world load
  • Permissions: hytale.command.refixes.chunkloader.{add,remove,list}

Checklist

  • Code compiles successfully
  • Pull request does not contain unrelated changes
  • Changes follow this project's code style
  • Changes are tested or will be tested after submission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant