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


    • Confirmed

      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.

            Unassigned Unassigned
            marcono1234 Marcono1234
            5 Vote for this issue
            3 Start watching this issue