diff options
author | Nassim Jahnke <[email protected]> | 2024-12-03 21:03:25 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-12-03 21:03:25 +0100 |
commit | 2331dad0a0718f731eed4db2e25f7d4bbd4d0873 (patch) | |
tree | d8ef098bebd71cad7356fa367a37d8fad416b57a | |
parent | 4601dc901b5fd1e62a830aeb2ba4442d7307a496 (diff) | |
download | Paper-2331dad0a0718f731eed4db2e25f7d4bbd4d0873.tar.gz Paper-2331dad0a0718f731eed4db2e25f7d4bbd4d0873.zip |
Even more work
-rw-r--r-- | patches/server/1032-Separate-dimensiondata-executor.patch (renamed from patches/unapplied/server/1034-Separate-dimensiondata-executor.patch) | 33 | ||||
-rw-r--r-- | patches/server/1033-Always-send-Banner-patterns-to-the-client.patch (renamed from patches/unapplied/server/1035-Always-send-Banner-patterns-to-the-client.patch) | 6 | ||||
-rw-r--r-- | patches/server/1036-Rewrite-dataconverter-system.patch (renamed from patches/unapplied/server/1036-Rewrite-dataconverter-system.patch) | 0 |
3 files changed, 24 insertions, 15 deletions
diff --git a/patches/unapplied/server/1034-Separate-dimensiondata-executor.patch b/patches/server/1032-Separate-dimensiondata-executor.patch index 40c89f1045..901507d860 100644 --- a/patches/unapplied/server/1034-Separate-dimensiondata-executor.patch +++ b/patches/server/1032-Separate-dimensiondata-executor.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Separate dimensiondata executor diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 276ad77ecb274b6cd454d0f92457964a8eaa5824..1360aa8202542d3d0f32247f1123575fc2c38ff1 100644 +index 1a31024b46a5d7960f1e0f172f8ebcf396dd3139..38ffa1c4c204f73746c4b87127de92b631548eb1 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java @@ -94,6 +94,7 @@ public class Util { @@ -16,7 +16,7 @@ index 276ad77ecb274b6cd454d0f92457964a8eaa5824..1360aa8202542d3d0f32247f1123575f private static final TracingExecutor DOWNLOAD_POOL = makeIoExecutor("Download-", true); // Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() { -@@ -260,6 +261,21 @@ public class Util { +@@ -265,6 +266,21 @@ public class Util { })); } @@ -39,15 +39,24 @@ index 276ad77ecb274b6cd454d0f92457964a8eaa5824..1360aa8202542d3d0f32247f1123575f throw t instanceof RuntimeException ? (RuntimeException)t : new RuntimeException(t); } diff --git a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java -index d16f124e0371ce943298c8d7d9bfac21e98cf885..8212f2dfba5c2eee5a823b5217fb43dc870d228a 100644 +index 3c3b18e5b419a0f785467c511dcdd65873ad0989..9272c91e0ee489091fdf1fedcf3801c070e9e82a 100644 --- a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java -@@ -155,7 +155,7 @@ public class DimensionDataStorage implements AutoCloseable { - } catch (IOException var3) { - LOGGER.error("Could not save data to {}", path.getFileName(), var3); - } -- }, Util.ioPool()); -+ }, Util.DIMENSION_DATA_IO_POOL); // Paper - Separate dimension data IO pool - } - - public void saveAndJoin() { +@@ -139,7 +139,7 @@ public class DimensionDataStorage implements AutoCloseable { + } else { + int i = Util.maxAllowedExecutorThreads(); + int j = map.size(); +- if (j > i) { ++ if (false && j > i) { // Paper - Separate dimension data IO pool; just throw them into the fixed pool queue + this.pendingWriteFuture = this.pendingWriteFuture.thenCompose(object -> { + List<CompletableFuture<?>> list = new ArrayList<>(i); + int k = Mth.positiveCeilDiv(j, i); +@@ -160,7 +160,7 @@ public class DimensionDataStorage implements AutoCloseable { + v -> CompletableFuture.allOf( + map.entrySet() + .stream() +- .map(entry -> CompletableFuture.runAsync(() -> tryWrite(entry.getKey(), entry.getValue()), Util.ioPool())) ++ .map(entry -> CompletableFuture.runAsync(() -> tryWrite(entry.getKey(), entry.getValue()), Util.DIMENSION_DATA_IO_POOL)) // Paper - Separate dimension data IO pool + .toArray(CompletableFuture[]::new) + ) + ); diff --git a/patches/unapplied/server/1035-Always-send-Banner-patterns-to-the-client.patch b/patches/server/1033-Always-send-Banner-patterns-to-the-client.patch index a5951afc90..2810d7155c 100644 --- a/patches/unapplied/server/1035-Always-send-Banner-patterns-to-the-client.patch +++ b/patches/server/1033-Always-send-Banner-patterns-to-the-client.patch @@ -9,10 +9,10 @@ flow for them, this is not all too surprising. So, we shall resort to always sending the patterns over the network for update packets. diff --git a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java -index 98bc87fe5d153cc4927f7e1b4a02f61d9dd019a0..9528935a120f7d5a1fdb1a796854478e8a83f833 100644 +index 27fd8b88dc1433c1df1e09604a3cc546bfa0d2b9..1f3e1c7128b9a0f27f2df39a8970050c5313d7a3 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java -@@ -63,7 +63,7 @@ public class BannerBlockEntity extends BlockEntity implements Nameable { +@@ -57,7 +57,7 @@ public class BannerBlockEntity extends BlockEntity implements Nameable { @Override protected void saveAdditional(CompoundTag nbt, HolderLookup.Provider registries) { super.saveAdditional(nbt, registries); @@ -21,7 +21,7 @@ index 98bc87fe5d153cc4927f7e1b4a02f61d9dd019a0..9528935a120f7d5a1fdb1a796854478e nbt.put("patterns", (Tag) BannerPatternLayers.CODEC.encodeStart(registries.createSerializationContext(NbtOps.INSTANCE), this.patterns).getOrThrow()); } -@@ -95,9 +95,18 @@ public class BannerBlockEntity extends BlockEntity implements Nameable { +@@ -89,9 +89,18 @@ public class BannerBlockEntity extends BlockEntity implements Nameable { return ClientboundBlockEntityDataPacket.create(this); } diff --git a/patches/unapplied/server/1036-Rewrite-dataconverter-system.patch b/patches/server/1036-Rewrite-dataconverter-system.patch index 7f88441f12..7f88441f12 100644 --- a/patches/unapplied/server/1036-Rewrite-dataconverter-system.patch +++ b/patches/server/1036-Rewrite-dataconverter-system.patch |