Skip to content

Commit

Permalink
Do not check tickThread while removing bots
Browse files Browse the repository at this point in the history
  • Loading branch information
Lora4967 committed Feb 2, 2024
1 parent 0e70aca commit 7d04bb5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions patches/server/0061-Leaves-fakeplayer-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1219,10 +1219,10 @@ index 0000000000000000000000000000000000000000..daaece30b2a3983f1cc9ee9a851e8f37
+}
diff --git a/src/main/java/top/leavesmc/leaves/bot/ServerBot.java b/src/main/java/top/leavesmc/leaves/bot/ServerBot.java
new file mode 100644
index 0000000000000000000000000000000000000000..35eecd67a743643496959d6eaeaf10a485aa651a
index 0000000000000000000000000000000000000000..e9101aeae36b919659b865d1cdb800c16ff29180
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/bot/ServerBot.java
@@ -0,0 +1,734 @@
@@ -0,0 +1,735 @@
+package top.leavesmc.leaves.bot;
+
+import com.google.common.collect.Lists;
Expand Down Expand Up @@ -1851,10 +1851,11 @@ index 0000000000000000000000000000000000000000..35eecd67a743643496959d6eaeaf10a4
+ CompletableFuture.allOf(
+ bots.stream()
+ .map(bot ->{
+ if (TickThread.isTickThreadFor(bot)){
+ //Do not check if it is on region thread,return to the target region anyway
+ /*if (TickThread.isTickThreadFor(bot)){
+ bot.die(bot.damageSources().fellOutOfWorld());
+ return CompletableFuture.completedFuture(null);
+ }
+ }*/
+
+ return CompletableFuture.runAsync(()->{
+ bot.die(bot.damageSources().fellOutOfWorld());
Expand Down

0 comments on commit 7d04bb5

Please sign in to comment.