diff --git a/patches/server/0005-Leaves-Server-Config-And-Command.patch b/patches/server/0005-Leaves-Server-Config-And-Command.patch index 44bb01f0..d4a7a39e 100644 --- a/patches/server/0005-Leaves-Server-Config-And-Command.patch +++ b/patches/server/0005-Leaves-Server-Config-And-Command.patch @@ -131,10 +131,10 @@ index e815dc2a36343925150c3bcb3a0ef6fded1bc955..afe922d39eeacc7916862a3287a9e97e .withRequiredArg() diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..bb6a781eee54f7d4906c211d5af98921225436e9 +index 0000000000000000000000000000000000000000..a1ca90ea40b4ccd8df290f8cc34d63d390acc87c --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -0,0 +1,1054 @@ +@@ -0,0 +1,1059 @@ +package top.leavesmc.leaves; + +import com.destroystokyo.paper.util.SneakyThrow; @@ -1014,6 +1014,11 @@ index 0000000000000000000000000000000000000000..bb6a781eee54f7d4906c211d5af98921 + copperBulb1gt = getBoolean("settings.modify.minecraft-old.copper-bulb-1gt-delay", copperBulb1gt); + } + ++ public static boolean crafter1gt = false; ++ private static void crafter1gt() { ++ crafter1gt = getBoolean("settings.modify.minecraft-old.crafter-1gt-delay", crafter1gt); ++ } ++ + public static final class WorldConfig { + + public final String worldName; diff --git a/patches/server/0010-Fakeplayer-support.patch b/patches/server/0010-Fakeplayer-support.patch index 754f771a..d5e2228f 100644 --- a/patches/server/0010-Fakeplayer-support.patch +++ b/patches/server/0010-Fakeplayer-support.patch @@ -433,7 +433,7 @@ index 74ff54724626908a083063c54983e0adfbbf7749..7afc1618f2014df67ca42f00c09e863c * The start ID for the counter. */ diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index bb6a781eee54f7d4906c211d5af98921225436e9..2b1c7039aff4102b092e587a2f6ffa27b75748b9 100644 +index a1ca90ea40b4ccd8df290f8cc34d63d390acc87c..ae21d3e873b22849cc2f02444624d150e9e3868d 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -8,6 +8,9 @@ import org.bukkit.command.Command; diff --git a/patches/server/0019-Optimize-mob-spawning.patch b/patches/server/0019-Optimize-mob-spawning.patch index e69dd43e..026d36fe 100644 --- a/patches/server/0019-Optimize-mob-spawning.patch +++ b/patches/server/0019-Optimize-mob-spawning.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize mob spawning This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 2b1c7039aff4102b092e587a2f6ffa27b75748b9..eef823bb4a2dc572a1053e5ec2ce0979e6678052 100644 +index ae21d3e873b22849cc2f02444624d150e9e3868d..d5b4e98214f722e2709f542a1f5c3e19a8b1fabe 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -257,7 +257,7 @@ public final class LeavesConfig { diff --git a/patches/server/0021-Multithreaded-Tracker.patch b/patches/server/0021-Multithreaded-Tracker.patch index 12e5387e..d0d8aadc 100644 --- a/patches/server/0021-Multithreaded-Tracker.patch +++ b/patches/server/0021-Multithreaded-Tracker.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Multithreaded Tracker This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index eef823bb4a2dc572a1053e5ec2ce0979e6678052..bd1352e2849f9836cd4fbdf4e4868426b5a01822 100644 +index d5b4e98214f722e2709f542a1f5c3e19a8b1fabe..51295f0c5ee66a59a9847c4a4d4a7070fc17f62e 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -271,7 +271,7 @@ public final class LeavesConfig { diff --git a/patches/server/0036-Async-Pathfinding.patch b/patches/server/0036-Async-Pathfinding.patch index 1c6e56f2..7c89ada5 100644 --- a/patches/server/0036-Async-Pathfinding.patch +++ b/patches/server/0036-Async-Pathfinding.patch @@ -7,7 +7,7 @@ This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) But Pufferfish patch was ported downstream from the Petal fork diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index bd1352e2849f9836cd4fbdf4e4868426b5a01822..041339f9470bfa48fea686ce27dc6340fd99e60f 100644 +index 51295f0c5ee66a59a9847c4a4d4a7070fc17f62e..3c66bd015c493ab971c12be8e134fdaa13daa935 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -372,7 +372,7 @@ public final class LeavesConfig { diff --git a/patches/server/0051-MC-Technical-Survival-Mode.patch b/patches/server/0051-MC-Technical-Survival-Mode.patch index e0c21c40..c052fde5 100644 --- a/patches/server/0051-MC-Technical-Survival-Mode.patch +++ b/patches/server/0051-MC-Technical-Survival-Mode.patch @@ -96,7 +96,7 @@ index 5eded2322d604c3a304194926a740818631f36de..797725f7472ed36bf5a1369a7dfe600a entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { continue; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 041339f9470bfa48fea686ce27dc6340fd99e60f..dd8c222661a7facb6f9cd64e19676cfe4eee50a6 100644 +index 3c66bd015c493ab971c12be8e134fdaa13daa935..4c9793761cdb6fabddd939d1d9d20bf43e977b8e 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -2,6 +2,7 @@ package top.leavesmc.leaves; diff --git a/patches/server/0055-Leaves-Extra-Yggdrasil-Service.patch b/patches/server/0055-Leaves-Extra-Yggdrasil-Service.patch index 048845d6..0775c074 100644 --- a/patches/server/0055-Leaves-Extra-Yggdrasil-Service.patch +++ b/patches/server/0055-Leaves-Extra-Yggdrasil-Service.patch @@ -57,7 +57,7 @@ index 89a50e07bc79cb0d5353f5a06fa037f3942c5940..760b1fb833fea279062965002686b57f public final Thread serverThread; private long nextTickTimeNanos; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index dd8c222661a7facb6f9cd64e19676cfe4eee50a6..94beb47e3ebc5dca07b388ee856c1bfe820e2174 100644 +index 4c9793761cdb6fabddd939d1d9d20bf43e977b8e..6f08cdecbc1175ca2808a4d798252b91341c88eb 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -11,6 +11,7 @@ import org.bukkit.configuration.file.YamlConfiguration; diff --git a/patches/server/0060-Syncmatica-Protocol.patch b/patches/server/0060-Syncmatica-Protocol.patch index e3b3a096..12111ad8 100644 --- a/patches/server/0060-Syncmatica-Protocol.patch +++ b/patches/server/0060-Syncmatica-Protocol.patch @@ -27,7 +27,7 @@ index 68cc14ef2176dd20ede46af3d62ef0797169b87e..507285757ed8c3997748647947b16b7d public void tick() { if (this.ackBlockChangesUpTo > -1) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 94beb47e3ebc5dca07b388ee856c1bfe820e2174..794dac1e308fc73eae3568daae7f87bb3fe2b7ca 100644 +index 6f08cdecbc1175ca2808a4d798252b91341c88eb..9214b89a27b2f922971c58f3e49058ea9887959c 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -12,6 +12,7 @@ import top.leavesmc.leaves.command.LeavesCommand; diff --git a/patches/server/0067-Leaves-carpet-support.patch b/patches/server/0067-Leaves-carpet-support.patch index 58d4dc21..0ab83146 100644 --- a/patches/server/0067-Leaves-carpet-support.patch +++ b/patches/server/0067-Leaves-carpet-support.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Leaves carpet support diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 794dac1e308fc73eae3568daae7f87bb3fe2b7ca..f671a22f032a0f0a72045c62c9e6cadf24cdd4cb 100644 +index 9214b89a27b2f922971c58f3e49058ea9887959c..d9a11d6228f3ea86705503d394e6632deda8e1ef 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -14,6 +14,8 @@ import top.leavesmc.leaves.bot.agent.Actions; diff --git a/patches/server/0077-No-block-update-command.patch b/patches/server/0077-No-block-update-command.patch index aa7d77ad..12cabefa 100644 --- a/patches/server/0077-No-block-update-command.patch +++ b/patches/server/0077-No-block-update-command.patch @@ -92,7 +92,7 @@ index 2708251ebc1995e71fb0e5dca9e158a3005f8a8a..e28351b379677fec356b6efec2d882ee } } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index f671a22f032a0f0a72045c62c9e6cadf24cdd4cb..9c4305131f88c55c3d0bdab3243905f1635fb614 100644 +index d9a11d6228f3ea86705503d394e6632deda8e1ef..d90a36e1a512842dc322787cc767239a34e895af 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -11,6 +11,7 @@ import org.bukkit.configuration.file.YamlConfiguration; diff --git a/patches/server/0080-Bladeren-Protocol.patch b/patches/server/0080-Bladeren-Protocol.patch index c9bb5874..f2ab8010 100644 --- a/patches/server/0080-Bladeren-Protocol.patch +++ b/patches/server/0080-Bladeren-Protocol.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bladeren Protocol diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 9c4305131f88c55c3d0bdab3243905f1635fb614..b4545a591ef311154befd6e9bcc5e5e962335622 100644 +index d90a36e1a512842dc322787cc767239a34e895af..73a951413c1518895bf8a0efb6267ba4c57d71e9 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -17,6 +17,8 @@ import top.leavesmc.leaves.protocol.syncmatica.SyncmaticaProtocol; diff --git a/patches/server/0110-Add-Leaves-Auto-Update.patch b/patches/server/0110-Add-Leaves-Auto-Update.patch index 4b75a65e..72717cb1 100644 --- a/patches/server/0110-Add-Leaves-Auto-Update.patch +++ b/patches/server/0110-Add-Leaves-Auto-Update.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Leaves Auto Update diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index b4545a591ef311154befd6e9bcc5e5e962335622..d7273e0a8a624624dbaacef6e78f5d6d104ee1e4 100644 +index 73a951413c1518895bf8a0efb6267ba4c57d71e9..f0caa9a182b1fe2a1b1e0a02c878afc0e61771a1 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -17,6 +17,7 @@ import top.leavesmc.leaves.protocol.syncmatica.SyncmaticaProtocol; diff --git a/patches/server/0121-Villager-infinite-discounts.patch b/patches/server/0121-Villager-infinite-discounts.patch index f20f4309..6162f971 100644 --- a/patches/server/0121-Villager-infinite-discounts.patch +++ b/patches/server/0121-Villager-infinite-discounts.patch @@ -21,7 +21,7 @@ index c3d1d7b525a6f2b708144ebe9bc28dfadcfe11fa..55b4386fc57286548161f9ee91e19e22 private GossipType(String key, int multiplier, int maxReputation, int decay, int shareDecrement) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index d7273e0a8a624624dbaacef6e78f5d6d104ee1e4..c48de652b97c8f124ff405b116c02f0e37acfb9e 100644 +index f0caa9a182b1fe2a1b1e0a02c878afc0e61771a1..13a723e03fad5d9c65c49beec879ba06bdc598e4 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -20,6 +20,7 @@ import top.leavesmc.leaves.protocol.CarpetServerProtocol.CarpetRules; diff --git a/patches/server/0128-Crafter-1-gt-delay.patch b/patches/server/0128-Crafter-1-gt-delay.patch new file mode 100644 index 00000000..736b3c5e --- /dev/null +++ b/patches/server/0128-Crafter-1-gt-delay.patch @@ -0,0 +1,45 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: violetc <58360096+s-yh-china@users.noreply.github.com> +Date: Tue, 12 Dec 2023 14:15:54 +0800 +Subject: [PATCH] Crafter 1 gt delay + + +diff --git a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java +index 5afac5007bbd2010bb955eea6331875b52441b80..39072e41f640b6284813bac71fc9154982f31ee9 100644 +--- a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java +@@ -75,7 +75,7 @@ public class CrafterBlock extends BaseEntityBlock { + boolean bl2 = state.getValue(TRIGGERED); + BlockEntity blockEntity = world.getBlockEntity(pos); + if (bl && !bl2) { +- world.scheduleTick(pos, this, 4); ++ world.scheduleTick(pos, this, !top.leavesmc.leaves.LeavesConfig.crafter1gt ? 4 : 1); // Leaves - crafter 1 gt delay + world.setBlock(pos, state.setValue(TRIGGERED, Boolean.valueOf(true)), 2); + this.setBlockEntityTriggered(blockEntity, true); + } else if (!bl && bl2) { +@@ -146,7 +146,7 @@ public class CrafterBlock extends BaseEntityBlock { + } + + if (state.getValue(TRIGGERED)) { +- world.scheduleTick(pos, this, 4); ++ world.scheduleTick(pos, this, !top.leavesmc.leaves.LeavesConfig.crafter1gt ? 4 : 1); // Leaves - crafter 1 gt delay + } + + } +@@ -174,13 +174,13 @@ public class CrafterBlock extends BaseEntityBlock { + protected void dispenseFrom(BlockState state, ServerLevel world, BlockPos pos) { + BlockEntity optional = world.getBlockEntity(pos); + if (optional instanceof CrafterBlockEntity crafterBlockEntity) { +- Optional optional = getPotentialResults(world, crafterBlockEntity); +- if (optional.isEmpty()) { ++ Optional optional1 = getPotentialResults(world, crafterBlockEntity); ++ if (optional1.isEmpty()) { + world.levelEvent(1050, pos, 0); + } else { + crafterBlockEntity.setCraftingTicksRemaining(6); + world.setBlock(pos, state.setValue(CRAFTING, Boolean.valueOf(true)), 2); +- CraftingRecipe craftingRecipe = optional.get(); ++ CraftingRecipe craftingRecipe = optional1.get(); + ItemStack itemStack = craftingRecipe.assemble(crafterBlockEntity, world.registryAccess()); + itemStack.onCraftedBySystem(world); + this.dispenseItem(world, pos, crafterBlockEntity, itemStack, state);