Entities above players

Im trying to make entites sit on top of players heads. Currently i have an invisible entity riding the player and then the entity i want displayed riding that. (since the passenger slot for player is the neck or something) That works fine, the only issue is the invisible entity blocks all interaction with blocks. Is there a better way to do this that wont block interactions?

running spongeforge-1.12.2-2768-7.1.4

The way i would do it would be to disable gravity for the entity you want to display. Remove the invisible entity completely. And then use the EntityMoveEvent to stop the display entity from moving into a different xyz (and dont disable rotation … Unless you want to). But also update the xyz of the entity based on the players location

Was hoping i could avoid the move events but thats probably my best shot. thanks.

Any reason on avoiding the EntityMoveEvent?

I thought it would cause unnessary lag. But theres litterally no performance impact. Guess i should have just tested before posting.

Unless your doing something that sends a lot of packets, or is just demanding on the client in general (like changing a lot of blocks at once) then your normally fine to use EntityMoveEvent

You can use an armor stand, and set it as a ‘marker’, meaning despite it being just as tall as normal it has zero hitbox.