diff --git a/patches/server/0010-Fakeplayer-support.patch b/patches/server/0010-Fakeplayer-support.patch index f75c7614..b73b68b6 100644 --- a/patches/server/0010-Fakeplayer-support.patch +++ b/patches/server/0010-Fakeplayer-support.patch @@ -2126,10 +2126,10 @@ index 0000000000000000000000000000000000000000..4162df8802b1af73d9a0a76f846ab9ad +} 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..40f46253389bd75afeebcc7954c1132ac7e97298 +index 0000000000000000000000000000000000000000..f83b787a6827bdcf3927dbf2a0a0fa6e998959ac --- /dev/null +++ b/src/main/java/org/leavesmc/leaves/bot/ServerBot.java -@@ -0,0 +1,561 @@ +@@ -0,0 +1,556 @@ +package org.leavesmc.leaves.bot; + +import com.google.common.collect.ImmutableMap; @@ -2507,11 +2507,6 @@ index 0000000000000000000000000000000000000000..40f46253389bd75afeebcc7954c1132a + } + + @Override -+ public void setRot(float yaw, float pitch) { -+ this.getBukkitEntity().setRotation(yaw, pitch); -+ } -+ -+ @Override + public void attack(@NotNull Entity target) { + super.attack(target); + this.swing(InteractionHand.MAIN_HAND); @@ -3318,7 +3313,7 @@ index 0000000000000000000000000000000000000000..be55a3085a53542c08e7f0209883a4f3 +} diff --git a/src/main/java/org/leavesmc/leaves/bot/agent/actions/AttackAction.java b/src/main/java/org/leavesmc/leaves/bot/agent/actions/AttackAction.java new file mode 100644 -index 0000000000000000000000000000000000000000..03e9baf9b7c2da0fd1d7d9b0058b70daddedeeaa +index 0000000000000000000000000000000000000000..6c66ef29e702a49d1b8569aa0942e22e40843343 --- /dev/null +++ b/src/main/java/org/leavesmc/leaves/bot/agent/actions/AttackAction.java @@ -0,0 +1,22 @@ @@ -3336,7 +3331,7 @@ index 0000000000000000000000000000000000000000..03e9baf9b7c2da0fd1d7d9b0058b70da + + @Override + public boolean doTick(@NotNull ServerBot bot) { -+ Entity entity = bot.getTargetEntity(3, Entity::isAttackable); ++ Entity entity = bot.getTargetEntity(3, target -> target.isAttackable() && !target.skipAttackInteraction(bot)); + if (entity != null) { + bot.attack(entity); + return true;