-
Bug
-
Resolution: Fixed
-
Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w17b
-
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
- Place four iron bars in a horizontal square
- 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.