fix: remove byte type alias

This commit is contained in:
Tropical
2026-03-06 05:03:37 -06:00
parent 09eae49d21
commit 15af35eef2
208 changed files with 700 additions and 701 deletions

View File

@@ -44,9 +44,9 @@ AddPlayerPacket::AddPlayerPacket(shared_ptr<Player> player, PlayerUID xuid, Play
// 4J - changed - send current "previously sent" value of rotations to put this in sync with other clients
yRot = yRotp;
xRot = xRotp;
yHeadRot = static_cast<byte>(yHeadRotp); // 4J Added
// yRot = (byte) (player->yRot * 256 / 360);
// xRot = (byte) (player->xRot * 256 / 360);
yHeadRot = static_cast<uint8_t>(yHeadRotp); // 4J Added
// yRot = (uint8_t) (player->yRot * 256 / 360);
// xRot = (uint8_t) (player->xRot * 256 / 360);
//printf("%d: New add player (%f,%f,%f) : (%d,%d,%d) : xRot %d, yRot %d\n",id,player->x,player->y,player->z,x,y,z,xRot,yRot);
@@ -96,13 +96,13 @@ void AddPlayerPacket::write(DataOutputStream *dos) //throws IOException
dos->writeInt(x);
dos->writeInt(y);
dos->writeInt(z);
dos->writeByte(static_cast<byte>(yRot));
dos->writeByte(static_cast<byte>(xRot));
dos->writeByte(static_cast<byte>(m_playerIndex)); // 4J Added
dos->writeByte(static_cast<uint8_t>(yRot));
dos->writeByte(static_cast<uint8_t>(xRot));
dos->writeByte(static_cast<uint8_t>(m_playerIndex)); // 4J Added
dos->writeShort(carriedItem);
dos->writePlayerUID(xuid);
dos->writePlayerUID(OnlineXuid);
dos->writeByte(static_cast<byte>(m_playerIndex)); // 4J Added
dos->writeByte(static_cast<uint8_t>(m_playerIndex)); // 4J Added
dos->writeInt(m_skinId);
dos->writeInt(m_capeId);
dos->writeInt(m_uiGamePrivileges);
@@ -117,7 +117,7 @@ void AddPlayerPacket::handle(PacketListener *listener)
int AddPlayerPacket::getEstimatedSize()
{
int iSize= sizeof(int) + Player::MAX_NAME_LENGTH + sizeof(int) + sizeof(int) + sizeof(int) + sizeof(BYTE) + sizeof(BYTE) +sizeof(short) + sizeof(PlayerUID) + sizeof(PlayerUID) + sizeof(int) + sizeof(BYTE) + sizeof(unsigned int) + sizeof(byte);
int iSize= sizeof(int) + Player::MAX_NAME_LENGTH + sizeof(int) + sizeof(int) + sizeof(int) + sizeof(BYTE) + sizeof(BYTE) +sizeof(short) + sizeof(PlayerUID) + sizeof(PlayerUID) + sizeof(int) + sizeof(BYTE) + sizeof(unsigned int) + sizeof(uint8_t);
if( entityData != NULL )
{