diff --git a/patches/server/0002-Vine-Config.patch b/patches/server/0002-Vine-Config.patch index f8f45f9..f09cc3c 100644 --- a/patches/server/0002-Vine-Config.patch +++ b/patches/server/0002-Vine-Config.patch @@ -154,10 +154,10 @@ index 0000000000000000000000000000000000000000..6feb7269907d2c88a9eb5b52204e55c1 \ No newline at end of file diff --git a/src/main/kotlin/one/tranic/vine/config/VineConfig.kt b/src/main/kotlin/one/tranic/vine/config/VineConfig.kt new file mode 100644 -index 0000000000000000000000000000000000000000..53d7f099183f1b9760807e917f9ee44030891b79 +index 0000000000000000000000000000000000000000..08c0b1b53bc675e293fb1cd8d150528a20a6f9ef --- /dev/null +++ b/src/main/kotlin/one/tranic/vine/config/VineConfig.kt -@@ -0,0 +1,311 @@ +@@ -0,0 +1,329 @@ +package one.tranic.vine.config + +import gg.pufferfish.pufferfish.simd.SIMDDetection @@ -278,6 +278,14 @@ index 0000000000000000000000000000000000000000..53d7f099183f1b9760807e917f9ee440 + "Whether to print detailed information to the console when this issue is triggered" + ) + ++ addDefault( ++ "feature.dont-save-entity.primed-tnt", false, listOf( ++ "Disable save primed tnt on chunk unloads.", ++ "Useful for redstone server, can prevent machine be exploded by TNT,", ++ "when player disconnected caused by Internet issue." ++ ) ++ ) ++ addDefault("feature.dont-save-entity.falling-block", false) + addDefault("feature.zero-tick-plants", false) + addDefault("feature.disable-spark", true) + addDefault( @@ -340,6 +348,8 @@ index 0000000000000000000000000000000000000000..53d7f099183f1b9760807e917f9ee440 + Feature.zeroTickPlants = getBoolean("feature.zero-tick-plants") + Feature.disableSpark = getBoolean("feature.disable-spark") + Feature.flattenTriangularDistribution = getBoolean("feature.flatten-triangular-distribution") ++ Feature.DSE.primedTNT = getBoolean("feature.dont-save-entity.primed-tnt") ++ Feature.DSE.fallingBlock = getBoolean("feature.dont-save-entity.falling-block") + + getBoolean("feature.secure-seed") { + if (isSecureSeed == null) { @@ -443,6 +453,14 @@ index 0000000000000000000000000000000000000000..53d7f099183f1b9760807e917f9ee440 + + @JvmField + var disableSpark = true ++ ++ object DSE { ++ @JvmField ++ var primedTNT = false ++ ++ @JvmField ++ var fallingBlock = false ++ } + } + + object Optimize { diff --git a/patches/server/0006-Leaf-Don-t-save-primed-tnt-entity.patch b/patches/server/0006-Leaf-Don-t-save-primed-tnt-entity.patch new file mode 100644 index 0000000..b4bfea8 --- /dev/null +++ b/patches/server/0006-Leaf-Don-t-save-primed-tnt-entity.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: 404Setup <153366651+404Setup@users.noreply.github.com> +Date: Fri, 9 Aug 2024 09:34:17 +0800 +Subject: [PATCH] Leaf: Don't save primed tnt entity + +You can find the original code on https://github.com/Winds-Studio/Leaf + +diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +index de8fd467abdc826d21179084a5669bd97c03850d..6290f60a5d0d57d95752e24e7a185b9c62db8757 100644 +--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java ++++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +@@ -219,4 +219,11 @@ public class PrimedTnt extends Entity implements TraceableEntity { + return super.interact(player, hand); + } + // Purpur end - Shears can defuse TNT ++ ++ // Leaf start - PMC - Don't save primed tnt entity ++ @Override ++ public boolean shouldBeSaved() { ++ return !one.tranic.vine.config.VineConfig.Feature.DSE.primedTNT && super.shouldBeSaved(); ++ } ++ // Leaf - PMC - Don't save primed tnt entity + } diff --git a/patches/server/0006-Skip-empty-events.patch b/patches/server/0007-Skip-empty-events.patch similarity index 100% rename from patches/server/0006-Skip-empty-events.patch rename to patches/server/0007-Skip-empty-events.patch diff --git a/patches/server/0007-Pufferfish-Move-ThreadUnsafeRandom-Initialization.patch b/patches/server/0008-Pufferfish-Move-ThreadUnsafeRandom-Initialization.patch similarity index 100% rename from patches/server/0007-Pufferfish-Move-ThreadUnsafeRandom-Initialization.patch rename to patches/server/0008-Pufferfish-Move-ThreadUnsafeRandom-Initialization.patch diff --git a/patches/server/0008-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch b/patches/server/0009-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch similarity index 100% rename from patches/server/0008-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch rename to patches/server/0009-Pufferfish-Only-check-for-spooky-season-once-an-hour.patch diff --git a/patches/server/0009-Pufferfish-Optimize-entity-coordinate-key.patch b/patches/server/0010-Pufferfish-Optimize-entity-coordinate-key.patch similarity index 100% rename from patches/server/0009-Pufferfish-Optimize-entity-coordinate-key.patch rename to patches/server/0010-Pufferfish-Optimize-entity-coordinate-key.patch diff --git a/patches/server/0010-Pufferfish-Optimize-suffocation.patch b/patches/server/0011-Pufferfish-Optimize-suffocation.patch similarity index 100% rename from patches/server/0010-Pufferfish-Optimize-suffocation.patch rename to patches/server/0011-Pufferfish-Optimize-suffocation.patch diff --git a/patches/server/0011-Pufferfish-Improve-container-checking-with-a-bitset.patch b/patches/server/0012-Pufferfish-Improve-container-checking-with-a-bitset.patch similarity index 100% rename from patches/server/0011-Pufferfish-Improve-container-checking-with-a-bitset.patch rename to patches/server/0012-Pufferfish-Improve-container-checking-with-a-bitset.patch diff --git a/patches/server/0012-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch b/patches/server/0013-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch similarity index 100% rename from patches/server/0012-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch rename to patches/server/0013-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch diff --git a/patches/server/0013-Pufferfish-Reduce-projectile-chunk-loading.patch b/patches/server/0014-Pufferfish-Reduce-projectile-chunk-loading.patch similarity index 100% rename from patches/server/0013-Pufferfish-Reduce-projectile-chunk-loading.patch rename to patches/server/0014-Pufferfish-Reduce-projectile-chunk-loading.patch diff --git a/patches/server/0014-Pufferfish-Cache-climbing-check-for-activation.patch b/patches/server/0015-Pufferfish-Cache-climbing-check-for-activation.patch similarity index 100% rename from patches/server/0014-Pufferfish-Cache-climbing-check-for-activation.patch rename to patches/server/0015-Pufferfish-Cache-climbing-check-for-activation.patch diff --git a/patches/server/0015-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch b/patches/server/0016-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch similarity index 100% rename from patches/server/0015-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch rename to patches/server/0016-Pufferfish-Optimize-random-calls-in-chunk-ticking.patch diff --git a/patches/server/0016-Mobtimizations-RePathing-optimization.patch b/patches/server/0017-Mobtimizations-RePathing-optimization.patch similarity index 100% rename from patches/server/0016-Mobtimizations-RePathing-optimization.patch rename to patches/server/0017-Mobtimizations-RePathing-optimization.patch diff --git a/patches/server/0017-Mobtimizations-Optimization-Zombie-Search-And-Destro.patch b/patches/server/0018-Mobtimizations-Optimization-Zombie-Search-And-Destro.patch similarity index 100% rename from patches/server/0017-Mobtimizations-Optimization-Zombie-Search-And-Destro.patch rename to patches/server/0018-Mobtimizations-Optimization-Zombie-Search-And-Destro.patch diff --git a/patches/server/0018-Slice-Improve-map-saving-performance.patch b/patches/server/0019-Slice-Improve-map-saving-performance.patch similarity index 100% rename from patches/server/0018-Slice-Improve-map-saving-performance.patch rename to patches/server/0019-Slice-Improve-map-saving-performance.patch diff --git a/patches/server/0019-Divine-Implement-Secure-Seed.patch b/patches/server/0020-Divine-Implement-Secure-Seed.patch similarity index 100% rename from patches/server/0019-Divine-Implement-Secure-Seed.patch rename to patches/server/0020-Divine-Implement-Secure-Seed.patch diff --git a/patches/server/0020-Divine-Fix-MC-31819.patch b/patches/server/0021-Divine-Fix-MC-31819.patch similarity index 100% rename from patches/server/0020-Divine-Fix-MC-31819.patch rename to patches/server/0021-Divine-Fix-MC-31819.patch diff --git a/patches/server/0021-Divine-Fix-MC-172801.patch b/patches/server/0022-Divine-Fix-MC-172801.patch similarity index 100% rename from patches/server/0021-Divine-Fix-MC-172801.patch rename to patches/server/0022-Divine-Fix-MC-172801.patch diff --git a/patches/server/0022-Divine-Fix-MC-2025.patch b/patches/server/0023-Divine-Fix-MC-2025.patch similarity index 100% rename from patches/server/0022-Divine-Fix-MC-2025.patch rename to patches/server/0023-Divine-Fix-MC-2025.patch diff --git a/patches/server/0023-Divine-C2ME-reduce_allocs.patch b/patches/server/0024-Divine-C2ME-reduce_allocs.patch similarity index 100% rename from patches/server/0023-Divine-C2ME-reduce_allocs.patch rename to patches/server/0024-Divine-C2ME-reduce_allocs.patch diff --git a/patches/server/0024-Divine-C2ME-opts-math.patch b/patches/server/0025-Divine-C2ME-opts-math.patch similarity index 100% rename from patches/server/0024-Divine-C2ME-opts-math.patch rename to patches/server/0025-Divine-C2ME-opts-math.patch diff --git a/patches/server/0025-Divine-Fix-MC-7569.patch b/patches/server/0026-Divine-Fix-MC-7569.patch similarity index 100% rename from patches/server/0025-Divine-Fix-MC-7569.patch rename to patches/server/0026-Divine-Fix-MC-7569.patch diff --git a/patches/server/0026-Divine-lithium-math.sine_lut.patch b/patches/server/0027-Divine-lithium-math.sine_lut.patch similarity index 100% rename from patches/server/0026-Divine-lithium-math.sine_lut.patch rename to patches/server/0027-Divine-lithium-math.sine_lut.patch diff --git a/patches/server/0027-Divine-lithium-cached_hashcode.patch b/patches/server/0028-Divine-lithium-cached_hashcode.patch similarity index 100% rename from patches/server/0027-Divine-lithium-cached_hashcode.patch rename to patches/server/0028-Divine-lithium-cached_hashcode.patch diff --git a/patches/server/0028-Divine-Fix-MC-93826.patch b/patches/server/0029-Divine-Fix-MC-93826.patch similarity index 100% rename from patches/server/0028-Divine-Fix-MC-93826.patch rename to patches/server/0029-Divine-Fix-MC-93826.patch diff --git a/patches/server/0029-Divine-Fix-MC-110386.patch b/patches/server/0030-Divine-Fix-MC-110386.patch similarity index 100% rename from patches/server/0029-Divine-Fix-MC-110386.patch rename to patches/server/0030-Divine-Fix-MC-110386.patch diff --git a/patches/server/0030-Divine-Fix-MC-98160-and-MC-105103.patch b/patches/server/0031-Divine-Fix-MC-98160-and-MC-105103.patch similarity index 100% rename from patches/server/0030-Divine-Fix-MC-98160-and-MC-105103.patch rename to patches/server/0031-Divine-Fix-MC-98160-and-MC-105103.patch diff --git a/patches/server/0031-Divine-Fix-MC-93018.patch b/patches/server/0032-Divine-Fix-MC-93018.patch similarity index 100% rename from patches/server/0031-Divine-Fix-MC-93018.patch rename to patches/server/0032-Divine-Fix-MC-93018.patch diff --git a/patches/server/0032-Canvas-Optimize-Math.round-and-Math.hypot.patch b/patches/server/0033-Canvas-Optimize-Math.round-and-Math.hypot.patch similarity index 100% rename from patches/server/0032-Canvas-Optimize-Math.round-and-Math.hypot.patch rename to patches/server/0033-Canvas-Optimize-Math.round-and-Math.hypot.patch diff --git a/patches/server/0033-Folia-Sync-vehicle-position-to-player-position-on-pl.patch b/patches/server/0034-Folia-Sync-vehicle-position-to-player-position-on-pl.patch similarity index 100% rename from patches/server/0033-Folia-Sync-vehicle-position-to-player-position-on-pl.patch rename to patches/server/0034-Folia-Sync-vehicle-position-to-player-position-on-pl.patch diff --git a/patches/server/0034-MemoryLeakFix-Biome.patch b/patches/server/0035-MemoryLeakFix-Biome.patch similarity index 100% rename from patches/server/0034-MemoryLeakFix-Biome.patch rename to patches/server/0035-MemoryLeakFix-Biome.patch diff --git a/patches/server/0035-Airplane-Improve-fluid-direction-caching.patch b/patches/server/0036-Airplane-Improve-fluid-direction-caching.patch similarity index 100% rename from patches/server/0035-Airplane-Improve-fluid-direction-caching.patch rename to patches/server/0036-Airplane-Improve-fluid-direction-caching.patch diff --git a/patches/server/0036-Canvas-Dont-load-chunks-to-spawn-phantoms.patch b/patches/server/0037-Canvas-Dont-load-chunks-to-spawn-phantoms.patch similarity index 100% rename from patches/server/0036-Canvas-Dont-load-chunks-to-spawn-phantoms.patch rename to patches/server/0037-Canvas-Dont-load-chunks-to-spawn-phantoms.patch diff --git a/patches/server/0037-Reduce-chunk-loading-lookups.patch b/patches/server/0038-Reduce-chunk-loading-lookups.patch similarity index 100% rename from patches/server/0037-Reduce-chunk-loading-lookups.patch rename to patches/server/0038-Reduce-chunk-loading-lookups.patch diff --git a/patches/server/0038-The-anvil-becomes-a-drop-at-Y0.patch b/patches/server/0039-The-anvil-becomes-a-drop-at-Y0.patch similarity index 100% rename from patches/server/0038-The-anvil-becomes-a-drop-at-Y0.patch rename to patches/server/0039-The-anvil-becomes-a-drop-at-Y0.patch diff --git a/patches/server/0039-CarpetFix-incorrectBounceLogicFix.patch b/patches/server/0040-CarpetFix-incorrectBounceLogicFix.patch similarity index 100% rename from patches/server/0039-CarpetFix-incorrectBounceLogicFix.patch rename to patches/server/0040-CarpetFix-incorrectBounceLogicFix.patch diff --git a/patches/server/0040-CarpetFix-explosionBreaksItemFrameInWaterFix.patch b/patches/server/0041-CarpetFix-explosionBreaksItemFrameInWaterFix.patch similarity index 100% rename from patches/server/0040-CarpetFix-explosionBreaksItemFrameInWaterFix.patch rename to patches/server/0041-CarpetFix-explosionBreaksItemFrameInWaterFix.patch diff --git a/patches/server/0041-Carpet-TIS-Addition-Random-flatten-triangular-distri.patch b/patches/server/0042-Carpet-TIS-Addition-Random-flatten-triangular-distri.patch similarity index 100% rename from patches/server/0041-Carpet-TIS-Addition-Random-flatten-triangular-distri.patch rename to patches/server/0042-Carpet-TIS-Addition-Random-flatten-triangular-distri.patch diff --git a/patches/server/0042-Skip-distanceToSqr-call-in-ServerEntity-sendChanges-.patch b/patches/server/0043-Skip-distanceToSqr-call-in-ServerEntity-sendChanges-.patch similarity index 100% rename from patches/server/0042-Skip-distanceToSqr-call-in-ServerEntity-sendChanges-.patch rename to patches/server/0043-Skip-distanceToSqr-call-in-ServerEntity-sendChanges-.patch diff --git a/patches/server/0043-Leaves-Zero-tick-plants.patch b/patches/server/0044-Leaves-Zero-tick-plants.patch similarity index 100% rename from patches/server/0043-Leaves-Zero-tick-plants.patch rename to patches/server/0044-Leaves-Zero-tick-plants.patch diff --git a/patches/server/0044-disable-spark.patch b/patches/server/0045-disable-spark.patch similarity index 100% rename from patches/server/0044-disable-spark.patch rename to patches/server/0045-disable-spark.patch diff --git a/patches/server/0045-ScalableLux-Upstream-Starlight-Fix.patch b/patches/server/0046-ScalableLux-Upstream-Starlight-Fix.patch similarity index 100% rename from patches/server/0045-ScalableLux-Upstream-Starlight-Fix.patch rename to patches/server/0046-ScalableLux-Upstream-Starlight-Fix.patch