mojira.dev
MC-159773

Shulkers can teleport to non-solid faces, and don't teleport to some solid faces

The bug

When checking for a valid face to attach to, shulkers always check the top face of a block, instead of the face they're trying to attach to. As a result:

  1. Shulkers will not attach to bottom of normal stairs, or bottom of bottom slabs.

  2. Shulkers will attach to any face of a top slab or upside down stairs.

Other blocks are similarly affected.

To reproduce

/setblock ~2 ~ ~ stone_slab[type=bottom]
/setblock ~4 ~ ~ stone_slab[type=top]
/setblock ~6 ~ ~ stone_stairs[half=bottom]
/setblock ~8 ~ ~ stone_stairs[half=top]
/summon shulker ~ ~3 ~

Code analysis

The incorrect check seems to be calling BlockState.func_215682_a which calls Block.doesSideFillSquare(this.getCollisionShape(reader, pos, ISelectionContext.forEntity(entityIn)), Direction.UP); - which disregards the direction and only checks the top face. (mappings are forge-1.14.4-28.0.49_mapped_snapshot_20190719-1.14.3-sources)

 

Attachments

Comments 1

Kosma Moczek (Kosmolot)

Felix Jones

Confirmed

Normal

Mob behaviour

1.14.4, 19w34a, 1.15 Pre-release 4, 1.15

20w06a

Retrieved