From 7d9e12501cfce67319dbfca001fe6164669ba893 Mon Sep 17 00:00:00 2001 From: DrPerkyLegit <116128211+DrPerkyLegit@users.noreply.github.com> Date: Fri, 30 Oct 2026 15:36:21 -0400 Subject: [PATCH] fix estimated entity packet size --- Minecraft.World/AddEntityPacket.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Minecraft.World/AddEntityPacket.cpp b/Minecraft.World/AddEntityPacket.cpp index 99c5d0ab..ae330fd1 100644 --- a/Minecraft.World/AddEntityPacket.cpp +++ b/Minecraft.World/AddEntityPacket.cpp @@ -107,5 +107,11 @@ void AddEntityPacket::handle(PacketListener *listener) int AddEntityPacket::getEstimatedSize() { - return (11 + data > -1 ? 6 : 0) + 2; +#ifdef _LARGE_WORLDS + int posSize = 4 + 4 + 4; +#else + int posSize = 2 + 2 + 2; +#endif + + return 4 + 1 + posSize + 1 + 1 + 4 + (data > -1 ? (2 + 2 + 2) : 0); }