• Resolves the local entity that carries a network identity (networkId:entityId), replacing the getEntitiesWith(NetworkEntity) scan the network layer used to run once per inbound message.

    The map is a cache, not a registry: a hit counts only while the entity still carries the identity it was filed under, and a miss falls back to the scan. That is what keeps it honest without a single invalidation hook — NetworkEntity is written from several places (syncEntity, the validator, an applied state dump) and dropped by the engine (reconcileWithDump, DELETE_ENTITY), so a registry would have to hook all of them and would go stale the day one is added.

    Parameters

    Returns ((networkId: number, entityId: Entity) => null | Entity)

      • (networkId: number, entityId: Entity): null | Entity
      • Parameters

        • networkId: number
        • entityId: Entity

        Returns null | Entity