How can I create a function that randomly teleports entities to the safe place (not inside blocks), similar to an enderman?
"/spreadplayer" teleports everything to the surface level, but I want it to work correctly underground and in the Nether.
I have a couple ideas, but I think they pretty bad optimized.
Has anyone already done it? I don't want to reinvent the wheel if someone has already done it, and done it better.