--- a/net/minecraft/world/storage/SaveFormat.java
+++ b/net/minecraft/world/storage/SaveFormat.java
@@ -182,6 +182,10 @@
    }
 
    private static BiFunction<File, DataFixer, ServerWorldInfo> func_237270_b_(DynamicOps<INBT> p_237270_0_, DatapackCodec p_237270_1_) {
+       return getReader(p_237270_0_, p_237270_1_, null);
+   }
+
+   private static BiFunction<File, DataFixer, ServerWorldInfo> getReader(DynamicOps<INBT> p_237270_0_, DatapackCodec p_237270_1_, @Nullable LevelSave levelSave) {
       return (p_242976_2_, p_242976_3_) -> {
          try {
             CompoundNBT compoundnbt = CompressedStreamTools.func_244263_a(p_242976_2_);
@@ -193,7 +197,10 @@
             Pair<DimensionGeneratorSettings, Lifecycle> pair = func_237259_a_(dynamic, p_242976_3_, i);
             VersionData versiondata = VersionData.func_237324_a_(dynamic);
             WorldSettings worldsettings = WorldSettings.func_234951_a_(dynamic, p_237270_1_);
-            return ServerWorldInfo.func_237369_a_(dynamic, p_242976_3_, i, compoundnbt2, worldsettings, versiondata, pair.getFirst(), pair.getSecond());
+            ServerWorldInfo info = ServerWorldInfo.func_237369_a_(dynamic, p_242976_3_, i, compoundnbt2, worldsettings, versiondata, pair.getFirst(), pair.getSecond());
+            if (levelSave != null)
+                net.minecraftforge.fml.WorldPersistenceHooks.handleWorldDataLoad(levelSave, info, compoundnbt);
+            return info;
          } catch (Exception exception) {
             field_215785_a.error("Exception reading {}", p_242976_2_, exception);
             return null;
@@ -314,7 +321,7 @@
       @Nullable
       public IServerConfiguration func_237284_a_(DynamicOps<INBT> p_237284_1_, DatapackCodec p_237284_2_) {
          this.func_237301_i_();
-         return SaveFormat.this.func_237266_a_(this.field_237279_c_.toFile(), SaveFormat.func_237270_b_(p_237284_1_, p_237284_2_));
+         return SaveFormat.this.func_237266_a_(this.field_237279_c_.toFile(), SaveFormat.getReader(p_237284_1_, p_237284_2_, this));
       }
 
       @Nullable
@@ -335,6 +342,8 @@
          CompoundNBT compoundnbt1 = new CompoundNBT();
          compoundnbt1.func_218657_a("Data", compoundnbt);
 
+         net.minecraftforge.fml.WorldPersistenceHooks.handleWorldDataSave(this, p_237288_2_, compoundnbt1);
+
          try {
             File file2 = File.createTempFile("level", ".dat", file1);
             CompressedStreamTools.func_244264_a(compoundnbt1, file2);
@@ -352,6 +361,10 @@
          return this.field_237279_c_.resolve("icon.png").toFile();
       }
 
+      public Path getWorldDir() {
+          return field_237279_c_;
+      }
+
       @OnlyIn(Dist.CLIENT)
       public void func_237299_g_() throws IOException {
          this.func_237301_i_();
