--- a/net/minecraft/world/level/storage/Convertable.java
+++ b/net/minecraft/world/level/storage/Convertable.java
@@ -60,6 +60,10 @@
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
+// CraftBukkit start
+import net.minecraft.world.level.dimension.WorldDimension;
+// CraftBukkit end
+
 public class Convertable {
 
     static final Logger LOGGER = LogManager.getLogger();
@@ -105,26 +109,26 @@
         Logger logger = Convertable.LOGGER;
 
         Objects.requireNonNull(logger);
-        return Pair.of((GeneratorSettings) dataresult.resultOrPartial(SystemUtils.a("WorldGenSettings: ", logger::error)).orElseGet(() -> {
+        return Pair.of(dataresult.resultOrPartial(SystemUtils.a("WorldGenSettings: ", (java.util.function.Consumer<String>) logger::error)).orElseGet(() -> { // CraftBukkit - decompile error
             DataResult dataresult1 = RegistryLookupCodec.a(IRegistry.DIMENSION_TYPE_REGISTRY).codec().parse(dynamic2);
             Logger logger1 = Convertable.LOGGER;
 
             Objects.requireNonNull(logger1);
-            IRegistry<DimensionManager> iregistry = (IRegistry) dataresult1.resultOrPartial(SystemUtils.a("Dimension type registry: ", logger1::error)).orElseThrow(() -> {
+            IRegistry<DimensionManager> iregistry = (IRegistry) ((DataResult<IRegistry<DimensionManager>>) dataresult1).resultOrPartial(SystemUtils.a("Dimension type registry: ", (java.util.function.Consumer<String>) logger1::error)).orElseThrow(() -> { // CraftBukkit - decompile error
                 return new IllegalStateException("Failed to get dimension registry");
             });
 
             dataresult1 = RegistryLookupCodec.a(IRegistry.BIOME_REGISTRY).codec().parse(dynamic2);
             logger1 = Convertable.LOGGER;
             Objects.requireNonNull(logger1);
-            IRegistry<BiomeBase> iregistry1 = (IRegistry) dataresult1.resultOrPartial(SystemUtils.a("Biome registry: ", logger1::error)).orElseThrow(() -> {
+            IRegistry<BiomeBase> iregistry1 = (IRegistry) ((DataResult<IRegistry<BiomeBase>>) dataresult1).resultOrPartial(SystemUtils.a("Biome registry: ", (java.util.function.Consumer<String>) logger1::error)).orElseThrow(() -> { // CraftBukkit - decompile error
                 return new IllegalStateException("Failed to get biome registry");
             });
 
             dataresult1 = RegistryLookupCodec.a(IRegistry.NOISE_GENERATOR_SETTINGS_REGISTRY).codec().parse(dynamic2);
             logger1 = Convertable.LOGGER;
             Objects.requireNonNull(logger1);
-            IRegistry<GeneratorSettingBase> iregistry2 = (IRegistry) dataresult1.resultOrPartial(SystemUtils.a("Noise settings registry: ", logger1::error)).orElseThrow(() -> {
+            IRegistry<GeneratorSettingBase> iregistry2 = (IRegistry) ((DataResult<IRegistry<GeneratorSettingBase>>) dataresult1).resultOrPartial(SystemUtils.a("Noise settings registry: ", (java.util.function.Consumer<String>) logger1::error)).orElseThrow(() -> { // CraftBukkit - decompile error
                 return new IllegalStateException("Failed to get noise settings registry");
             });
 
@@ -294,9 +298,23 @@
         return this.backupDir;
     }
 
-    public Convertable.ConversionSession c(String s) throws IOException {
-        return new Convertable.ConversionSession(s);
+    // CraftBukkit start
+    public Convertable.ConversionSession c(String s, ResourceKey<WorldDimension> dimensionType) throws IOException {
+        return new Convertable.ConversionSession(s, dimensionType);
+    }
+
+    public static File getFolder(File file, ResourceKey<WorldDimension> dimensionType) {
+        if (dimensionType == WorldDimension.OVERWORLD) {
+            return file;
+        } else if (dimensionType == WorldDimension.NETHER) {
+            return new File(file, "DIM-1");
+        } else if (dimensionType == WorldDimension.END) {
+            return new File(file, "DIM1");
+        } else {
+            return new File(file, "dimensions/" + dimensionType.a().getNamespace() + "/" + dimensionType.a().getKey());
+        }
     }
+    // CraftBukkit end
 
     public class ConversionSession implements AutoCloseable {
 
@@ -304,8 +322,12 @@
         public final Path levelPath;
         private final String levelId;
         private final Map<SavedFile, Path> resources = Maps.newHashMap();
+        // CraftBukkit start
+        private final ResourceKey<WorldDimension> dimensionType;
 
-        public ConversionSession(String s) throws IOException {
+        public ConversionSession(String s, ResourceKey<WorldDimension> dimensionType) throws IOException {
+            this.dimensionType = dimensionType;
+            // CraftBukkit end
             this.levelId = s;
             this.levelPath = Convertable.this.baseDir.resolve(s);
             this.lock = SessionLock.a(this.levelPath);
@@ -322,7 +344,7 @@
         }
 
         public File a(ResourceKey<World> resourcekey) {
-            return DimensionManager.a(resourcekey, this.levelPath.toFile());
+            return getFolder(this.levelPath.toFile(), this.dimensionType); // CraftBukkit
         }
 
         private void checkSession() {
