mojira.dev
MC-303308

spears damage NoAI mobs inconsistently

Holding right mouse and running at a mob with NoAI rarely damages it. I’d love to be more precise, but can’t find a decent pattern to it not taking damage.

Reproduce with

gamerule doMobSpawning false
time set night
tp @e[type=!player] ~ -100 ~
team add mobs
team modify mobs collisionRule never

scoreboard objectives add mobhealth dummy
scoreboard objectives setdisplay sidebar mobhealth
setblock ~ ~-1 ~ minecraft:repeating_command_block{Command:"execute as @e[tag=mobhealth] store result score @s mobhealth run data get entity @s Health",auto:1b}
#//fluff

summon minecraft:zombie ~1 ~ ~2 {Team:mobs,Silent:1,Tags:[mobhealth],attributes:[{base:100,id:max_health},{id:movement_speed,base:0},{id:knockback_resistance,base:1}]}
summon minecraft:zombie ~-1 ~ ~2 {Team:mobs,Silent:1,Tags:[mobhealth],NoAI:1,attributes:[{base:100,id:max_health}]}

Equip a spear and start attacking (the non jabbing attack). The most consistent way to reproduce is to line yourself up with the NoAI one, and only moving back and forth attacking always from one direction. If you alternate front/back, or left/right attacks it seems to take damage as expected. Spear hits sound is played even when it takes 0 damage.

Rotating the mob with execute as @e[tag=mobhealth] at @s run tp @s ~ ~ ~ ~90 ~ does not make it start taking damage.

The immobilized zombie takes consistent damage regardless of repeated one direction attacks or alternating ones.

Sorry for the imprecise report, out of ideas and this is as clear as I can make it.

Linked issues

Comments 1

Thank you for your report!
We're tracking this issue in MC-302768, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

knirch

(Unassigned)

Unconfirmed

(Unassigned)

25w42a

Retrieved