mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 12:12:08 -07:00
add back hunk to async SavedData IO
This commit is contained in:
@@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
return switch (owner) {
|
return switch (owner) {
|
||||||
+ case "org/bukkit/scoreboard/DisplaySlot" -> FieldRename.convertDisplaySlot(apiVersion, from); // Paper - DisplaySlot
|
+ case "org/bukkit/scoreboard/DisplaySlot" -> FieldRename.convertDisplaySlot(from); // Paper - DisplaySlot
|
||||||
case "org/bukkit/block/banner/PatternType" -> FieldRename.convertPatternTypeName(apiVersion, from);
|
case "org/bukkit/block/banner/PatternType" -> FieldRename.convertPatternTypeName(apiVersion, from);
|
||||||
case "org/bukkit/enchantments/Enchantment" -> FieldRename.convertEnchantmentName(apiVersion, from);
|
case "org/bukkit/enchantments/Enchantment" -> FieldRename.convertEnchantmentName(apiVersion, from);
|
||||||
case "org/bukkit/block/Biome" -> FieldRename.convertBiomeName(apiVersion, from);
|
case "org/bukkit/block/Biome" -> FieldRename.convertBiomeName(apiVersion, from);
|
||||||
@@ -25,14 +25,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - DisplaySlot
|
+ // Paper start - DisplaySlot
|
||||||
+ private static final FieldRenameData DISPLAY_SLOT_DATA = FieldRenameData.Builder.newBuilder()
|
|
||||||
+ .forAllVersions()
|
|
||||||
+ .change("SIDEBAR_TEAM_", "SIDEBAR_")
|
|
||||||
+ .build();
|
|
||||||
+
|
|
||||||
+ @DoNotReroute
|
+ @DoNotReroute
|
||||||
+ public static String convertDisplaySlot(ApiVersion version, String from) {
|
+ public static String convertDisplaySlot(final String from) {
|
||||||
+ return FieldRename.DISPLAY_SLOT_DATA.getReplacement(version, from);
|
+ if (from.startsWith("SIDEBAR_") && !from.startsWith("SIDEBAR_TEAM_")) {
|
||||||
|
+ return from.replace("SIDEBAR_", "SIDEBAR_TEAM_");
|
||||||
|
+ }
|
||||||
|
+ return from;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end - DisplaySlot
|
+ // Paper end - DisplaySlot
|
||||||
+
|
+
|
||||||
|
@@ -5,6 +5,26 @@ Subject: [PATCH] Write SavedData IO async
|
|||||||
|
|
||||||
Co-Authored-By: Shane Freeder <theboyetronic@gmail.com>
|
Co-Authored-By: Shane Freeder <theboyetronic@gmail.com>
|
||||||
|
|
||||||
|
diff --git a/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java b/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
||||||
|
+++ b/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
||||||
|
@@ -0,0 +0,0 @@ public class ThreadedWorldUpgrader {
|
||||||
|
}
|
||||||
|
|
||||||
|
this.threadPool.execute(new ConvertTask(info, regionPos.x >> 5, regionPos.z >> 5));
|
||||||
|
+ // Paper start - Write SavedData IO async
|
||||||
|
+ this.threadPool.execute(() -> {
|
||||||
|
+ try {
|
||||||
|
+ worldPersistentData.close();
|
||||||
|
+ } catch (IOException exception) {
|
||||||
|
+ LOGGER.error("Failed to close persistent world data", exception);
|
||||||
|
+ }
|
||||||
|
+ });
|
||||||
|
+ // Paper end - Write SavedData IO async
|
||||||
|
}
|
||||||
|
this.threadPool.shutdown();
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||||
|
Reference in New Issue
Block a user