Duplicate Entity Resolver
Brittank88 opened this issue ยท 3 comments
Here's an excerpt of it from the logs.
Not sure why this happened, except for the fact that I was pre-generating an area I had already partially pre-generated in a previous task.
Thanks for reporting; this is actually a known issue / bug in vanilla, and one that is fixed by many server implementations like Paper (see their patch here). Chunky doesn't directly cause this, and it occurs with other pre-generation mods as well. It does seem to be the case however that it occurs more frequently when already generated chunks are processed again.
As far as I know, this should have little/no detrimental impact to your world. If you're concerned, try teleporting to the location of those chunks to survey them. Though, the warning spam is definitely annoying.
I can't make any guarantees right now, but I've been considering writing a mix-in which fixes this, since it's unlikely that Fabric will do so itself (they don't like changing any vanilla behavior including those that are bug fixes). Ideally this would be something configurable which either automatically fixes / removes duplicate entities which are added to the world. I'll need to do further research before I decide as to whether this is something I'm willing to tackle as part of this project, or if it's out of scope.
Will leave this open as an enhancement for now to explain the issue for anyone else who finds this and is encountering the same warnings on their server.
Understood! Thanks for the detailed reply.
Usually, I'd be okay with warnings in the log (I know a lot of the time they can be ignored), but whenever I start to see a bunch of them at once, I like to report them in case that overhead can be avoided.
I come from mostly a Python and JS environment, however, if Java is even remotely similar I know that the print/log statement alone impacts efficiency in large doses! That's not even including the overhead of the actual unnecessary logic going on behind the scenes before a warning is printed.
TL;DR a mixin would be pretty awesome to help auto-resolve this. ๐
As it turns out, there's actually already a mod which fixes this called RandomPatches. As you can see here, it re-assigns duplicate UUIDs automatically, and there is also a configuration option for the logging. I think it would be better to install that mod rather than include this fix directly in Chunky to avoid creating potential mod incompatibilities. Good to know for next time!