mojira.dev
MC-99098

Shulker open and close hitbox is not updated, when they ride boat, minecart or mobs

The bug

Shulker open and close hitbox is not updated, when they ride boat, minecart or mobs.

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments

marcono1234

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The reason why this happens is because the method net.minecraft.entity.monster.EntityShulker.onUpdate() only updates the bounding box of the Shulker if the block position of it is not null. However, if the Shulker is riding another entity the block position is set to null. Another problem is that the EntityShulker class is not overriding the method net.minecraft.entity.Entity.setPosition(double, double, double), which is for example called for the riding entity when the ridden entity moves. This method sets the bounding box based on the height, which the EntityShulker class is not using.

Avoma

Can confirm in 20w48a. You can use these commands to help reproduce this bug.

/summon boat ~ ~ ~ {Passengers:[{id:shulker}]}
/summon minecart ~ ~ ~ {Passengers:[{id:shulker}]}
Avoma

Can confirm in 20w51a, however cannot in 21w03a. This issue has been fixed in 21w03a.

[Mod]Les3awe

(Unassigned)

Confirmed

Collision, Entities, Hitboxes

boat, hitbox, minecart, mob, ride, shulker

Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, ..., 1.16.4 Release Candidate 1, 1.16.4, 20w45a, 20w46a, 20w48a

21w03a

Retrieved