Fix hbmpollution.dat file on Crucible and probably Thermos

This commit is contained in:
Григорий Величко 2023-08-16 15:24:51 +03:00
parent f912e572f7
commit cb0eb4271b
No known key found for this signature in database
GPG Key ID: AEA178BBDAB47A45

View File

@ -153,8 +153,10 @@ public class PollutionHandler {
public String getDataDir(WorldServer world) {
String dir = world.getSaveHandler().getWorldDirectory().getAbsolutePath();
if(world.provider.dimensionId != 0) {
dir += File.separator + "DIM" + world.provider.dimensionId;
// Crucible and probably Thermos provide dimId by themselves
String dimId = File.separator + "DIM" + world.provider.dimensionId;
if(world.provider.dimensionId != 0 && !dir.endsWith(dimId)) {
dir += dimId;
}
dir += File.separator + "data";
return dir;