From dac960e5817f703faf6ee7ba0c5cfe3acc70b071 Mon Sep 17 00:00:00 2001 From: Boy Date: Thu, 30 Nov 2023 00:46:46 +0100 Subject: [PATCH] remove meleeattackOverride --- .../bindings/goals/MeleeAttackBehavior.kt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/mobzy-pathfinding/src/main/kotlin/com/mineinabyss/mobzy/pathfinding/bindings/goals/MeleeAttackBehavior.kt b/mobzy-pathfinding/src/main/kotlin/com/mineinabyss/mobzy/pathfinding/bindings/goals/MeleeAttackBehavior.kt index fe49cd91..ccf17401 100644 --- a/mobzy-pathfinding/src/main/kotlin/com/mineinabyss/mobzy/pathfinding/bindings/goals/MeleeAttackBehavior.kt +++ b/mobzy-pathfinding/src/main/kotlin/com/mineinabyss/mobzy/pathfinding/bindings/goals/MeleeAttackBehavior.kt @@ -1,11 +1,9 @@ package com.mineinabyss.mobzy.pathfinding.bindings.goals import com.mineinabyss.idofront.nms.aliases.toNMS -import com.mineinabyss.mobzy.modelengine.animation.playAnimation import com.mineinabyss.mobzy.pathfinding.components.PathfinderComponent import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.PathfinderMob import org.bukkit.entity.Mob import net.minecraft.world.entity.ai.goal.MeleeAttackGoal as NMSMeleeAttackGoal @@ -22,14 +20,6 @@ class MeleeAttackBehavior( inner class MeleeAttackGoal( private val entity: Mob ) : NMSMeleeAttackGoal(entity.toNMS(), attackSpeed, seeThroughWalls) { - override fun checkAndPerformAttack(target: LivingEntity/*, squaredDistance: Double*/) { - val width = mob.bbWidth - val d = (1 + width) * (1 + width) + target.bbWidth - if (/*squaredDistance <= d && */ticksUntilNextAttack <= 0) { - entity.playAnimation("attack", 0.0, 0.0, 1.0, false) - resetAttackCooldown() - mob.doHurtTarget(target) - } - } + } }