mojira.dev
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.

Linked issues

Attachments

Comments 3

Confirmed for Minecraft version 1.11.2, however this issue closely relates to MC-73884.

Confirmed for 17w17b

This issue has been fixed in 17w47a.

[media]

marcono1234

(Unassigned)

Confirmed

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

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w17b

Minecraft 17w50a

Retrieved