diff --git a/common/src/main/kotlin/quaedam/projection/swarm/ai/ProjectedPersonNavigation.kt b/common/src/main/kotlin/quaedam/projection/swarm/ai/ProjectedPersonNavigation.kt index bd70541..65613d2 100644 --- a/common/src/main/kotlin/quaedam/projection/swarm/ai/ProjectedPersonNavigation.kt +++ b/common/src/main/kotlin/quaedam/projection/swarm/ai/ProjectedPersonNavigation.kt @@ -4,6 +4,7 @@ import net.minecraft.core.BlockPos import net.minecraft.world.entity.ai.navigation.GroundPathNavigation import net.minecraft.world.level.Level import net.minecraft.world.level.pathfinder.Path +import quaedam.misc.cts.ConstantTemporalSink import quaedam.projection.swarm.ProjectedPersonEntity import quaedam.projection.swarm.SwarmProjection import quaedam.projector.Projector @@ -11,7 +12,10 @@ import quaedam.projector.Projector class ProjectedPersonNavigation(val entity: ProjectedPersonEntity, level: Level) : GroundPathNavigation(entity, level) { override fun createPath(set: MutableSet, i: Int, bl: Boolean, j: Int, f: Float): Path? { - if (set.any { Projector.findNearbyProjections(level, it, SwarmProjection.effect.get()).isEmpty() }) { + if (set.any { + Projector.findNearbyProjections(level, it, SwarmProjection.effect.get()) + .isEmpty() && !ConstantTemporalSink.checkEffect(level, it) + }) { return null } return super.createPath(set, i, bl, j, f)