Sit Anywhere!
Finally, there's a solution to the sitting problem in Minecraft! Unlike other datapacks that use horses, pigs and require clicking with an empty hand, this approach is completely different and much more convenient.
The feature of this datapack is its minimalist implementation - only 4 commands are executed each tick, and all other logic is handled through advancements and predicates.
How to use:
To sit on any surface, simply perform the following steps: look straight down (exactly straight down!), crouch, then stand up (this is important so you don't exit the sitting position immediately) and press the right mouse button!
Installation:
Download the latest release version and place the datapack .zip file in the datapacks folder of your Minecraft world.
Compatibility:
This datapack is created for Minecraft version 1.19.4 and newer. It will not work in earlier versions due to the use of the /ride command and block display entity (the entity the player sits on).