How would I make a mob that will run away from light?

Started by Fire Dog85 on Thu, 01/05/2023 - 01:29

Topic category: Help with modding (Java Edition)

Last seen on 02:40, 25. Mar 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How would I make a mob that will run away from light?
Thu, 01/05/2023 - 01:29

So I'm currently working on a mod where there's a monster that will take damage when exposed to light (including light from a torch), and I want to make it so instead of just standing there the mob will try to run away from light if they are within range to take damage from it. How would I do this?