How to make mobs orbit around a certain mob?

Started by BryAstro on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make mobs orbit around a certain mob?

Version 2024.2 (1.20.1 Forge)

Hello, I would like to know how to make Mob As orbit around Mob B when they are close to Mob B.

https://imgur.com/a/jQj4Jza This is a simple diagram of what the desired result is.

Any help would be appreciated. 

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try this…
Wed, 10/30/2024 - 17:36

Try this.... PlanetAOnInitialSpawn 

This makes an entity orbit another entity in a circular motion using yaw. SO far the only issue I found with this is since its on the initial spawn trigger of planet A doesn't call it again when u leave and join back. U can prob fix this by doing something similar on tickupdate trigger. I recommend making the second entity have no gravity and a low bounding box so it doesn't hit anything that could mess up the motion. Hope this helps. 

It should look like this btw...https://i.imgur.com/u9UGj73.mp4