Basically, I need to make an Ender Dragon stay within a specific Area/Region, but there's virtually no information online about how to do this or people doing this in the past. At this point I don't care if I have to make a completely custom Dragon AI I just want to get this done. I have a kind of inside area where the dragon should spawn yet it just flies through the walls and leaves anyway (like it should, but I don't want it to). I've tried checking if the Dragon is inside a border and then teleporting it back if it's outside but it just tries to fly out in the same way again in an endless loop. Does anyone have any idea how to do this? Thank you!