Fenixin/Minecraft-Region-Fixer

Searching for missing entities tag is no longer useful in Minecraft 1.17

Closed this issue · 3 comments

Hello ! ^^
First of all, thank you very much for this program. As a Minecraft server admin, it's certainly one of the most useful tool I use. And second, I'm sorry if my english can be a bit weird.
Anyway...
In Minecraft 1.17, Mojang decided to move entities to separate files (In entities folder, which works like poi).
The problem is that Region-Fixer detects 1.17 chunks as "missing entities tag" chunks. As a user, I can just ignore it, but it becomes really annoying when I generate a log file (With the --log argument), because it creates a giant and unusable log file (45 MB for my server).
Could you add an option to ignore missing entities tag problem (Like, for example --ignore-missing-tag) ? Or maybe detect that it is at a higher Minecraft version than 1.17, but I don't know if it's possible with the NBT format.
Thank you very much in advance, and have a nice day !

PS : I use Region-Fixer v0.3.3 on Ubuntu 20.04 with Python 3.8. But I don't think it's useful for this issue. 😄

Hello!

Don't worry about the english, mine is probably weirder :P

Thanks for the information about the POIs, I'm glad regionfixer has been useful for you. Region-fixer needs a pretty big update but I'm not really working on region-fixer right now. I'd like to keep it updated but I'm too busy with life. Nonetheless this is very useful, I'll read this the next time I start writing code for it.

You seem pretty knowledgeable about minecraft worlds, so:

  • All the entities are now stored in a different file?
  • No entities at all are stored inside the chunks?
  • Where are those files?
  • Are there any more significative changes?

Hello ! Thank you for your answer. ^^
And don't worry for your english, as long as we can understand each other without misunderstandings, it's okay. :D

I'm not really knowledgeable about Minecraft storage, it's just that I'm maintaining my server for 10 years with the same maps, so I'm trying to keep them healthy as much as I can. ^^
To answer your questions : For each chunk in a region file (In region directory), the tag Entities doesn't exists anymore, and all entities are now stored in the entities folder. Inside this folder, the chunks are stored the same way as in region and poi directories : Anvil regions files (For example r.0.0.mca) which contains chunks.

Here is a better explanation on the Minecraft wiki : https://minecraft.fandom.com/wiki/Entity_format
The first version of Minecraft to move the entities is version 20w45a, which has the data version 2681.

Important note : The chunk data version can be superior to 2681 (2730 for 1.17.1), and the Entities tag can still be there, containing entities on the chunk ! It's the case on my server : I did the complete upgrade with --forceUpgrade, but it doesn't move entities to the new folder. You need to load the chunk to make Minecraft move entities.
(Thank you NBTExplorer for helping me to confirm this. :D )

Despite this strange thing, I think the best solution would be to detect the data version, and if it is >= than 2681, ignore the presence or not of the Entities tag in the chunk. And also scan the entities folder, exactly like you do with poi.
If you don't have time, I can try to do it if you wish. ^^

To answer your last question, I didn't see any more significant change... Yet !
Thank you for reading this, and have a nice day ! ^^

So, thanks to your contribution this is fixed, so I'm closing this. Thanks!