Entities are spawned in an unexpected location when a spawn egg is used on top of a carpet block with a downward facing piston extension above it.
Steps to Reproduce:
Replicate the following structure:
[media]
Use a spawn egg on top of the carpet block (Recommended is pig)
Expected Behavior:
The entity would be spawned on the top of the carpet block, because that is where the player was aiming when they used the spawn egg item.
Observed Results:
The entity will be spawned on top of the piston head, rather than the carpet block:
[media]
h3 Video:
Related issues
Attachments
Comments


While the reproduction steps are different, in the essence, this could be MC-197226.
TLDR: If an entity is located on the same block as a piston, upon piston retraction that entity gets warped in front of that piston; if the piston is in an upright position, this means of course it is warped on top of it.
In OPs setup, the entity is being pulled at the backside of the piston, I don't know if this type of piston warping could/should be an own bugpost, or merged.
Can confirm in 23w41a:
[media]

Can confirm in 2.20.3 pre 1
This seems to just be MC-249304 which is already triaged.