chore: switch all entity ids to dedicated ints (#86)

* switch all entity ids to dedicated ints

* Increment NETWORK_PROTOCOL_VERSION to 79
This commit is contained in:
DrPerkyLegit
2026-05-22 18:38:53 +03:00
committed by GitHub
parent 28d9500eca
commit 9f37450178
8 changed files with 51 additions and 55 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ void RespawnPacket::read(DataInputStream *dis) //throws IOException
mapSeed = dis->readLong();
difficulty = dis->readByte();
m_newSeaLevel = dis->readBoolean();
m_newEntityId = dis->readShort();
m_newEntityId = dis->readInt();
#ifdef _LARGE_WORLDS
m_xzSize = dis->readShort();
m_hellScale = dis->read();
@@ -83,7 +83,7 @@ void RespawnPacket::write(DataOutputStream *dos) //throws IOException
dos->writeLong(mapSeed);
dos->writeByte(difficulty);
dos->writeBoolean(m_newSeaLevel);
dos->writeShort(m_newEntityId);
dos->writeInt(m_newEntityId);
#ifdef _LARGE_WORLDS
dos->writeShort(m_xzSize);
dos->write(m_hellScale);
@@ -97,5 +97,5 @@ int RespawnPacket::getEstimatedSize()
{
length = static_cast<int>(m_pLevelType->getGeneratorName().length());
}
return 13+length;
return 13+length+2;
}