mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-04 15:41:31 +00:00
Fix fakeplayer
This commit is contained in:
@@ -744,7 +744,7 @@ index 0000000000000000000000000000000000000000..ad49275aca2649ae0e7a6f90cfda9f43
|
||||
+}
|
||||
diff --git a/src/main/java/top/leavesmc/leaves/bot/BotInventoryContainer.java b/src/main/java/top/leavesmc/leaves/bot/BotInventoryContainer.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9fce8c91bf0c211c2d87993cc0e2d4e8f5fe3d19
|
||||
index 0000000000000000000000000000000000000000..b83ad5bf2a338d589eb200d3f3b3153571ba2cad
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/top/leavesmc/leaves/bot/BotInventoryContainer.java
|
||||
@@ -0,0 +1,180 @@
|
||||
@@ -864,7 +864,7 @@ index 0000000000000000000000000000000000000000..9fce8c91bf0c211c2d87993cc0e2d4e8
|
||||
+ }
|
||||
+ if (list != null && !list.get(slot).isEmpty()) {
|
||||
+ itemStack = ContainerHelper.removeItem(list, slot, amount);
|
||||
+ player.detectEquipmentUpdates();
|
||||
+ player.detectEquipmentUpdatesPublic();
|
||||
+ }
|
||||
+ return itemStack;
|
||||
+ }
|
||||
@@ -896,7 +896,7 @@ index 0000000000000000000000000000000000000000..9fce8c91bf0c211c2d87993cc0e2d4e8
|
||||
+ }
|
||||
+ if (list != null) {
|
||||
+ list.set(slot, stack);
|
||||
+ player.detectEquipmentUpdates();
|
||||
+ player.detectEquipmentUpdatesPublic();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@@ -1209,7 +1209,7 @@ 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..00de26efb99e8dbe163625d29e65a126073f0116
|
||||
index 0000000000000000000000000000000000000000..70d67422cce02bffd3f9a40f574b50c067356757
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/top/leavesmc/leaves/bot/ServerBot.java
|
||||
@@ -0,0 +1,710 @@
|
||||
@@ -1592,12 +1592,12 @@ index 0000000000000000000000000000000000000000..00de26efb99e8dbe163625d29e65a126
|
||||
+
|
||||
+ public void updateItemInMainHand() {
|
||||
+ tryReplenishOrReplaceInMainHand();
|
||||
+ detectEquipmentUpdates();
|
||||
+ detectEquipmentUpdatesPublic();
|
||||
+ }
|
||||
+
|
||||
+ public void updateItemInOffHand() {
|
||||
+ tryReplenishOrReplaceInOffHand();
|
||||
+ detectEquipmentUpdates();
|
||||
+ detectEquipmentUpdatesPublic();
|
||||
+ }
|
||||
+
|
||||
+ public void tryReplenishOrReplaceInOffHand() {
|
||||
@@ -1717,7 +1717,7 @@ index 0000000000000000000000000000000000000000..00de26efb99e8dbe163625d29e65a126
|
||||
+
|
||||
+ public void dropAll() {
|
||||
+ getInventory().dropAll();
|
||||
+ detectEquipmentUpdates();
|
||||
+ detectEquipmentUpdatesPublic();
|
||||
+ }
|
||||
+
|
||||
+ public void setBotAction(BotAction action) {
|
||||
|
||||
Reference in New Issue
Block a user