mojira.dev
MC-131094

Projectiles ignore collisions for ~1 block after spawned

In 1.12.2, trying to throw an enderpearl while standing in tall grass resulted in the enderpearl immediately colliding with the grass.

[media]

This was fixed in 17w47a, but the fix wasn't limited to player-thrown enderpearls and grass:

All Projectiles ignore the block they are spawned in!

For example, a dispenser facing into a solid block can shoot arrows through that block.

[media]

Also, mobs like skeletons or blazes can shoot at players even if they are stuck inside blocks.

[media]

[media]

This means that if a player has a renamed pet skeleton in his base encased in glass as decoration, it can now attack the player. Even worse if a player spent lots of effort capturing a ghast as decoration.

List of affected blocks/entities:

  • Players can shoot all projectiles (Arrows, Eggs, Snowballs, XP bottles, Potions, Enderpearls, Trident) while in a block, no matter if solid or not

  • Dispensers facing a solid block shoot through it. Affects all items thrown by players and fire charges (Fireworks have been passing through blocks since they got added, don't change that please)

  • Tested mobs: Skeletons, Blazes, Withers can all shoot while stuck in blocks

  • Shulkers aren't affected because they can't be stuck in a block (teleport away)

  • Likely affected too but not tested yet: Stray, Ghast, Enderdragon, Drowneds with tridents

The test world is attached for easier replication.

[media]

Suggestion on how I would fix it:

Limit the fix for the enderpearl bug to only enderpearls, only projectiles shot by players and/or only tall grass and similar blocks (kelp and seagrass for example).

UPDATE: Looks like instead of ignoring the collision with the block they spawn in, they ignore all collisions for roughly one block.
Entity collisions seem to also be affected. I'll need to do more testing on this.

[media]

I updated the world download with a few new test cases added regarding entity hitboxes.

Related issues

Attachments

Comments

migrated
[media][media][media][media][media][media]
migrated

A suggestion, limit it to projectiles coming from a player? not mobs or dispensers? Interested in seeing what the devs think. Certainly a bug for dispensers to be able to shoot arrows through obsidian like that. Also confirmed this affects firecharges and fireworks

Confirmed your results using 1.13 pre1. 

migrated

Other possibly related issues: MC-124126 and MC-126595

migrated

They can also pass through entities right in from of them.

Ray

seems to still be in pre4

migrated

pre-4: Blocks got fixed, entity collisions didn't.

[Mod] Neko

Can still reproduce both cases. Reopening.

michael

Some of these behaviors are now WAI, others should be fixed in the next version:

  • Players can shoot all projectiles (Arrows, Eggs, Snowballs, XP bottles, Potions, Enderpearls, Trident) while in a block, no matter if solid or not

That's now WAI

 

  • Dispensers facing a solid block shoot through it. Affects all items thrown by players and fire charges (Fireworks have been passing through blocks since they got added, don't change that please)

This should be fixed now

 

  • Tested mobs: Skeletons, Blazes, Withers can all shoot while stuck in blocks

That's now WAI

 

  • Shulkers aren't affected because they can't be stuck in a block (teleport away)

-

 

  • Likely affected too but not tested yet: Stray, Ghast, Enderdragon, Drowneds with tridents

-

 

Ray

Still some things not right https://gyazo.com/bae3dd7e18e5678ec8f9355229bb6817

and some golems can hit mobs right by them.

Maxaxik

I can still reproduce entity collisions in pre-8. Arrows shot from dispensers seem to ignore an armor stand standing right in front of the block, much like on the latest screenshot added here. Fireballs and small_fireballs seem to behave similarly.

migrated

In pre-8 fire charges and fireworks do not shoot through blocks when shot from dispensers.

migrated

michael

Confirmed

collision, ender_pearl, projectile

Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4

Minecraft 1.13-pre4, Minecraft 1.13-pre5

Retrieved