diff --git a/patches/server/0004-Leaves-Server-Config-And-Command.patch b/patches/server/0004-Leaves-Server-Config-And-Command.patch index fa7508b3..f2c5d79e 100644 --- a/patches/server/0004-Leaves-Server-Config-And-Command.patch +++ b/patches/server/0004-Leaves-Server-Config-And-Command.patch @@ -128,10 +128,10 @@ index 35d2da9d91dcdd89de7c0f4af028fd182376ea8d..d73482fb1e71fe2951e96ae0593de268 .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..00d2ee563d41ef75e50d13cedcbb77fad38dc71e +index 0000000000000000000000000000000000000000..24bbcab59ebe153516e602180db0b0353b9dffde --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -0,0 +1,814 @@ +@@ -0,0 +1,819 @@ +package top.leavesmc.leaves; + +import com.destroystokyo.paper.util.SneakyThrow; @@ -771,6 +771,11 @@ index 0000000000000000000000000000000000000000..00d2ee563d41ef75e50d13cedcbb77fa + noBlockUpdateCommand = getBoolean("settings.modify.no-block-update-command", noBlockUpdateCommand); + } + ++ public static boolean skipSelfRaidCheck = false; ++ private static void skipSelfRaidCheck() { ++ skipSelfRaidCheck = getBoolean("settings.modify.raider-die-skip-self-raid-check", skipSelfRaidCheck); ++ } ++ + public static final class WorldConfig { + + public final String worldName; diff --git a/patches/server/0084-Raider-die-skip-self-raid-check.patch b/patches/server/0084-Raider-die-skip-self-raid-check.patch new file mode 100644 index 00000000..8d4caa7a --- /dev/null +++ b/patches/server/0084-Raider-die-skip-self-raid-check.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: Sun, 9 Jul 2023 16:51:47 +0800 +Subject: [PATCH] Raider die skip self raid check + + +diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java +index 57fdcdaf54fd1c92a6e51a3a81789029096e5abe..1b8e141e50dd2a156eda2455988ea45a390692ae 100644 +--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java ++++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java +@@ -134,7 +134,7 @@ public abstract class Raider extends PatrollingMonster { + raid.removeFromRaid(this, false); + } + +- if (this.isPatrolLeader() && raid == null && ((ServerLevel) this.level()).getRaidAt(this.blockPosition()) == null) { ++ if (this.isPatrolLeader() && (top.leavesmc.leaves.LeavesConfig.skipSelfRaidCheck || raid == null) && ((ServerLevel) this.level()).getRaidAt(this.blockPosition()) == null) { // Leaves - skip self raid check + ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD); + Player entityhuman = null; +