mojira.dev
MC-49129

Spiders & Wolves deal no damage as they're leaping, defeating the point of their jump

The bug

When a spider/wolf leaps at you, it deals no damage as it's in the air, but when it lands it deals damage. I've also noticed as they're leaping their heads point completely straight, as opposed to them still looking at you, similar to how creepers stare straight as they explode. Doesn't affect mobs under version 14w06a when it got the new AI.

This actively affects both mobs ability to land hits in combat.

Note: This bug does not differ with the mob attack changes with 23w33a

How to reproduce

  1. Spawn spider/wolf

  2. Walk up to it, aggro it, and wait until it pounces

  3. Notice its head point straight forward while it pounces and it deals no damage while it's in midair

In the pictures, the mobs are touching me as they're leaping, but deal no damage until they hit the ground. Of course I took some damage waiting for them to leap, but as they jumped no damage was dealt.

--------------------------------------

Potential Fix from Chumbanotz:

"Spiders and Wolves use the class LeapAtTargetGoal which handles the leaping at their target. This class calls Goal::setFlags in its constructor with the values of Goal.Flag.MOVE and Goal.Flag.LOOK. These flags prevent other AI goals with the same flags from executing. The MeleeAttackGoal handles the melee attack and has the same goal flags set. To fix this, remove the call to Goal::setFlags from the LeapAtTargetGoal to allow it to run at the same time as MeleeAttackGoal."

 

Related issues

Attachments

Comments

migrated
[media][media][media][media][media][media]
migrated

According to the wiki:

"Wolves attack their targets by leaping at them in exactly the same manner as spiders, but cause no damage while in midair."

However, after testing what you said, I agree that what you said has happened to me too.

so basically I can confirm this.

migrated

Confirmed in 1.16.2

I don't think the bug is as straight forward as the description says though, maybe it's been partially fixed

But in third person you can see that the damaging is not instant when they are in mid air, and they only look straight forward when jumping

 

edit: I think I only tested this with wolves btw

Avoma

Can confirm in 20w48a.

Avoma

Can confirm in 20w51a.

Avoma

Can confirm in 21w05b.

Avoma

Can confirm in 21w06a.

chumbanotz

Spiders and Wolves use the class LeapAtTargetGoal which handles the leaping at their target. This class calls Goal::setFlags in its constructor with the values of Goal.Flag.MOVE and Goal.Flag.LOOK. These flags prevent other AI goals with the same flags from executing. The MeleeAttackGoal handles the melee attack and has the same goal flags set. To fix this, remove the call to Goal::setFlags from the LeapAtTargetGoal to allow it to run at the same time as MeleeAttackGoal.

Avoma

Can confirm in 1.19.2.

migrated

Affects 1.20

migrated

You can collide them while they are mid air and take no damage, why wouldn't that be a bug. It often seems like when you take damage its delayed and doesnt match with their leap animation properly.

Orbic

In full 1.21.5 release

Orbic

(Unassigned)

Confirmed

Gameplay

Low

Mob behaviour

Damage, Jump, Spider, Wolf

Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a, Minecraft 14w10b, Minecraft 14w10c, ..., 1.21.4 Release Candidate 3, 25w02a, 1.21.5, 25w16a, 1.21.6 Pre-Release 3

Retrieved