I am creating a "wireless power generator" that automatically sends power to my machines in a 35*35*35 area.
However, if I iterate through the 35*35*35 area every tick to find all nearby machines, that would probably result in performance issues.
Therefore, I was wondering if it is possible to create a custom entity whenever one of my machines is placed, and use World#getEntitiesInAABB to get all nearby machines to send power to.
Is this possible? If yes, what are the drawbacks (if any) of this method?