From 456ce5171101bef331dc8c0f594e345288713dae Mon Sep 17 00:00:00 2001 From: Rigby Date: Fri, 16 Sep 2011 08:52:36 +0100 Subject: More latency handling fixes. Fixed Clientside rendering issues of the PlayerInfo window if max players > 126. Limited PlayerInfo packets to 126 at a time as it cannot render anymore than 126. --- src/main/java/net/minecraft/server/NetLoginHandler.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/net/minecraft/server/NetLoginHandler.java') diff --git a/src/main/java/net/minecraft/server/NetLoginHandler.java b/src/main/java/net/minecraft/server/NetLoginHandler.java index 305d7caa..59ce9327 100644 --- a/src/main/java/net/minecraft/server/NetLoginHandler.java +++ b/src/main/java/net/minecraft/server/NetLoginHandler.java @@ -101,7 +101,13 @@ public class NetLoginHandler extends NetHandler { byte b1 = (byte) worldserver.spawnMonsters; worldserver.getClass(); - Packet1Login packet1login1 = new Packet1Login("", i, j, k, b0, b1, (byte) -128, (byte) this.server.serverConfigurationManager.h()); + // CraftBukkit start -- Don't send a higher than 126 MaxPlayer size, otherwise the PlayerInfo window won't render correctly. + int maxPlayers = this.server.serverConfigurationManager.h(); + if (maxPlayers > 126) { + maxPlayers = 126; + } + Packet1Login packet1login1 = new Packet1Login("", i, j, k, b0, b1, (byte) -128, (byte) maxPlayers); + // CraftBukkit end netserverhandler.sendPacket(packet1login1); netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z)); -- cgit v1.2.3