mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-06 15:51:33 +00:00
@@ -1510,10 +1510,10 @@ index 0000000000000000000000000000000000000000..0db337866c71283464d026a4f230016b
|
||||
+}
|
||||
diff --git a/src/main/java/org/leavesmc/leaves/bot/ServerBot.java b/src/main/java/org/leavesmc/leaves/bot/ServerBot.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f04bd729fbabbf51c432d3d8eb39f059740fd157
|
||||
index 0000000000000000000000000000000000000000..1314bcb0dfa311d671fcdcfeee4a8394b69834ad
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/leavesmc/leaves/bot/ServerBot.java
|
||||
@@ -0,0 +1,766 @@
|
||||
@@ -0,0 +1,767 @@
|
||||
+package org.leavesmc.leaves.bot;
|
||||
+
|
||||
+import com.google.common.collect.Lists;
|
||||
@@ -1788,6 +1788,7 @@ index 0000000000000000000000000000000000000000..f04bd729fbabbf51c432d3d8eb39f059
|
||||
+ if (!new BotRemoveEvent(this.getBukkitPlayer(), reason, remover).callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ dropAll();
|
||||
+ if (this.removeTaskId != -1) {
|
||||
+ Bukkit.getScheduler().cancelTask(this.removeTaskId);
|
||||
+ this.removeTaskId = -1;
|
||||
@@ -1931,7 +1932,7 @@ index 0000000000000000000000000000000000000000..f04bd729fbabbf51c432d3d8eb39f059
|
||||
+
|
||||
+ public Entity getTargetEntity(int maxDistance, Predicate<? super Entity> predicate) {
|
||||
+ List<Entity> entities = this.level().getEntities((Entity) null, this.getBoundingBox(), (e -> e != this && (predicate == null || predicate.test(e))));
|
||||
+ if (entities.isEmpty()) {
|
||||
+ if (!entities.isEmpty()) {
|
||||
+ return entities.getFirst();
|
||||
+ } else {
|
||||
+ EntityHitResult result = this.getBukkitEntity().rayTraceEntity(3, false);
|
||||
|
||||
Reference in New Issue
Block a user