mojira.dev
MC-92175

Projectiles sometimes visually break before hitting a target

The final calculated position of projectiles is incorrect; this is important for the Passengers tag, because it means that when a projectile breaks, the Passenger is placed in the wrong position relative to the impact.

What I expected to happen:

When a Projectile Entity such as snowballs or enderpearls are summoned with entities riding them(Passengers), I expected the Projectile to break on a solid surface or hitbox, and the Passengers to be located at that surface or mob. Example: AreaEffectCloud is centered at edge of mob hitbox.

What actually happened:

Projectiles visibly break before reaching target. When the Projectile breaks, the Passengers are located in front of the surface or mob hitbox, by a somewhat significant amount. Example: AreaEffectCloud is always far enough away that its hitbox never touches mob hitbox or wall, regardless of radius.

Steps to Reproduce:

  1. Set up a Command Block on top of level ground with either of the following commands:

    summon minecraft:snowball ~ ~1 ~-1 {Motion:[0d,0d,3d],Passengers:[{id:"minecraft:area_effect_cloud",Duration:150,ReapplicationDelay:45,WaitTime:5,Radius:1.5f,RadiusOnUse:-0.5f,RadiusPerTick:0f,Particle:"smoke",Effects:[{Ambient:1,Amplifier:5,Id:20,ShowParticles:0,Duration:100}]}]}
    summon ender_pearl ~ ~1 ~-1 {Motion:[0d,0d,-3d],Passengers:[{id:Item}]}
  2. Use F3+B to activate Hitbox viewing, to aid visibility.

  3. Place a two block tall wall or two block tall mob with NoAI, in a direct line South of the command block.

  4. Activate Command Block.

This occurs regardless of direction.

UPDATE:

Arrows fired from a bow that is not fully charged, or summoned with a command and given motion, will 'jump' slightly after they land. Fully charged arrows do not. It isn't clear whether this is related, but it may be because it looks like the position calculations correcting themselves.

Linked issues

Attachments

Comments

kumasasa

Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time.

migrated

Updated affected versions. Ran all of my tests again, no change in results. Updated commands to reflect the changes to entity names in 1.11 snapshots.

[MOD] Greymagic27

Can confirm for 20w07a.

[Mod] Jingy

Can confirm in 23w41a in some cases. It seems like this is very situational to where the snowball is summoned from as sometimes it lands where it should and summons the particles as expected, and other times it lands too soon/too early and positions the particles wrong as well.

[media]

CreeperFriend

The first command from the description seems to be a little faulty. Here is a working command:

summon minecraft:snowball ~ ~1 ~-1 {Motion:[0d,0d,3d],Passengers:[{id:"minecraft:area_effect_cloud",Duration:150,ReapplicationDelay:45,WaitTime:5,Radius:1.5f,RadiusOnUse:-0.5f,RadiusPerTick:0f,Particle:"smoke",Effects:[{Ambient:1,Amplifier:5,Id:20,ShowParticles:0,Duration:100}]}]}

migrated

(Unassigned)

Confirmed

Projectiles

hit, projectile

Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47c, Minecraft 1.10.2, Minecraft 16w41a, ..., Minecraft 1.12, Minecraft 1.12.1, 20w07a, 1.20.4, 24w12a

Retrieved