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

Projectiles collide with hitbox of block instead of with collision box

    XMLWordPrintable

    Details

    • Confirmation Status:
      Confirmed

      Description

      The bug

      Projectiles such as snowballs, arrows, fireballs or enderpearls collide with the hitbox of blocks instead of with their collision box.

      How to reproduce

      1. Place four iron bars in a horizontal square
      2. Try to throw or shoot a projectile through the gap
        → You will see that it collides with the iron bars

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The affected methods currently use the method net.minecraft.world.World.rayTraceBlocks(Vec3d, Vec3d, boolean, boolean, boolean), which uses the hitboxes of the blocks.

      It might be better to offset the entity bounding box or use code similar to net.minecraft.entity.Entity.move(MoverType, double, double, double). That would also solve the problem that large projectiles like fireballs currently fit through gaps smaller than their bounding box.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                5 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: