9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-29 11:59:17 +00:00
This commit is contained in:
Lumine1909
2025-07-04 02:02:37 -07:00
parent 28bc86b2d1
commit 4a4b07177b

View File

@@ -3,6 +3,7 @@ package org.leavesmc.leaves.bot;
import com.google.common.collect.ImmutableMap;
import com.mojang.authlib.GameProfile;
import io.papermc.paper.adventure.PaperAdventure;
import io.papermc.paper.event.entity.EntityKnockbackEvent;
import net.minecraft.core.BlockPos;
import net.minecraft.core.NonNullList;
import net.minecraft.core.particles.BlockParticleOption;
@@ -275,6 +276,14 @@ public class ServerBot extends ServerPlayer {
return this;
}
@Override
public void knockback(double strength, double x, double z, @Nullable Entity attacker, EntityKnockbackEvent.Cause eventCause) {
if (!this.hurtMarked) {
return;
}
super.knockback(strength, x, z, attacker, eventCause);
}
@Override
public void onItemPickup(@NotNull ItemEntity item) {
super.onItemPickup(item);