Fix purge regions not deleting nether/end region files#2805
Merged
tastybento merged 3 commits intodevelopfrom Feb 26, 2026
Merged
Fix purge regions not deleting nether/end region files#2805tastybento merged 3 commits intodevelopfrom
tastybento merged 3 commits intodevelopfrom
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
DIM-1/andDIM1/subfolders within their world folder, but the purge command was looking directly inworldFolder/region/which doesn't exist for non-overworld dimensionsdeleteIfExists()to silently succeed without deleting anything, explaining why admins saw zero nether size reduction after purgingresolveDataFolder()helper that checks the world'sEnvironmenttype and resolves the correct dimension subfolder (DIM-1for nether,DIM1for end), with fallback to the world folder directly if the subfolder doesn't exist.mcafiles are found per dimension — so admins can confirm the fix is working in their server logsTest plan
purge regionson a server with nether islands enabledexists=trueand a non-zero file count