Mojira Archive
MC-195035

Ridden horses can be saddled by right-clicking

The bug

Horses being ridden by another player or entity can be saddled by right-clicking on them while holding a saddle. This is likely unintended as:

  • opening/interacting with the inventory of a ridden horse is otherwise disabled for all players except the rider,
  • this issue doesn't affect horse armour, and
  • this issue doesn't affect llamas being equipped with carpets.

How to reproduce

  1. Summon a tamed horse ridden by an entity:
    /summon horse ~ ~ ~ {Tame:1,Passengers:[{id:chicken}]}
  2. Attempt to open the horse's inventory by right-clicking on it while sneaking
    The horse's inventory cannot be accessed by you, as you are not the rider
  3. Without sneaking, right-click on the horse while holding a saddle
    The horse is equipped with the saddle

Code analysis

Code analysis by haykam can be found in this comment.