The bug
Throwable projectiles such as snowballs, potions and enderpearls break when hitting blocks without collision boxes, unlike arrows.
Affected projectiles
Ender pearl
Snowball
Egg
Bottle of enchanting
Splash/lingering potions
Llama spit
How to reproduce
Throw for example a snowball at a double height plant.
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The method net.minecraft.entity.projectile.EntityThrowable.onUpdate()
calls the method net.minecraft.world.World.rayTraceBlocks(Vec3d, Vec3d)
which includes blocks without collision box. Instead the method World.rayTraceBlocks(Vec3d, Vec3d, boolean, boolean, boolean)
should be called with false
(stopOnLiquid
), true
(ignoreBlockWithoutBoundingBox
) and false
(returnLastUncollidableBlock
).
Related issues
is duplicated by
relates to
Comments


What do you mean by this, for which non-solid block couldn't you replicate it?

Confirmed, but it has always been like this (haven't tested arrows and fishing rods yet though).

I misinterpreted the bug report. I am saying this is working as intended.
I tried throwing all the entities listed at non-solid blocks. I assumed the reporter meant transparent blocks since non-solid blocks would mean air and/or water which doesn't destroy any of these. I tried glowstone, pistons, and glass and the entities all get destroyed except for the arrow (which sticks in the block) and fishing bobber (which just sits there) as expected. Eggs, Fireballs, Snowballs, bottles o' enchanting, and splash potions have always been destroyed when hitting any block.
Unless I'm missing something this is working as intended.

Non-solid blocks are blocks that do not impede player/mob movement, such as tall grass, flowers, tripwire, vines, torches etc.

Retested with non-solid blocks as defined by sonic and indeed the bug is confirmed for 1.8.1 pre-3. Only arrows are allowed through non-solid blocks.

I would assume it is an unintended side effect from an update (not sure how so many things go wrong even when it doesn't seem like they made any changes to the items/blocks that are effected).
could cause problems when trying to hide dispensers behind vines or tallgrass.

15w45a

Probably a dupe of MC-8017 anyway.

Seems that the fix was reverted, please reopen
Relates to MC-93636

15w51b.
Also affected are ender pearls (as throwables) and opened fence gates (as nonsolid blocks).
Arrows are NOT affected.

16w03a

confirmed in16w07a
it has exsited in former snapshots.

1.9 pre 2

What is it with that? Confirmed? Fixed?

Probably confirmed, tested it with snowballs and tripwire and it is not fixed

1.9 pre 4 is affected.

Confirmed for 1.11, does not occur with a fishing rod

Confirmed for 17w17b

Confirmed for 1.12-pre7

Confirmed for 1.12.2 and 18w03b

Affects 1.13-pre6

Affects 1.13-pre7

Confirmed for 1.13.1.
Confirmed for 19w09a. The same thing applies to llama spit as well.

20w06a affected

finally fixed in 1.16.2 pre 1
Can't replicate this issue.