fully update to latest neolegacy protocol

This commit is contained in:
DrPerkyLegit
2026-05-29 23:36:02 -04:00
parent 7bf73ad13e
commit c5baf16d8e
8 changed files with 58 additions and 61 deletions

View File

@@ -66,7 +66,7 @@ AddMobPacket::AddMobPacket(shared_ptr<LivingEntity> mob, int yRotp, int xRotp, i
void AddMobPacket::read(DataInputStream *dis) //throws IOException
{
id = dis->readShort();
id = dis->readInt();
type = dis->readByte() & 0xff;
#ifdef _LARGE_WORLDS
x = dis->readInt();
@@ -90,7 +90,7 @@ void AddMobPacket::read(DataInputStream *dis) //throws IOException
void AddMobPacket::write(DataOutputStream *dos) //throws IOException
{
dos->writeShort(id);
dos->writeInt(id);
dos->writeByte(type & 0xff);
#ifdef _LARGE_WORLDS
dos->writeInt(x);
@@ -127,7 +127,7 @@ int AddMobPacket::getEstimatedSize()
// 4J Stu - This is an incoming value which we aren't currently analysing
//size += unpack->get
}
return size;
return size + 2;
}
vector<shared_ptr<SynchedEntityData::DataItem> > *AddMobPacket::getUnpackedData()
@@ -137,4 +137,4 @@ vector<shared_ptr<SynchedEntityData::DataItem> > *AddMobPacket::getUnpackedData(
unpack = entityData->getAll();
}
return unpack;
}
}