I'm trying to get boss rifts from the boss rift mod to move depending on the boss they generate from. To do this, I figured I would need to get all nearby entities, and ended up with this (Minecart is for easier debugging)
EntityEvents.spawned('minecraft:minecart', event => {
const rift = event.entity
var entitiesNear = rift.getNearbyEntities(rift,rift.distanceToEntitySqr() < 100)
console.log("Nearby: "+entitiesNear)
})
This issue I've found is that the rift is not a living entity, and so to my knowledge, the getNearbyEntities function does not work for this. I'm not quite sure how to do this when the entity isn't living.
