mojira.dev
MCPE-221666

Players Cannot Open the Inventory of a Mob Whose Seat Position is More Than 5 Blocks from Entity Position

When the minecraft:rideable component’s seat position is greater than 5 blocks from the entity’s position, the mob’s inventory closes immediately when opened. I assume this is related to the inventory of a mob or chest automatically closing when the player becomes more than 5 blocks from it. While I obviously don’t know much about the source code of Bedrock Edition, perhaps a fix would be an exemption to closing an inventory because of distance if the inventory is of the mob being ridden.

Steps to Reproduce:

  1. Add the attached pack to a world. This pack changes the vanilla horse’s rideable component to put the player more than 5 blocks from the entity’s center. Looking at the screenshot of the code that is attached, notice that even though each coordinate is less than 5, you can use Pythagorean Theorem to find that the player is in fact more than 5 blocks from 0,0,0.

  2. Mount a horse until it is broken

  3. Try to open the horse’s inventory

Expected Behavior:

The horse’s inventory opens, allowing you apply a saddle and horse armor and rearrange your own inventory

Actual Behavior:

The horse’s inventory opens and instantly closes.

Attachments

Comments 2

This affects Preview 1.21.100.20

JWForever5504

(Unassigned)

Unconfirmed

Windows

Windows 10

1.21.100.20 Preview, 1.21.82 Hotfix, 1.21.92 Hotfix

Retrieved