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

Throwable projectiles get destroyed at contact with non solid blocks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.8.1-pre3, Minecraft 1.8.8, Minecraft 15w36c, Minecraft 15w45a, Minecraft 15w49b, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 16w03a, Minecraft 16w07a, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.4, Minecraft 16w21b, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w38a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w17b, Minecraft 1.12 Pre-Release 6, Minecraft 1.12 Pre-Release 7, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w45a, Minecraft 18w03b, Minecraft 18w07c, Minecraft 18w08b, Minecraft 18w11a, Minecraft 18w16a, Minecraft 18w21a, Minecraft 1.13-pre2, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w43b, Minecraft 18w48a, Minecraft 18w48b, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 1.14 Pre-Release 4, 1.14.4, 19w40a, 19w45b, 1.15 Pre-release 3, 1.15.2, 20w06a, 20w19a, 1.16 Pre-release 1, 1.16 Pre-release 7, 1.16.1
    • Confirmed
    • Collision, Projectiles

      The bug

      Throwable projectiles such as snowballs, potions and enderpearls break when hitting blocks without collision boxes, unlike arrows.

      Affected projectiles

      • Ender pearl
      • Snowball
      • Egg
      • Bottle of enchanting
      • Splash/lingering potions
      • Llama spit

      How to reproduce

      Throw for example a snowball at a double height plant.

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.entity.projectile.EntityThrowable.onUpdate() calls the method net.minecraft.world.World.rayTraceBlocks(Vec3d, Vec3d) which includes blocks without collision box. Instead the method World.rayTraceBlocks(Vec3d, Vec3d, boolean, boolean, boolean) should be called with false (stopOnLiquid), true (ignoreBlockWithoutBoundingBox) and false (returnLastUncollidableBlock).

            slicedlime [Mojang] slicedlime
            marcono1234 Marcono1234
            Votes:
            30 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: