private void method46(int arg0, Stream stream) {
        while (stream.bitOffset + 21 < arg0 * 8) {
            int k = stream.getBits(14);
            if (k == 16383) {
                break;
            }
            if (localNpcs[k] == null) {
                localNpcs[k] = new Npc();
            }
            Npc npc = localNpcs[k];
            localNpcIndices[localNpcCount++] = k;
            npc.lastUpdate = Client.loopCycle;
            int l = stream.getBits(5);
            if (l > 15) {
                l -= 32;
            }
            int i1 = stream.getBits(5);
            if (i1 > 15) {
                i1 -= 32;
            }
            int j1 = stream.getBits(1);
            npc.desc = NpcDefinition.forId(stream.getBits(12));
            int k1 = stream.getBits(1);
            if (k1 == 1) {
                playerUpdateIndices[entityUpdateCount++] = k;
            }
            npc.anInt1540 = npc.desc.size;
            npc.defaultTurnValue = npc.desc.turnAmount;
            npc.walkAnimation = npc.desc.walkAnim;
            npc.anInt1555 = npc.desc.retreatAnim;
            npc.anInt1556 = npc.desc.turnRightAnim;
            npc.anInt1557 = npc.desc.turnLeftAnim;
            npc.idleAnimation = npc.desc.idleAnim;
            npc.updatePosition(Client.myPlayer.walkQueueX[0] + i1, Client.myPlayer.walkQueueY[0] + l, j1 == 1);
        }
        stream.endBitBlock();
    }