From d072a3583aa1c5bb3ac7de347134c143c47d13d0 Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Wed, 16 Dec 2020 08:15:14 +0200 Subject: [PATCH] AirplaneLite patch changes removed "concurrent loadedchunkmap" and "concurrent visiblechunks and updating chunks" added "reduce projectile chunk loading" Should help with some crashes on leaflight builds. --- AirplaneLite | 2 +- Akarin | 2 +- PATCHES.md | 3 +- Purpur | 2 +- patches/AirplaneLite/server.txt | 2 +- .../server/0001-Yatopia-Server-Fixes.patch | 37 +------------------ ...0020-Optimize-TileEntity-load-unload.patch | 2 +- ...063-Use-faster-random-implementation.patch | 2 +- .../0064-Tile-Entity-optimizations.patch | 2 +- ...stance-map-when-animal-and-mob-spawn.patch | 4 +- 10 files changed, 11 insertions(+), 47 deletions(-) diff --git a/AirplaneLite b/AirplaneLite index 76810f11..efe57d76 160000 --- a/AirplaneLite +++ b/AirplaneLite @@ -1 +1 @@ -Subproject commit 76810f115d5954cac151c55fe859b393684c177d +Subproject commit efe57d76f967e345cab34f28e305ead78bc96e0e diff --git a/Akarin b/Akarin index b53f48a8..3950fd57 160000 --- a/Akarin +++ b/Akarin @@ -1 +1 @@ -Subproject commit b53f48a85baee0c8a26c26e0255d24558ed6f510 +Subproject commit 3950fd57413a0aceb3369e17be981ceec0be140a diff --git a/PATCHES.md b/PATCHES.md index 5ad55446..2d807cee 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -40,8 +40,6 @@ # Patches | server | Avoid double I/O operation on load player file | ㄗㄠˋ ㄑㄧˊ | | | server | Barrels and enderchests 6 rows | William Blake Galbreath | | | server | Brandings | YatopiaMC | | -| server | Concurrent loadedChunkMap | Paul Sauve | | -| server | Concurrent visibleChunks and updatingChunks | Paul Sauve | | | server | Config migration: disable saving projectiles to disk -> | jmp | | | server | Configurable BlockPhysicsEvent | Mykyta Komarnytskyy | | | server | Configurable criterion triggers | Mykyta Komarnytskyy | | @@ -110,6 +108,7 @@ # Patches | server | ProxyForwardDataEvent | Ivan Pekov | | | server | Purpur config files | William Blake Galbreath | | | server | Redirect Configs | tr7zw | | +| server | Reduce projectile chunk loading | Paul Sauve | | | server | Remove some streams and object allocations | Phoenix616 | | | server | Respect PlayerKickEvent leaveMessage | Ivan Pekov | | | server | Send more packets immediately | MrIvanPlays | | diff --git a/Purpur b/Purpur index 3776636c..2edb086e 160000 --- a/Purpur +++ b/Purpur @@ -1 +1 @@ -Subproject commit 3776636cf7a627f1eeee648cb6c94161820c97c1 +Subproject commit 2edb086e130819eca455926b73a088b7296386ed diff --git a/patches/AirplaneLite/server.txt b/patches/AirplaneLite/server.txt index 3f0bee40..e667ee12 100644 --- a/patches/AirplaneLite/server.txt +++ b/patches/AirplaneLite/server.txt @@ -1 +1 @@ -AirplaneLite-MC-Dev-Fixes&AirplaneLite-Data-Structs&Strip-raytracing-for-EntityLiving-hasLineOfSight&Simpler-ShapelessRecipes-comparison-for-Vanilla&Use-unmodifiableMap-instead-of-making-copy&DataBits-slight-optimization&Concurrent-loadedChunkMap&Concurrent-visibleChunks-and-updatingChunks&Swap-priority-of-checks-in-chunk-ticking \ No newline at end of file +AirplaneLite-MC-Dev-Fixes&AirplaneLite-Data-Structs&Strip-raytracing-for-EntityLiving-hasLineOfSight&Simpler-ShapelessRecipes-comparison-for-Vanilla&Use-unmodifiableMap-instead-of-making-copy&DataBits-slight-optimization&Swap-priority-of-checks-in-chunk-ticking&Reduce-projectile-chunk-loading \ No newline at end of file diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index a5a98853..0febda7b 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -282,41 +282,6 @@ index f9080f6f15f51ac6ce521f062010d4485fb97524..00000000000000000000000000000000 - } - - public boolean checkIfLeftOwner() { return this.h(); } // Purpur - OBFHELPER -diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 07b76471e29dc18f336604d635a325786e0dd73c..57b1381c31395b4233cbb6a5dbb5bd296a664ef4 100644 ---- a/src/main/java/net/minecraft/server/PlayerChunkMap.java -+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -853,7 +853,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - //this.dataRegionManager.addChunk(playerchunk.location.x, playerchunk.location.z); // Tuinity - } - -- this.updatingChunks.put(i, playerchunk); -+ // AirplaneL start -+ this.internalMap.addUpdatingChunk(i, playerchunk); -+ //this.updatingChunks.put(i, playerchunk); -+ // AirplaneL end - this.updatingChunksModified = true; - } - -diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej b/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej -deleted file mode 100644 -index 8f76beb966ee37af62e4360704cf11ac84892dde..0000000000000000000000000000000000000000 ---- a/src/main/java/net/minecraft/server/PlayerChunkMap.java.rej -+++ /dev/null -@@ -1,13 +0,0 @@ --diff a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java (rejected hunks) --@@ -840,7 +862,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { -- } -- this.getVillagePlace().dequeueUnload(playerchunk.location.pair()); // Tuinity - unload POI data -- --- this.updatingChunks.put(i, playerchunk); --+ // AirplaneL start --+ this.internalMap.addUpdatingChunk(i, playerchunk); --+ //this.updatingChunks.put(i, playerchunk); --+ // AirplaneL end -- this.updatingChunksModified = true; -- } -- diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java index a62c87bceab2c9700a7b3925f208b0ffa2b9b393..1a6c593f5f20fb3a8e87ccb70cd3de7f0dcb0327 100644 --- a/src/main/java/net/minecraft/server/StructureGenerator.java @@ -353,7 +318,7 @@ index dd52a8fe4fd46e57a5d1af49ba1965a483cf4fcc..00000000000000000000000000000000 - IChunkAccess ichunkaccess = iworldreader.getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, ChunkStatus.STRUCTURE_STARTS, !(iworldreader instanceof World) || !((World) iworldreader).origamiConfig.onlyFindGeneratedFeatures); - if (ichunkaccess == null) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6f243d1f8e99f66a29e3af689c2bdbdd5597b868..5b45051af00b823e7bbfd9407f2ff66539583863 100644 +index 07d47ad2362c5ebfa7993262a8faed240cc21717..107d7ac761bfb7667dfab88b31712e2061a46258 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -96,6 +96,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/patches/server/0020-Optimize-TileEntity-load-unload.patch b/patches/server/0020-Optimize-TileEntity-load-unload.patch index d7c574b9..69d53a1d 100644 --- a/patches/server/0020-Optimize-TileEntity-load-unload.patch +++ b/patches/server/0020-Optimize-TileEntity-load-unload.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity load/unload diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5b45051af00b823e7bbfd9407f2ff66539583863..de7ca87e74084c5cca109a6eff071da351dec91b 100644 +index 107d7ac761bfb7667dfab88b31712e2061a46258..95b9663e072991004904365cfc2ba11edb01de20 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -42,8 +42,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/patches/server/0063-Use-faster-random-implementation.patch b/patches/server/0063-Use-faster-random-implementation.patch index f92b0387..4d0b3d01 100644 --- a/patches/server/0063-Use-faster-random-implementation.patch +++ b/patches/server/0063-Use-faster-random-implementation.patch @@ -245,7 +245,7 @@ index f0fdfd6891e59891e7370a2d682b65c647b28e9e..8d5fe0880f4f2bffe14dc1c7163cde69 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index de7ca87e74084c5cca109a6eff071da351dec91b..84fb0492abca5a2443e89adc18b3fa17c636054f 100644 +index 95b9663e072991004904365cfc2ba11edb01de20..c63d728082e28c13bc9724e74b154d02fbb2392e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -48,13 +48,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/patches/server/0064-Tile-Entity-optimizations.patch b/patches/server/0064-Tile-Entity-optimizations.patch index eca2fbcb..688c07a5 100644 --- a/patches/server/0064-Tile-Entity-optimizations.patch +++ b/patches/server/0064-Tile-Entity-optimizations.patch @@ -30,7 +30,7 @@ index c9066cb5f51cb2ad078aca3019e1df557062d286..46b18b6364645106b00bd4f1d721b8cd this.l = this.k; EntityHuman entityhuman = this.world.a((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D, 3.0D, false); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 84fb0492abca5a2443e89adc18b3fa17c636054f..8aa734e1bf8cca717d6b079458f328d19599a505 100644 +index c63d728082e28c13bc9724e74b154d02fbb2392e..2fedaf62905445fe91fd627420cfca337b8d37a7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -917,13 +917,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/patches/server/0065-Do-not-update-distance-map-when-animal-and-mob-spawn.patch b/patches/server/0065-Do-not-update-distance-map-when-animal-and-mob-spawn.patch index 08df2c30..0c65d9eb 100644 --- a/patches/server/0065-Do-not-update-distance-map-when-animal-and-mob-spawn.patch +++ b/patches/server/0065-Do-not-update-distance-map-when-animal-and-mob-spawn.patch @@ -9,10 +9,10 @@ Licensed under Bukkit and CraftBukkit's original license, GPLv3 The following patch should be treated as it is licensed in GPLv3 diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 7e9da788bc6d2ca0047f09cffed84ceffccb31fb..9612e572971b816476b23255dc3e2c8f967ff791 100644 +index 84429f12d0c6e0990b7cbb1b503b7868b3a02b14..f04a5a526748f913e885b673dda793e5bb16c1b7 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -1028,7 +1028,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -982,7 +982,7 @@ public class ChunkProviderServer extends IChunkProvider { int l = this.chunkMapDistance.b(); // Paper start - per player mob spawning SpawnerCreature.d spawnercreature_d; // moved down