Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-159773

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


    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w06a
    • 1.14.4, 19w34a, 1.15 Pre-release 4, 1.15
    • None
    • Confirmed
    • Mob behaviour
    • Normal

      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)


            xilefian [Mojang] Felix Jones
            Kosmolot Kosma Moczek (Kosmolot)
            6 Vote for this issue
            6 Start watching this issue