private void updateNPCs(Stream stream, int arg1) {
        localEntityCount = 0;
        entityUpdateCount = 0;
        updateNpcMovement(stream);
        method46(arg1, stream);
        parseNpcUpdateFlags(stream);
        for (int k = 0; k < localEntityCount; k++) {
            int l = localPlayerIndices[k];
            if (localNpcs[l].lastUpdate != Client.loopCycle) {
                localNpcs[l].desc = null;
                localNpcs[l] = null;
            }
        }
        if (stream.offset != arg1) {
            Signlink.reporterror(myUsername + " size mismatch in getnpcpos - pos:" + stream.offset + " psize:" + arg1);
            throw new RuntimeException("eek");
        }
        for (int i1 = 0; i1 < localNpcCount; i1++) {
            if (localNpcs[localNpcIndices[i1]] == null) {
                Signlink.reporterror(myUsername + " null entry in npc list - pos:" + i1 + " size:" + localNpcCount);
                throw new RuntimeException("eek");
            }
        }
    }