15 is the default distance client-sided.
Code:
int l = stream.readBits(5);
if (l > 15) {
l -= 32;
}
int i1 = stream.readBits(5);
if (i1 > 15) {
i1 -= 32;
}
To increase you have to also increase the amount of bits read and change 32 to 64 for 6 bits:
Code:
int l = stream.readBits(6);
if (l > 20) {
l -= 64;
}
int i1 = stream.readBits(6);
if (i1 > 20) {
i1 -= 64;
}
Server-side where you send your npc position when adding npcs (the part where you send npcbits):
to
Server-sided NPC updating where you check for the distance of npcs you need to change 15 to 20 or your desired amount of distance.
You may also want to do the same thing for players..Otherwise you would see npc-s being attacked by invisible players (cause they are not being rendered).