diff --git a/patches/server/0005-Leaves-Server-Config-And-Command.patch b/patches/server/0005-Leaves-Server-Config-And-Command.patch index c554a34c..0bcee048 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 07b79c811727e8a26f7c34908e9b2a6eb2fbea9e..cfdad68eb410690f57fd4ebfb1c27082 .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..406aea18f2c54fbe9a5642c84be71a5a4dcc60f6 +index 0000000000000000000000000000000000000000..ce9855b560ee6602983b2d05c9f80902674f248f --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -0,0 +1,1042 @@ +@@ -0,0 +1,1047 @@ +package top.leavesmc.leaves; + +import com.destroystokyo.paper.util.SneakyThrow; @@ -1002,6 +1002,11 @@ index 0000000000000000000000000000000000000000..406aea18f2c54fbe9a5642c84be71a5a + disableMovedWronglyThreshold = getBoolean("settings.modify.disable-moved-wrongly-threshold", disableMovedWronglyThreshold); + } + ++ public static boolean armorStandCantKillByMobProjectile = false; ++ private static void armorStandCantKillByMobProjectile() { ++ armorStandCantKillByMobProjectile = getBoolean("settings.modify.minecraft-old.armor-stand-cant-kill-by-mob-projectile", armorStandCantKillByMobProjectile); ++ } ++ + 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 86632a35..855c7336 100644 --- a/patches/server/0010-Fakeplayer-support.patch +++ b/patches/server/0010-Fakeplayer-support.patch @@ -385,7 +385,7 @@ index e932cfac619c30b8c7444a9fa41e0403a6eadf6a..8818daa3e89fd5a5b0a0ea4069ccbf0f } // Water Animals diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 406aea18f2c54fbe9a5642c84be71a5a4dcc60f6..a771787615b350a10fb2261ed6f125007c8531ba 100644 +index ce9855b560ee6602983b2d05c9f80902674f248f..7963e2233d3ff3a511927109b5a35f511dcca2a6 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 ba455058..65aa6b00 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 a771787615b350a10fb2261ed6f125007c8531ba..5fc621ab152c8865ce0c4519f890dd1ee7ce1a3c 100644 +index 7963e2233d3ff3a511927109b5a35f511dcca2a6..c6f0a6e9c6fa5706e514e054e393a080dddeb8e2 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -255,7 +255,7 @@ public final class LeavesConfig { diff --git a/patches/server/0021-Multithreaded-Tracker.patch b/patches/server/0021-Multithreaded-Tracker.patch index f3e82467..beb67d77 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 5fc621ab152c8865ce0c4519f890dd1ee7ce1a3c..2b94f3e3aa60b259721536f5b3bb47191df5ad92 100644 +index c6f0a6e9c6fa5706e514e054e393a080dddeb8e2..67e85a55e2a58848d0a9a253fd40ae559f7eb532 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -269,7 +269,7 @@ public final class LeavesConfig { diff --git a/patches/server/0036-Async-Pathfinding.patch b/patches/server/0036-Async-Pathfinding.patch index ab71a573..f81ce168 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 2b94f3e3aa60b259721536f5b3bb47191df5ad92..c2edeaaaae99e73edea11276c50e0dad3e4d3790 100644 +index 67e85a55e2a58848d0a9a253fd40ae559f7eb532..d0c7d3883723bcc0c4753170ddff766ef908250e 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -370,7 +370,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 ec3ae178..b064d43c 100644 --- a/patches/server/0051-MC-Technical-Survival-Mode.patch +++ b/patches/server/0051-MC-Technical-Survival-Mode.patch @@ -109,7 +109,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 c2edeaaaae99e73edea11276c50e0dad3e4d3790..77d10a2a7a62f122cabc6dbcf959d5425eadc884 100644 +index d0c7d3883723bcc0c4753170ddff766ef908250e..b5065d533c4fa0610bf936e036dc0d5ba37f63cf 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 a31ad6bb..bd98bb5b 100644 --- a/patches/server/0055-Leaves-Extra-Yggdrasil-Service.patch +++ b/patches/server/0055-Leaves-Extra-Yggdrasil-Service.patch @@ -57,7 +57,7 @@ index 3f4b4d905ff440eaf4a66b10ad85933c0b07dc58..7dec27260fce938f5d1e5c437f564ed9 public final Thread serverThread; private long nextTickTime; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 77d10a2a7a62f122cabc6dbcf959d5425eadc884..eb4ef06074fabbf7ece7fbd49b466ba63e6ab001 100644 +index b5065d533c4fa0610bf936e036dc0d5ba37f63cf..db6b7ff06bf646aa50afadc354b381821cb5b1a9 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/0066-Leaves-carpet-support.patch b/patches/server/0066-Leaves-carpet-support.patch index 4acff95c..89f4e81a 100644 --- a/patches/server/0066-Leaves-carpet-support.patch +++ b/patches/server/0066-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 eb4ef06074fabbf7ece7fbd49b466ba63e6ab001..55e443a95fa85a137fb6388900084ad590a550cb 100644 +index db6b7ff06bf646aa50afadc354b381821cb5b1a9..af17de2dcadcfe3b0706c8c04fc804c520d1e83d 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -13,6 +13,8 @@ import top.leavesmc.leaves.bot.BotCommand; diff --git a/patches/server/0076-No-block-update-command.patch b/patches/server/0076-No-block-update-command.patch index 2ff9040b..5e55e7c4 100644 --- a/patches/server/0076-No-block-update-command.patch +++ b/patches/server/0076-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 55e443a95fa85a137fb6388900084ad590a550cb..0e445c2cbf3b590a14b01023401d8f4e87a3a182 100644 +index af17de2dcadcfe3b0706c8c04fc804c520d1e83d..3b8db2215f3000cd091a5c363ac4f25c01ddc26e 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/0079-Bladeren-Protocol.patch b/patches/server/0079-Bladeren-Protocol.patch index e6574dc9..b516f5b7 100644 --- a/patches/server/0079-Bladeren-Protocol.patch +++ b/patches/server/0079-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 0e445c2cbf3b590a14b01023401d8f4e87a3a182..9a0e70e22116054224509fa87d8194032ed3dfb7 100644 +index 3b8db2215f3000cd091a5c363ac4f25c01ddc26e..2c3becfa0e540ce1ae5a1357201666bbf3df665f 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -16,6 +16,8 @@ import top.leavesmc.leaves.profile.LeavesMinecraftSessionService; diff --git a/patches/server/0109-Add-Leaves-Auto-Update.patch b/patches/server/0109-Add-Leaves-Auto-Update.patch index a8f9a4e9..8eb77d01 100644 --- a/patches/server/0109-Add-Leaves-Auto-Update.patch +++ b/patches/server/0109-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 9a0e70e22116054224509fa87d8194032ed3dfb7..e89b4a9e87dcba180905ce0640d86bd621e48898 100644 +index 2c3becfa0e540ce1ae5a1357201666bbf3df665f..1d4d357465edf888f1d52755c382dcd8e015fc09 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -16,6 +16,7 @@ import top.leavesmc.leaves.profile.LeavesMinecraftSessionService; diff --git a/patches/server/0121-Villager-infinite-discounts.patch b/patches/server/0121-Villager-infinite-discounts.patch index b3e604a7..f5c50fab 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 e89b4a9e87dcba180905ce0640d86bd621e48898..f093dfc83b622f82001bcf1ed4971949c40dedf7 100644 +index 1d4d357465edf888f1d52755c382dcd8e015fc09..dc15ec2edf4577e1a116f0fa7ecbfb63ba623aa6 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -19,6 +19,7 @@ import top.leavesmc.leaves.protocol.CarpetServerProtocol.CarpetRules; diff --git a/patches/server/0125-Armor-stand-cant-kill-by-mob-projectile.patch b/patches/server/0125-Armor-stand-cant-kill-by-mob-projectile.patch new file mode 100644 index 00000000..3a66b71d --- /dev/null +++ b/patches/server/0125-Armor-stand-cant-kill-by-mob-projectile.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: violetc <58360096+s-yh-china@users.noreply.github.com> +Date: Fri, 29 Sep 2023 10:39:36 +0800 +Subject: [PATCH] Armor stand cant kill by mob projectile + + +diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +index e3a32c8b764b4dec59c70283efc6611f469abe21..cddcd4b8124cc24de79d728dbd18f964e6752291 100644 +--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java ++++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +@@ -552,7 +552,7 @@ public class ArmorStand extends LivingEntity { + } else { + long i = this.level().getGameTime(); + +- if (i - this.lastHit > 5L && !flag1) { ++ if (i - this.lastHit > 5L && (!flag1 || (top.leavesmc.leaves.LeavesConfig.armorStandCantKillByMobProjectile && source.is(net.minecraft.world.damagesource.DamageTypes.MOB_PROJECTILE)))) { // Leaves - Armor stand cant kill by mob projectile + this.level().broadcastEntityEvent(this, (byte) 32); + this.gameEvent(GameEvent.ENTITY_DAMAGE, source.getEntity()); + this.lastHit = i;