Skip to content

Fix purge regions not deleting nether/end region files#2805

Merged
tastybento merged 3 commits intodevelopfrom
fix/purge-nether-dim-folder
Feb 26, 2026
Merged

Fix purge regions not deleting nether/end region files#2805
tastybento merged 3 commits intodevelopfrom
fix/purge-nether-dim-folder

Conversation

@tastybento
Copy link
Member

@tastybento tastybento commented Feb 26, 2026

Summary

  • Nether and End worlds store region data in DIM-1/ and DIM1/ subfolders within their world folder, but the purge command was looking directly in worldFolder/region/ which doesn't exist for non-overworld dimensions
  • This caused deleteIfExists() to silently succeed without deleting anything, explaining why admins saw zero nether size reduction after purging
  • Added resolveDataFolder() helper that checks the world's Environment type and resolves the correct dimension subfolder (DIM-1 for nether, DIM1 for end), with fallback to the world folder directly if the subfolder doesn't exist
  • Added diagnostic logging that prints resolved paths, whether they exist, and how many .mca files are found per dimension — so admins can confirm the fix is working in their server logs

Test plan

  • Run purge regions on a server with nether islands enabled
  • Check server logs for the new diagnostic lines confirming the nether region folder is found with exists=true and a non-zero file count
  • Verify the nether world folder size decreases after the purge completes
  • Verify overworld purge still works as before

tastybento and others added 3 commits February 25, 2026 20:40
Nether and End worlds store region data in DIM-1/ and DIM1/ subfolders
within their world folder, but the purge command was looking directly
in worldFolder/region/ which doesn't exist. This caused deleteIfExists()
to silently succeed without actually deleting anything.

Add resolveDataFolder() helper that checks the world's environment type
and resolves the correct dimension subfolder (DIM-1 for nether, DIM1
for end). Also add diagnostic logging to confirm which paths are used
and how many region files are found per dimension.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tastybento tastybento merged commit 7def5d1 into develop Feb 26, 2026
1 check passed
@tastybento tastybento deleted the fix/purge-nether-dim-folder branch February 26, 2026 05:05
@sonarqubecloud
Copy link

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