diff --git a/patches/server/0002-SparklyPaper-config-files.patch b/patches/server/0002-SparklyPaper-config-files.patch index 08cebee..b21704c 100644 --- a/patches/server/0002-SparklyPaper-config-files.patch +++ b/patches/server/0002-SparklyPaper-config-files.patch @@ -225,10 +225,10 @@ index 0000000000000000000000000000000000000000..6398c7b40ba82ffc8588eca458ce92c2 \ No newline at end of file diff --git a/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperConfigUtils.kt b/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperConfigUtils.kt new file mode 100644 -index 0000000000000000000000000000000000000000..8b78f0e8b1de1a6a2506e686be9d71ced72352dd +index 0000000000000000000000000000000000000000..da04a39bbdbb98d4b0725e9c23b1cbab6c7079a5 --- /dev/null +++ b/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperConfigUtils.kt -@@ -0,0 +1,61 @@ +@@ -0,0 +1,64 @@ +package net.sparklypower.sparklypaper.configs + +import com.charleskorn.kaml.Yaml @@ -266,6 +266,9 @@ index 0000000000000000000000000000000000000000..8b78f0e8b1de1a6a2506e686be9d71ce + defaultGrowthSpeed = 1.0f, + moistGrowthSpeed = 5.0f, + skipMiddleAgingStagesForCrops = true ++ ), ++ SparklyPaperWorldConfig.TicksPer( ++ hopperCooldownWhenTargetContainerIsFull = 0 + ) + ) + ) @@ -293,10 +296,10 @@ index 0000000000000000000000000000000000000000..8b78f0e8b1de1a6a2506e686be9d71ce \ No newline at end of file diff --git a/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperWorldConfig.kt b/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperWorldConfig.kt new file mode 100644 -index 0000000000000000000000000000000000000000..0909362629aa4f6cdfd4052b4b1dc847cbdb57d8 +index 0000000000000000000000000000000000000000..00d8f4104a55ce84483b3d81350f8c21d2d6d7f0 --- /dev/null +++ b/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperWorldConfig.kt -@@ -0,0 +1,23 @@ +@@ -0,0 +1,31 @@ +package net.sparklypower.sparklypaper.configs + +import kotlinx.serialization.SerialName @@ -308,6 +311,8 @@ index 0000000000000000000000000000000000000000..0909362629aa4f6cdfd4052b4b1dc847 + val skipMapItemDataUpdatesIfMapDoesNotHaveCraftMapRenderer: Boolean, + @SerialName("blazingly-simple-farm-checks") + val blazinglySimpleFarmChecks: BlazinglySimpleFarmChecks, ++ @SerialName("ticks-per") ++ val ticksPer: TicksPer, +) { + @Serializable + data class BlazinglySimpleFarmChecks( @@ -319,5 +324,11 @@ index 0000000000000000000000000000000000000000..0909362629aa4f6cdfd4052b4b1dc847 + @SerialName("skip-middle-aging-stages-for-crops") + val skipMiddleAgingStagesForCrops: Boolean + ) ++ ++ @Serializable ++ data class TicksPer( ++ @SerialName("hopper-cooldown-when-target-container-is-full") ++ val hopperCooldownWhenTargetContainerIsFull: Int ++ ) +} \ No newline at end of file diff --git a/patches/server/0022-Allow-throttling-hopper-checks-if-the-target-contain.patch b/patches/server/0022-Allow-throttling-hopper-checks-if-the-target-contain.patch new file mode 100644 index 0000000..cdd94ad --- /dev/null +++ b/patches/server/0022-Allow-throttling-hopper-checks-if-the-target-contain.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MrPowerGamerBR +Date: Fri, 23 Aug 2024 16:20:45 -0300 +Subject: [PATCH] Allow throttling hopper checks if the target container is + full + + +diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +index cab403efd471bb61835224eea4e99570d34dcaaa..f074e9b9fbd7faf9502a83c1ed347f028a81021c 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +@@ -441,6 +441,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen + Direction enumdirection = blockEntity.facing.getOpposite(); + + if (HopperBlockEntity.isFullContainer(iinventory, enumdirection)) { ++ if (world.sparklyPaperConfig.getTicksPer().getHopperCooldownWhenTargetContainerIsFull() != 0) blockEntity.setCooldown(world.sparklyPaperConfig.getTicksPer().getHopperCooldownWhenTargetContainerIsFull()); // SparklyPaper - Allow throttling hopper checks if the target container is full + return false; + } else { + // Paper start - Perf: Optimize Hoppers diff --git a/patches/server/0022-Parallel-world-ticking.patch b/patches/server/0023-Parallel-world-ticking.patch similarity index 99% rename from patches/server/0022-Parallel-world-ticking.patch rename to patches/server/0023-Parallel-world-ticking.patch index 3709fc5..3004838 100644 --- a/patches/server/0022-Parallel-world-ticking.patch +++ b/patches/server/0023-Parallel-world-ticking.patch @@ -1697,7 +1697,7 @@ index 0000000000000000000000000000000000000000..9a40afbd7e5085179dc016c900ecb60e +} \ No newline at end of file diff --git a/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperConfigUtils.kt b/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperConfigUtils.kt -index 8b78f0e8b1de1a6a2506e686be9d71ced72352dd..ce608ca9640cdea0fe690ef61021355822284cf6 100644 +index da04a39bbdbb98d4b0725e9c23b1cbab6c7079a5..d35381d1fd657fb70418769a1ec453dd6bf74e99 100644 --- a/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperConfigUtils.kt +++ b/src/main/kotlin/net/sparklypower/sparklypaper/configs/SparklyPaperConfigUtils.kt @@ -17,6 +17,7 @@ object SparklyPaperConfigUtils { diff --git a/patches/server/0023-SPARKLYPOWER-Remap-SparklyPower-hacky-legacy-NBT-tag.patch b/patches/server/0024-SPARKLYPOWER-Remap-SparklyPower-hacky-legacy-NBT-tag.patch similarity index 100% rename from patches/server/0023-SPARKLYPOWER-Remap-SparklyPower-hacky-legacy-NBT-tag.patch rename to patches/server/0024-SPARKLYPOWER-Remap-SparklyPower-hacky-legacy-NBT-tag.patch diff --git a/patches/server/0024-SPARKLYPOWER-Add-custom-blocks.patch b/patches/server/0025-SPARKLYPOWER-Add-custom-blocks.patch similarity index 100% rename from patches/server/0024-SPARKLYPOWER-Add-custom-blocks.patch rename to patches/server/0025-SPARKLYPOWER-Add-custom-blocks.patch