From 13960a93b2a7c114446c109de059db305db4555d Mon Sep 17 00:00:00 2001 From: Kevin <115616336+lag@users.noreply.github.com> Date: Fri, 6 Mar 2026 19:23:32 -0600 Subject: Max players from 8 -> 255 + small connection optimizations (#722) * Multiplayer 8 to max byte increase. Made-with: Cursor * Server chunk optimizations for large player counts, server full notification fix, added to server.properties. --- Minecraft.Client/PendingConnection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Minecraft.Client/PendingConnection.cpp') diff --git a/Minecraft.Client/PendingConnection.cpp b/Minecraft.Client/PendingConnection.cpp index 72b8f382..29ab7c28 100644 --- a/Minecraft.Client/PendingConnection.cpp +++ b/Minecraft.Client/PendingConnection.cpp @@ -136,7 +136,9 @@ void PendingConnection::sendPreLoginResponse() else #endif { - connection->send( shared_ptr( new PreLoginPacket(L"-", ugcXuids, ugcXuidCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion,szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),hostIndex, server->m_texturePackId) ) ); + DWORD cappedCount = (ugcXuidCount > 255u) ? 255u : static_cast(ugcXuidCount); + BYTE cappedHostIndex = (hostIndex >= 255u) ? 254 : static_cast(hostIndex); + connection->send( shared_ptr( new PreLoginPacket(L"-", ugcXuids, cappedCount, ugcFriendsOnlyBits, server->m_ugcPlayersVersion,szUniqueMapName,app.GetGameHostOption(eGameHostOption_All),cappedHostIndex, server->m_texturePackId) ) ); } } -- cgit v1.2.3