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 

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I make the orbit…
Thu, 10/31/2024 - 06:24

How would I make the orbit radius larger?

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also how can I make the mobs…
Thu, 10/31/2024 - 06:39

Also how can I make the mobs orbit around at different times so they dont all get clumped together (or even seperating them equally)