is it possible to make an entitie attracted to a block?

Started by CrystalWarrior1567 on Wed, 03/25/2020 - 14:42

Topic category: Help with modding (Java Edition)

Last seen on 15:20, 28. Aug 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
is it possible to make an entitie attracted to a block?
Wed, 03/25/2020 - 14:42

so i'm making an ant mod, and i wanted the leafcutter ants to go up trees and attempt to break the leaf blocks, but i can't find any way to make them always try to find the leaf block, i have no idea how to write custom code.

my idea would be that the entite would look around and then if the leaves were within it's radius, it would go there and collect the block and return, if there weren't any leaves around it would just wander around until it found leaves