Solid entities are entities that the player can bump into, step on, or otherwise physically interact with without passing through. Entities like this have many uses, such as emulating blocks.
This document will discuss some of the ways that solid entities can be created.
Not all techniques are ideal for all scenarios. Experiment, and figure out what works best for you.
Boat runtime identifier
The boat runtime identifier will cause the entity to be solid with the shape of a boat and provide some other boat-like effects, which might not be desirable. It is not possible to increase the scale of the solid part, even if you scale the entity.
Shulker runtime identifier
The shulker runtime identifier will cause the entity to be solid with a 1x1 block and act like a shulker, including unwanted teleports. It is not possible to increase the scale of the substantial part, even if you scale the entity.
minecraft:is_stackable on both entities you want to collide. Note: This requires editing
player.json if you wish the entity to be solid for the player.
You will also need to add
minecraft:push_through and set its
value parameter to 1.
Faking it with blocks
In some scenarios, it's probably better to
/setblock barriers, either statically or dynamically.