Skip to content

Commit

Permalink
Modify fakeplayer use_on action distance
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Aug 20, 2023
1 parent bc4728c commit 0796006
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/0008-Fakeplayer-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2590,7 +2590,7 @@ index 0000000000000000000000000000000000000000..5dc3fbf8e62ccffc8291962c835a568e
+}
diff --git a/src/main/java/top/leavesmc/leaves/bot/agent/actions/UseItemOnAction.java b/src/main/java/top/leavesmc/leaves/bot/agent/actions/UseItemOnAction.java
new file mode 100644
index 0000000000000000000000000000000000000000..75488ee2cb25190f9c16898759c57f233d240c4c
index 0000000000000000000000000000000000000000..886e37227e66dc25653b8ad53fef600c705aa101
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/bot/agent/actions/UseItemOnAction.java
@@ -0,0 +1,40 @@
Expand Down Expand Up @@ -2625,7 +2625,7 @@ index 0000000000000000000000000000000000000000..75488ee2cb25190f9c16898759c57f23
+
+ @Override
+ public boolean doTick(@NotNull ServerBot bot) {
+ HitResult result = bot.getRayTrace(4, ClipContext.Fluid.NONE);
+ HitResult result = bot.getRayTrace(5, ClipContext.Fluid.NONE);
+ if (result.getType() == HitResult.Type.BLOCK) {
+ bot.punch();
+ bot.updateItemInMainHand();
Expand Down

0 comments on commit 0796006

Please sign in to comment.