Trying to make a "scare" radius for a block

Started by Hellfire on

Topic category: Help with modding (Java Edition)

Last seen on 20:46, 16. Nov 2020
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trying to make a "scare" radius for a block

So im new to making mods, and im trying to make a block that acts like a scarecrow for cows and such when right clicked. like how a skeleton runs away when its near a wolf. how would i make a procedure to do this?

Last seen on 18:54, 23. Aug 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Something along the lines of…
Sat, 10/24/2020 - 04:32

Something along the lines of "if (entity in radius X is cow), change it's velocity or teleport it away". It'd take time to tweak and get to work smoothly, but that should work.