mojira.dev
MC-304835

The player can damage their vehicle with items with the attack_range component (provided the vehicle is within range)

When we are trying to hit the mob that we are riding with an item with the attack_range item component, we can, and the mob takes damages.

Expected result :

We hit only the mob/player who is in front of us or when hit nobody, not the mob that we are riding.

Actual result :

When we are looking the mob that we are riding, we can hit it, and it takes damages.

Steps to reproduce :

  1. Execute /give @s iron_sword[minecraft:attack_range={min_reach:0,max_reach:3,hitbox_margin:0.3}]

  2. Summon a mob that you can ride like a Pig, an Happy Ghast, a Horse, a Mule, a Donkey, a Nautilus, a Camel… Put a saddle on it and ride it

  3. Put the given item in your mainhand

  4. Look at the mob that you are riding

  5. Press your attack key to hit it

Environment

Windows 11
Singleplayer

Attachments

Comments 0

No comments.

Loupieur

(Unassigned)

1529072

Confirmed

Expansion A

Important

Items

1.21.11 Release Candidate 2, 1.21.11

Retrieved