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
).
Linked issues
is duplicated by 15
relates to 4
Comments 27
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.
Can't replicate this issue.