Is it actually unloading?
zwamdurkel opened this issue ยท 9 comments
I run a PO3 server and PO3 has unloader installed by default, but i get the feeling that this mod isnt actually doing anything. A lot of dimensions (like mining dim, specte, twilight forest) and all of the galacticraft and extra planets dimensions never get unloaded. They also aren't on the blacklist if you were wondering. I can also confirm that these dims dont have any chunkloaders in them. https://hastebin.com/ebugemuxex.md
PS: I've also noticed this issue on other packs
Unloader v 1.2.0
Forge v 14.23.5.2808
PO3 v 3.0.38
UniversalTweaks has this included & working as intended.
There's been a few changes to Forge's world unloading since I've created this mod, I'm looking into whether or not this mod is still necessary. Can you test without Unloader installed?
I'm not sure if you have any dimensions blacklisted but an issue I ran into was that if you leave the blacklist blank it acts as if it has a * flag instead.
The mod doesn't work because the dimension blacklist code contains a bug. As Piehthyte said, the mod will only ever work if the blacklist has at least one item in it.
On line 33, you enter a for-loop that loops over every blacklist entry. The problem here is that this loop is never entered if there are no blacklisted dims, and therefore the code that actually unloads the dimensions is never called.
Solution: move the dimension unload code outside of the loop. Only unload the dimension if it was matched inside the config.
Also, I'm pretty sure this blacklist code fails if there is more than one blacklisted dimension.
The code loops over every entry in the blacklist. If the dimension does not match the current entry, it is unloaded. But what if an earlier or later entry does match the blacklist? Well, the dimension is still unloaded.
Also, Iโm pretty sure that first unload could fire earlier on physical client when switching between worlds because event handler is not unregistered on server startup/shutdown (and thus shares tickIndex
state). Though this is not a critical bug.
so, the confing should only have 0
in the blacklist? (it has 0
and overworld
, which are the same thing ik, but i'm not sure because someone said that the mod requires some configuration to be usable)
In short, you have to have just one entry in the blacklist. No more and no less, or it won't work at all. If you only want the overworld to not be unloaded, 0
should be fine.
You can use regex to basically get multiple filters in one line.