Method To Stop Entities From Entering Boats?

Very simple end result, I want a way to stop entities from entering boats. Right now, I have a custom entity that doesn't move. The base entity is a pig with item displays used for visuals. The way the entity is coded is so that when the pig dies, so will the item displays. However, users have found that placing the pig in a boat and moving it will make the item displays think the pig has died. Is there a way to fix this issue? My gut response is to stop them from even being able to enter boats, but idk if that's even possible.

Continue to help post