How to make a mob avoid a block?

Started by TheCatalystGaming on Wed, 04/28/2021 - 20:53

Topic category: Advanced modding

Last seen on 17:09, 17. Jun 2021
Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a mob avoid a block?
Wed, 04/28/2021 - 20:53

As the title says, is there a way to make a mob avoid/run away from a block?

Last seen on 17:14, 13. Jun 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
when entity moves check if…
Fri, 05/14/2021 - 23:13

when entity moves check if touching or distance to nearest block representing block of [x] type if the distance is closer than [int] do something

This is the way I'd do it but I don't know the procedures for it. 

Check this forum page.