refactor(Minecraft.World): Implement LCEMP changes.

This commit is contained in:
2026-07-13 00:14:53 +03:00
parent 3fce0538c5
commit 21e2add09a
64 changed files with 655 additions and 372 deletions
+21 -2
View File
@@ -123,7 +123,17 @@ void TextureAndGeometryPacket::read(DataInputStream *dis) //throws IOException
{
textureName = dis->readUTF();
dwSkinID = (DWORD)dis->readInt();
dwTextureBytes = (DWORD)dis->readShort();
short rawTextureBytes = dis->readShort();
if(rawTextureBytes <= 0)
{
dwTextureBytes = 0;
}
else
{
dwTextureBytes = (DWORD)(unsigned short)rawTextureBytes;
if(dwTextureBytes > 65536) dwTextureBytes = 0;
}
if(dwTextureBytes>0)
{
@@ -136,7 +146,16 @@ void TextureAndGeometryPacket::read(DataInputStream *dis) //throws IOException
}
uiAnimOverrideBitmask = dis->readInt();
dwBoxC = (DWORD)dis->readShort();
short rawBoxC = dis->readShort();
if(rawBoxC <= 0)
{
dwBoxC = 0;
}
else
{
dwBoxC = (DWORD)(unsigned short)rawBoxC;
if(dwBoxC > 256) dwBoxC = 0; // sane limit for skin boxes
}
if(dwBoxC>0)
{