Mojira Archive
MC-114722

Projectiles collide with hitbox of block instead of with collision box

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.

Fixed

Marcono1234

2017-03-22, 05:48 PM

2024-11-05, 07:48 PM

2017-12-11, 04:07 PM

5

3

Confirmed

collision-box, glass-pane, hitbox, iron-bars, projectile, raytracing

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w17b

Minecraft 17w50a