mojira.dev
MC-73884

Throwable projectiles get destroyed at contact with non solid blocks

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

MC-87983 ender pearl to stop in the grass MC-94428 eggs, snowballs, splash potions, fishing rod float and ender pearls breaks on tripwire, opened fence gate and cobweb MC-95945 Bobbers can't go through sugar canes. MC-102749 Snowballs, Eggs, and Potions break when hitting tall grass and flowers MC-106119 The snowballs will not pass through the grass MC-118199 Witches and Tall Grass MC-120249 Snow balls break by rails, instead of go through them MC-126217 Eggs destroyed by Kelp and seagrass MC-127771 Potions and Tripwires MC-140230 Tripwire/string stopping snowballs and eggs though they're an entity MC-144214 Potion bottle splash bug MC-148597 Throwing entities (snowballs, eggs) collide with Tallgrass MC-190186 Some projectiles can be blocked by passable blocks MC-191849 Visual Glitch MC-194667 Lingering Potions impact when hitting grass/tall grass-like entities

Comments

migrated

Can't replicate this issue.

marcono1234

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

Sonicwave

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

migrated

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.

Sonicwave

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

migrated

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.

migrated

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.

migrated

15w45a

migrated

Probably a dupe of MC-8017 anyway.

marcono1234

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

Irbis

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

Arrows are NOT affected.

Irbis

16w03a

migrated

confirmed in16w07a
it has exsited in former snapshots.

Irbis

1.9 pre 2

migrated

What is it with that? Confirmed? Fixed?

marcono1234

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

Irbis

1.9 pre 4 is affected.

JUE13

Confirmed for 1.11, does not occur with a fishing rod

JUE13

Confirmed for 17w17b

JUE13

Confirmed for 1.12-pre7

Sonicwave

Confirmed for 1.12.2 and 18w03b

muzikbike

Affects 1.13-pre6

muzikbike

Affects 1.13-pre7

migrated

Confirmed for 1.13.1.

gaspoweredpick

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

Irbis

20w06a affected

Humiebees

finally fixed in 1.16.2 pre 1

marcono1234

slicedlime

Confirmed

Collision, Projectiles

contact, explosion, fireball, non-solid, non-solid-blocks, projectile

Minecraft 1.8.1-pre3, Minecraft 1.8.8, Minecraft 15w36c, Minecraft 15w45a, Minecraft 15w49b, ..., 20w06a, 20w19a, 1.16 Pre-release 1, 1.16 Pre-release 7, 1.16.1

Minecraft 15w49a, 1.16.2 Pre-release 1

Retrieved