Jump to content

[1.7.10] Deleting a dimension folder in-game


AndrewFM

Recommended Posts

I almost have this figured out. I'm trying to delete the contents of my custom dimension whenever the player returns to the overworld (or more specifically, when there's no more players in the dimension), so it'll generate fresh next time they enter. The only remaining issue I'm encountering is that when I try to delete the dimension's folder, it fails, because it's unable to delete some of the files in the dimension's 'region' folder.

 

For the record, this is after the player has returned to the overworld, and also after the dimension has been unloaded (I'm sure of this, because if I call DimensionManager.unloadWorld() on the dimension, it tells me it's already unloaded). I took a look around through the source files, and as far as I can tell, all open file pointers to the region files are tracked inside Minecraft's RegionFileCache class. I tried calling RegionFileCache.clearRegionFileReferences(), which closes all of the region file pointers, but even with that it still fails to delete the folder.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.