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

Projectiles ignore collisions for ~1 block after spawned

XMLWordPrintable

    • Confirmed
    • Survival

      In 1.12.2, trying to throw an enderpearl while standing in tall grass resulted in the enderpearl immediately colliding with the grass.

      This was fixed in 17w47a, but the fix wasn't limited to player-thrown enderpearls and grass:

      All Projectiles ignore the block they are spawned in!

      For example, a dispenser facing into a solid block can shoot arrows through that block.

      Also, mobs like skeletons or blazes can shoot at players even if they are stuck inside blocks.

      This means that if a player has a renamed pet skeleton in his base encased in glass as decoration, it can now attack the player. Even worse if a player spent lots of effort capturing a ghast as decoration.

      List of affected blocks/entities:

      • Players can shoot all projectiles (Arrows, Eggs, Snowballs, XP bottles, Potions, Enderpearls, Trident) while in a block, no matter if solid or not
      • Dispensers facing a solid block shoot through it. Affects all items thrown by players and fire charges (Fireworks have been passing through blocks since they got added, don't change that please)
      • Tested mobs: Skeletons, Blazes, Withers can all shoot while stuck in blocks
      • Shulkers aren't affected because they can't be stuck in a block (teleport away)
      • Likely affected too but not tested yet: Stray, Ghast, Enderdragon, Drowneds with tridents

      The test world is attached for easier replication.

      Projectile Bug testing 2.zip

      Suggestion on how I would fix it:

      Limit the fix for the enderpearl bug to only enderpearls, only projectiles shot by players and/or only tall grass and similar blocks (kelp and seagrass for example).

      UPDATE: Looks like instead of ignoring the collision with the block they spawn in, they ignore all collisions for roughly one block.
      Entity collisions seem to also be affected. I'll need to do more testing on this.

      I updated the world download with a few new test cases added regarding entity hitboxes.

        1. Projectile Bug testing 2.zip
          4.01 MB
        2. 2018-06-11_18.36.13.png
          2018-06-11_18.36.13.png
          707 kB
        3. 2018-06-08_14.56.31.png
          2018-06-08_14.56.31.png
          710 kB
        4. 2018-06-08_14.55.55.png
          2018-06-08_14.55.55.png
          665 kB
        5. 2018-06-08_14.55.50.png
          2018-06-08_14.55.50.png
          661 kB
        6. 2018-06-08_14.35.00.png
          2018-06-08_14.35.00.png
          641 kB

            searge [Mojang] Searge (Michael Stoyke)
            15Redstones 15Redstones
            Votes:
            29 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: