diff --git a/Minecraft.World/AddEntityPacket.cpp b/Minecraft.World/AddEntityPacket.cpp index acacbb37a..1bb6549c5 100644 --- a/Minecraft.World/AddEntityPacket.cpp +++ b/Minecraft.World/AddEntityPacket.cpp @@ -16,8 +16,8 @@ void AddEntityPacket::_init(shared_ptr e, int type, int data, int xp, in x = xp;//(int) floor(e->x * 32); y = yp;//(int) floor(e->y * 32); z = zp;//(int) floor(e->z * 32); - yRot = static_cast(yRotp); - xRot = static_cast(xRotp); + yRot = static_cast(yRotp); + xRot = static_cast(xRotp); this->type = type; this->data = data; if (data > -1) // 4J - changed "no data" value to be -1, we can have a valid entity id of 0 @@ -55,7 +55,7 @@ AddEntityPacket::AddEntityPacket(shared_ptr e, int type, int data, int y void AddEntityPacket::read(DataInputStream *dis) // throws IOException TODO 4J JEV add throws statement { id = dis->readShort(); - type = std::to_integer(dis->readByte()); + type = dis->readByte(); #ifdef _LARGE_WORLDS x = dis->readInt(); y = dis->readInt(); @@ -79,7 +79,7 @@ void AddEntityPacket::read(DataInputStream *dis) // throws IOException TODO 4J void AddEntityPacket::write(DataOutputStream *dos) // throws IOException TODO 4J JEV add throws statement { dos->writeShort(id); - dos->writeByte(static_cast(type)); + dos->writeByte(static_cast(type)); #ifdef _LARGE_WORLDS dos->writeInt(x); dos->writeInt(y); diff --git a/Minecraft.World/AddGlobalEntityPacket.cpp b/Minecraft.World/AddGlobalEntityPacket.cpp index d1111aa4d..977d1952e 100644 --- a/Minecraft.World/AddGlobalEntityPacket.cpp +++ b/Minecraft.World/AddGlobalEntityPacket.cpp @@ -39,7 +39,7 @@ AddGlobalEntityPacket::AddGlobalEntityPacket(shared_ptr e) void AddGlobalEntityPacket::read(DataInputStream *dis) // throws IOException { id = dis->readInt(); - type = std::to_integer(dis->readByte()); + type = static_cast(dis->readByte()); x = dis->readInt(); y = dis->readInt(); z = dis->readInt(); @@ -48,7 +48,7 @@ void AddGlobalEntityPacket::read(DataInputStream *dis) // throws IOException void AddGlobalEntityPacket::write(DataOutputStream *dos) // throws IOException { dos->writeInt(id); - dos->writeByte(static_cast(type)); + dos->writeByte(static_cast(type)); dos->writeInt(x); dos->writeInt(y); dos->writeInt(z); diff --git a/Minecraft.World/AddMobPacket.cpp b/Minecraft.World/AddMobPacket.cpp index 05e37056e..777be938e 100644 --- a/Minecraft.World/AddMobPacket.cpp +++ b/Minecraft.World/AddMobPacket.cpp @@ -14,8 +14,8 @@ AddMobPacket::AddMobPacket() x = 0; y = 0; z = 0; - yRot = static_cast(0); - xRot = static_cast(0); + yRot = static_cast(0); + xRot = static_cast(0); entityData = nullptr; unpack = NULL; } @@ -36,9 +36,9 @@ AddMobPacket::AddMobPacket(shared_ptr mob, int yRotp, int xRotp, int xp, in y = yp;//Mth::floor(mob->y * 32); z = zp;//Mth::floor(mob->z * 32); // 4J - changed - send current "previously sent" value of rotations to put this in sync with other clients - yRot = static_cast(yRotp); - xRot = static_cast(xRotp); - yHeadRot = static_cast(yHeadRotp); + yRot = static_cast(yRotp); + xRot = static_cast(xRotp); + yHeadRot = static_cast(yHeadRotp); // yRot = (byte) (mob->yRot * 256 / 360); // xRot = (byte) (mob->xRot * 256 / 360); // yHeadRot = (byte) (mob->yHeadRot * 256 / 360); @@ -67,7 +67,7 @@ AddMobPacket::AddMobPacket(shared_ptr mob, int yRotp, int xRotp, int xp, in void AddMobPacket::read(DataInputStream *dis) //throws IOException { id = dis->readShort(); - type = std::to_integer(dis->readByte()) & 0xff; + type = static_cast(dis->readByte()) & 0xff; #ifdef _LARGE_WORLDS x = dis->readInt(); y = dis->readInt(); @@ -91,7 +91,7 @@ void AddMobPacket::read(DataInputStream *dis) //throws IOException void AddMobPacket::write(DataOutputStream *dos) //throws IOException { dos->writeShort(id); - dos->writeByte(static_cast(type & 0xff)); + dos->writeByte(static_cast(type & 0xff)); #ifdef _LARGE_WORLDS dos->writeInt(x); dos->writeInt(y); diff --git a/Minecraft.World/AddPlayerPacket.cpp b/Minecraft.World/AddPlayerPacket.cpp index 80275391c..097fcb1bd 100644 --- a/Minecraft.World/AddPlayerPacket.cpp +++ b/Minecraft.World/AddPlayerPacket.cpp @@ -44,7 +44,7 @@ AddPlayerPacket::AddPlayerPacket(shared_ptr 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(yHeadRotp); // 4J Added + yHeadRot = static_cast(yHeadRotp); // 4J Added // yRot = (byte) (player->yRot * 256 / 360); // xRot = (byte) (player->xRot * 256 / 360); @@ -96,13 +96,13 @@ void AddPlayerPacket::write(DataOutputStream *dos) //throws IOException dos->writeInt(x); dos->writeInt(y); dos->writeInt(z); - dos->writeByte(static_cast(yRot)); - dos->writeByte(static_cast(xRot)); - dos->writeByte(static_cast(m_playerIndex)); // 4J Added + dos->writeByte(static_cast(yRot)); + dos->writeByte(static_cast(xRot)); + dos->writeByte(static_cast(m_playerIndex)); // 4J Added dos->writeShort(carriedItem); dos->writePlayerUID(xuid); dos->writePlayerUID(OnlineXuid); - dos->writeByte(static_cast(m_playerIndex)); // 4J Added + dos->writeByte(static_cast(m_playerIndex)); // 4J Added dos->writeInt(m_skinId); dos->writeInt(m_capeId); dos->writeInt(m_uiGamePrivileges); diff --git a/Minecraft.World/AnimatePacket.cpp b/Minecraft.World/AnimatePacket.cpp index 9a03cb05d..2f3948d78 100644 --- a/Minecraft.World/AnimatePacket.cpp +++ b/Minecraft.World/AnimatePacket.cpp @@ -28,7 +28,7 @@ void AnimatePacket::read(DataInputStream *dis) //throws IOException void AnimatePacket::write(DataOutputStream *dos) //throws IOException { dos->writeInt(id); - dos->writeByte(static_cast(action)); + dos->writeByte(static_cast(action)); } void AnimatePacket::handle(PacketListener *listener) diff --git a/Minecraft.World/ChunkTilesUpdatePacket.cpp b/Minecraft.World/ChunkTilesUpdatePacket.cpp index 08d78146b..5dbd68c8b 100644 --- a/Minecraft.World/ChunkTilesUpdatePacket.cpp +++ b/Minecraft.World/ChunkTilesUpdatePacket.cpp @@ -21,7 +21,7 @@ ChunkTilesUpdatePacket::ChunkTilesUpdatePacket() shouldDelay = true; xc = 0; zc = 0; - count = (std::byte)0; + count = (byte)0; } ChunkTilesUpdatePacket::ChunkTilesUpdatePacket(int xc, int zc, shortArray positions, byte count, Level *level) @@ -35,7 +35,7 @@ ChunkTilesUpdatePacket::ChunkTilesUpdatePacket(int xc, int zc, shortArray positi this->blocks = byteArray((unsigned int)count); this->data = byteArray((unsigned int)count); LevelChunk *levelChunk = level->getChunk(xc, zc); - for (int i = 0; (std::byte)i < count; i++) + for (int i = 0; (byte)i < count; i++) { int x = (positions[i] >> 12) & 15; int z = (positions[i] >> 8) & 15; @@ -66,14 +66,14 @@ void ChunkTilesUpdatePacket::read(DataInputStream *dis) //throws IOException int countAndFlags = (int)dis->readByte(); bool dataAllZero = (( countAndFlags & 0x80 ) == 0x80 ); levelIdx = ( countAndFlags >> 5 ) & 3; - count = (std::byte)countAndFlags & (std::byte)0x1f; + count = (byte)countAndFlags & (byte)0x1f; positions = shortArray((short int)count); blocks = byteArray((unsigned int)count); data = byteArray((unsigned int)count); int currentBlockType = -1; - for( int i = 0; (std::byte)i < count; i++ ) + for( int i = 0; (byte)i < count; i++ ) { int xzAndFlag = dis->readShort(); int y = (int)dis->readByte(); @@ -82,14 +82,14 @@ void ChunkTilesUpdatePacket::read(DataInputStream *dis) //throws IOException { currentBlockType = dis->read(); } - blocks[i] = (std::byte)currentBlockType; + blocks[i] = (byte)currentBlockType; if( !dataAllZero) { - data[i] = (std::byte)dis->read(); + data[i] = (byte)dis->read(); } else { - data[i] = (std::byte)0; + data[i] = (byte)0; } } } diff --git a/Minecraft.World/ClientCommandPacket.cpp b/Minecraft.World/ClientCommandPacket.cpp index d0443b669..94f6deea9 100644 --- a/Minecraft.World/ClientCommandPacket.cpp +++ b/Minecraft.World/ClientCommandPacket.cpp @@ -19,7 +19,7 @@ void ClientCommandPacket::read(DataInputStream *dis) void ClientCommandPacket::write(DataOutputStream *dos) { - dos->writeByte((std::byte)action & (std::byte)0xff); + dos->writeByte((byte)action & (byte)0xff); } void ClientCommandPacket::handle(PacketListener *listener) diff --git a/Minecraft.World/CompoundTag.h b/Minecraft.World/CompoundTag.h index e8919cc69..ebc4a8ecb 100644 --- a/Minecraft.World/CompoundTag.h +++ b/Minecraft.World/CompoundTag.h @@ -117,7 +117,7 @@ public: void putBoolean(wchar_t * string, bool val) { - putByte(string, val?static_cast(1):static_cast(0)); + putByte(string, val?static_cast(1):static_cast(0)); } Tag *get(wchar_t *name) @@ -200,7 +200,7 @@ public: bool getBoolean(wchar_t *string) { - return getByte(string) != static_cast(0); + return getByte(string) != static_cast(0); } void remove(const wstring &name) diff --git a/Minecraft.World/ConsoleSaveFileInputStream.cpp b/Minecraft.World/ConsoleSaveFileInputStream.cpp index 4ea1f8ae2..5b70ae10d 100644 --- a/Minecraft.World/ConsoleSaveFileInputStream.cpp +++ b/Minecraft.World/ConsoleSaveFileInputStream.cpp @@ -25,7 +25,7 @@ ConsoleSaveFileInputStream::ConsoleSaveFileInputStream(ConsoleSaveFile *saveFile //the next byte of data, or -1 if the end of the file is reached. int ConsoleSaveFileInputStream::read() { - byte byteRead = static_cast(0); + byte byteRead = static_cast(0); DWORD numberOfBytesRead; BOOL result = m_saveFile->readFile( diff --git a/Minecraft.World/ContainerAckPacket.cpp b/Minecraft.World/ContainerAckPacket.cpp index de7b7324a..f296cc7ca 100644 --- a/Minecraft.World/ContainerAckPacket.cpp +++ b/Minecraft.World/ContainerAckPacket.cpp @@ -34,9 +34,9 @@ void ContainerAckPacket::read(DataInputStream *dis) //throws IOException void ContainerAckPacket::write(DataOutputStream *dos) //throws IOException { - dos->writeByte((std::byte)containerId); + dos->writeByte((byte)containerId); dos->writeShort(uid); - dos->writeByte((std::byte)(accepted ? 1 : 0)); + dos->writeByte((byte)(accepted ? 1 : 0)); } int ContainerAckPacket::getEstimatedSize() diff --git a/Minecraft.World/ContainerButtonClickPacket.cpp b/Minecraft.World/ContainerButtonClickPacket.cpp index b1490cdd5..7c8145814 100644 --- a/Minecraft.World/ContainerButtonClickPacket.cpp +++ b/Minecraft.World/ContainerButtonClickPacket.cpp @@ -30,8 +30,8 @@ void ContainerButtonClickPacket::read(DataInputStream *dis) void ContainerButtonClickPacket::write(DataOutputStream *dos) { - dos->writeByte((std::byte)containerId); - dos->writeByte((std::byte)buttonId); + dos->writeByte((byte)containerId); + dos->writeByte((byte)buttonId); } int ContainerButtonClickPacket::getEstimatedSize() diff --git a/Minecraft.World/ContainerClickPacket.cpp b/Minecraft.World/ContainerClickPacket.cpp index 228907809..8eeaee051 100644 --- a/Minecraft.World/ContainerClickPacket.cpp +++ b/Minecraft.World/ContainerClickPacket.cpp @@ -50,9 +50,9 @@ void ContainerClickPacket::read(DataInputStream *dis) //throws IOException void ContainerClickPacket::write(DataOutputStream *dos) // throws IOException { - dos->writeByte((std::byte)containerId); + dos->writeByte((byte)containerId); dos->writeShort(slotNum); - dos->writeByte((std::byte)buttonNum); + dos->writeByte((byte)buttonNum); dos->writeShort(uid); dos->writeBoolean(quickKey); diff --git a/Minecraft.World/ContainerClosePacket.cpp b/Minecraft.World/ContainerClosePacket.cpp index 45c09e31f..d63e12aaa 100644 --- a/Minecraft.World/ContainerClosePacket.cpp +++ b/Minecraft.World/ContainerClosePacket.cpp @@ -28,7 +28,7 @@ void ContainerClosePacket::read(DataInputStream *dis) //throws IOException void ContainerClosePacket::write(DataOutputStream *dos) //throws IOException { - dos->writeByte((std::byte)containerId); + dos->writeByte((byte)containerId); } int ContainerClosePacket::getEstimatedSize() diff --git a/Minecraft.World/ContainerOpenPacket.cpp b/Minecraft.World/ContainerOpenPacket.cpp index e4a331367..231a2855c 100644 --- a/Minecraft.World/ContainerOpenPacket.cpp +++ b/Minecraft.World/ContainerOpenPacket.cpp @@ -28,18 +28,18 @@ void ContainerOpenPacket::handle(PacketListener *listener) void ContainerOpenPacket::read(DataInputStream *dis) //throws IOException { - containerId = (int)(dis->readByte() & (std::byte)0xff); - type = (int)(dis->readByte() & (std::byte)0xff); + containerId = (int)(dis->readByte() & (byte)0xff); + type = (int)(dis->readByte() & (byte)0xff); title = dis->readShort(); - size = (int)(dis->readByte() & (std::byte)0xff); + size = (int)(dis->readByte() & (byte)0xff); } void ContainerOpenPacket::write(DataOutputStream *dos) //throws IOException { - dos->writeByte((std::byte)containerId & (std::byte)0xff); - dos->writeByte((std::byte)type & (std::byte)0xff); + dos->writeByte((byte)containerId & (byte)0xff); + dos->writeByte((byte)type & (byte)0xff); dos->writeShort(title & 0xffff); - dos->writeByte((std::byte)size & (std::byte)0xff); + dos->writeByte((byte)size & (byte)0xff); } int ContainerOpenPacket::getEstimatedSize() diff --git a/Minecraft.World/ContainerSetContentPacket.cpp b/Minecraft.World/ContainerSetContentPacket.cpp index bc05aa6c3..19e1c6918 100644 --- a/Minecraft.World/ContainerSetContentPacket.cpp +++ b/Minecraft.World/ContainerSetContentPacket.cpp @@ -41,7 +41,7 @@ void ContainerSetContentPacket::read(DataInputStream *dis) //throws IOException void ContainerSetContentPacket::write(DataOutputStream *dos) //throws IOException { - dos->writeByte((std::byte)containerId); + dos->writeByte((byte)containerId); dos->writeShort(items.length); for (unsigned int i = 0; i < items.length; i++) { diff --git a/Minecraft.World/ContainerSetDataPacket.cpp b/Minecraft.World/ContainerSetDataPacket.cpp index f7ab48572..3acbf7375 100644 --- a/Minecraft.World/ContainerSetDataPacket.cpp +++ b/Minecraft.World/ContainerSetDataPacket.cpp @@ -34,7 +34,7 @@ void ContainerSetDataPacket::read(DataInputStream *dis) //throws IOException void ContainerSetDataPacket::write(DataOutputStream *dos) // throws IOException { - dos->writeByte((std::byte)containerId); + dos->writeByte((byte)containerId); dos->writeShort(id); dos->writeShort(value); } diff --git a/Minecraft.World/ContainerSetSlotPacket.cpp b/Minecraft.World/ContainerSetSlotPacket.cpp index 2d44e551d..eae3de3ab 100644 --- a/Minecraft.World/ContainerSetSlotPacket.cpp +++ b/Minecraft.World/ContainerSetSlotPacket.cpp @@ -34,7 +34,7 @@ void ContainerSetSlotPacket::read(DataInputStream *dis) //throws IOException { // 4J Stu - TU-1 hotfix // Fix for #13142 - Holding down the A button on the furnace ingredient slot causes the UI to display incorrect item counts - std::byte byteId = dis->readByte(); + byte byteId = dis->readByte(); containerId = *(char *)&byteId; slot = dis->readShort(); item = readItem(dis); @@ -42,7 +42,7 @@ void ContainerSetSlotPacket::read(DataInputStream *dis) //throws IOException void ContainerSetSlotPacket::write(DataOutputStream *dos) //throws IOException { - dos->writeByte((std::byte)containerId); + dos->writeByte((byte)containerId); dos->writeShort(slot); writeItem(item, dos); } diff --git a/Minecraft.World/DataInputStream.cpp b/Minecraft.World/DataInputStream.cpp index 585d5e12d..b00b116e1 100644 --- a/Minecraft.World/DataInputStream.cpp +++ b/Minecraft.World/DataInputStream.cpp @@ -138,7 +138,7 @@ bool DataInputStream::readFully(byteArray b) } else { - b[i] = static_cast(byteRead); + b[i] = static_cast(byteRead); } } return true; diff --git a/Minecraft.World/EntityActionAtPositionPacket.cpp b/Minecraft.World/EntityActionAtPositionPacket.cpp index a68716f9b..f0ef85e9c 100644 --- a/Minecraft.World/EntityActionAtPositionPacket.cpp +++ b/Minecraft.World/EntityActionAtPositionPacket.cpp @@ -39,9 +39,9 @@ void EntityActionAtPositionPacket::read(DataInputStream *dis) //throws IOExcepti void EntityActionAtPositionPacket::write(DataOutputStream *dos) //throws IOException { dos->writeInt(id); - dos->writeByte((std::byte)action); + dos->writeByte((byte)action); dos->writeInt(x); - dos->writeByte((std::byte)y); + dos->writeByte((byte)y); dos->writeInt(z); } diff --git a/Minecraft.World/EntityEventPacket.cpp b/Minecraft.World/EntityEventPacket.cpp index 0a0c77915..bbac60631 100644 --- a/Minecraft.World/EntityEventPacket.cpp +++ b/Minecraft.World/EntityEventPacket.cpp @@ -9,7 +9,7 @@ EntityEventPacket::EntityEventPacket() { entityId = 0; - eventId = (std::byte)0; + eventId = (byte)0; } EntityEventPacket::EntityEventPacket(int entityId, byte eventId) diff --git a/Minecraft.World/ExplodePacket.cpp b/Minecraft.World/ExplodePacket.cpp index b1a5f031e..2c2118a7d 100644 --- a/Minecraft.World/ExplodePacket.cpp +++ b/Minecraft.World/ExplodePacket.cpp @@ -99,9 +99,9 @@ void ExplodePacket::write(DataOutputStream *dos) //throws IOException int xx = tp.x-xp; int yy = tp.y-yp; int zz = tp.z-zp; - dos->writeByte((std::byte)xx); - dos->writeByte((std::byte)yy); - dos->writeByte((std::byte)zz); + dos->writeByte((byte)xx); + dos->writeByte((byte)yy); + dos->writeByte((byte)zz); } } diff --git a/Minecraft.World/FileInputStream.cpp b/Minecraft.World/FileInputStream.cpp index ca7e4ccb1..62173f47d 100644 --- a/Minecraft.World/FileInputStream.cpp +++ b/Minecraft.World/FileInputStream.cpp @@ -85,7 +85,7 @@ ssize_t ReadFile(int fd, void* buffer, size_t byteRead, DWORD* numberOfBytesRead //the next byte of data, or -1 if the end of the file is reached. int FileInputStream::read() { - byte byteRead = static_cast(0); + byte byteRead = static_cast(0); DWORD numberOfBytesRead; BOOL bSuccess = ReadFile( diff --git a/Minecraft.World/GameEventPacket.cpp b/Minecraft.World/GameEventPacket.cpp index 56dc6c3a1..64b36ff41 100644 --- a/Minecraft.World/GameEventPacket.cpp +++ b/Minecraft.World/GameEventPacket.cpp @@ -44,8 +44,8 @@ void GameEventPacket::read(DataInputStream *dis) //throws IOException void GameEventPacket::write(DataOutputStream *dos) //throws IOException { - dos->writeByte((std::byte)_event); - dos->writeByte((std::byte)param); + dos->writeByte((byte)_event); + dos->writeByte((byte)param); } void GameEventPacket::handle(PacketListener *listener) diff --git a/Minecraft.World/InteractPacket.cpp b/Minecraft.World/InteractPacket.cpp index fe2236c1f..16703955c 100644 --- a/Minecraft.World/InteractPacket.cpp +++ b/Minecraft.World/InteractPacket.cpp @@ -34,7 +34,7 @@ void InteractPacket::write(DataOutputStream *dos) // throws IOException { dos->writeInt(source); dos->writeInt(target); - dos->writeByte((std::byte)action); + dos->writeByte((byte)action); } void InteractPacket::handle(PacketListener *listener) diff --git a/Minecraft.World/KickPlayerPacket.cpp b/Minecraft.World/KickPlayerPacket.cpp index dc6576a05..eb679072c 100644 --- a/Minecraft.World/KickPlayerPacket.cpp +++ b/Minecraft.World/KickPlayerPacket.cpp @@ -28,7 +28,7 @@ void KickPlayerPacket::read(DataInputStream *dis) //throws IOException void KickPlayerPacket::write(DataOutputStream *dos) //throws IOException { - dos->writeByte((std::byte)m_networkSmallId); + dos->writeByte((byte)m_networkSmallId); } int KickPlayerPacket::getEstimatedSize() diff --git a/Minecraft.World/LevelEventPacket.cpp b/Minecraft.World/LevelEventPacket.cpp index 53644f3a0..ee5de2373 100644 --- a/Minecraft.World/LevelEventPacket.cpp +++ b/Minecraft.World/LevelEventPacket.cpp @@ -28,7 +28,7 @@ void LevelEventPacket::read(DataInputStream *dis) //throws IOException { type = dis->readInt(); x = dis->readInt(); - y = (int)(dis->readByte() & (std::byte)0xff); + y = (int)(dis->readByte() & (byte)0xff); z = dis->readInt(); data = dis->readInt(); } @@ -37,7 +37,7 @@ void LevelEventPacket::write(DataOutputStream *dos) //throws IOException { dos->writeInt(type); dos->writeInt(x); - dos->writeByte((std::byte)(y & 0xff)); + dos->writeByte((byte)(y & 0xff)); dos->writeInt(z); dos->writeInt(data); } diff --git a/Minecraft.World/ListTag.h b/Minecraft.World/ListTag.h index ade58a37c..ce65e87f7 100644 --- a/Minecraft.World/ListTag.h +++ b/Minecraft.World/ListTag.h @@ -15,7 +15,7 @@ public: void write(DataOutput *dos) { if (list.size() > 0) type = (list[0])->getId(); - else type = static_cast(1); + else type = static_cast(1); dos->writeByte(type); dos->writeInt((int)list.size()); diff --git a/Minecraft.World/LoginPacket.cpp b/Minecraft.World/LoginPacket.cpp index 935c5e8b7..92e998323 100644 --- a/Minecraft.World/LoginPacket.cpp +++ b/Minecraft.World/LoginPacket.cpp @@ -145,16 +145,16 @@ void LoginPacket::write(DataOutputStream *dos) //throws IOException } dos->writeLong(seed); dos->writeInt(gameType); - dos->writeByte((std::byte)dimension); - dos->writeByte((std::byte)mapHeight); - dos->writeByte((std::byte)maxPlayers); + dos->writeByte((byte)dimension); + dos->writeByte((byte)mapHeight); + dos->writeByte((byte)maxPlayers); dos->writePlayerUID(m_offlineXuid); dos->writePlayerUID(m_onlineXuid); dos->writeBoolean(m_friendsOnlyUGC); dos->writeInt(m_ugcPlayersVersion); - dos->writeByte((std::byte)difficulty); + dos->writeByte((byte)difficulty); dos->writeInt(m_multiplayerInstanceId); - dos->writeByte((std::byte)m_playerIndex); + dos->writeByte((byte)m_playerIndex); dos->writeInt(m_playerSkinId); dos->writeInt(m_playerCapeId); dos->writeBoolean(m_isGuest); diff --git a/Minecraft.World/MoveEntityPacket.cpp b/Minecraft.World/MoveEntityPacket.cpp index f2c648ed2..6eada2877 100644 --- a/Minecraft.World/MoveEntityPacket.cpp +++ b/Minecraft.World/MoveEntityPacket.cpp @@ -92,11 +92,11 @@ void MoveEntityPacket::PosRot::read(DataInputStream *dis) //throws IOException void MoveEntityPacket::PosRot::write(DataOutputStream *dos) //throws IOException { MoveEntityPacket::write(dos); - dos->writeByte((std::byte)xa); - dos->writeByte((std::byte)ya); - dos->writeByte((std::byte)za); - dos->writeByte((std::byte)yRot); - dos->writeByte((std::byte)xRot); + dos->writeByte((byte)xa); + dos->writeByte((byte)ya); + dos->writeByte((byte)za); + dos->writeByte((byte)yRot); + dos->writeByte((byte)xRot); } int MoveEntityPacket::PosRot::getEstimatedSize() @@ -126,9 +126,9 @@ void MoveEntityPacket::Pos::read(DataInputStream *dis) //throws IOException void MoveEntityPacket::Pos::write(DataOutputStream *dos) //throws IOException { MoveEntityPacket::write(dos); - dos->writeByte((std::byte)xa); - dos->writeByte((std::byte)ya); - dos->writeByte((std::byte)za); + dos->writeByte((byte)xa); + dos->writeByte((byte)ya); + dos->writeByte((byte)za); } int MoveEntityPacket::Pos::getEstimatedSize() @@ -158,8 +158,8 @@ void MoveEntityPacket::Rot::read(DataInputStream *dis) //throws IOException void MoveEntityPacket::Rot::write(DataOutputStream *dos) //throws IOException { MoveEntityPacket::write(dos); - dos->writeByte((std::byte)yRot); - dos->writeByte((std::byte)xRot); + dos->writeByte((byte)yRot); + dos->writeByte((byte)xRot); } int MoveEntityPacket::Rot::getEstimatedSize() diff --git a/Minecraft.World/MoveEntityPacketSmall.cpp b/Minecraft.World/MoveEntityPacketSmall.cpp index c45997110..c0a4399ec 100644 --- a/Minecraft.World/MoveEntityPacketSmall.cpp +++ b/Minecraft.World/MoveEntityPacketSmall.cpp @@ -146,7 +146,7 @@ void MoveEntityPacketSmall::Pos::write(DataOutputStream *dos) //throws IOExcepti short idAndY = id | ya << 11; dos->writeShort(idAndY); char XandZ = ( xa << 4 ) | ( za & 0x0f ); - dos->writeByte((std::byte)XandZ); + dos->writeByte((byte)XandZ); } int MoveEntityPacketSmall::Pos::getEstimatedSize() diff --git a/Minecraft.World/Packet.cpp b/Minecraft.World/Packet.cpp index 0a59204c2..70bbe83dd 100644 --- a/Minecraft.World/Packet.cpp +++ b/Minecraft.World/Packet.cpp @@ -6,10 +6,11 @@ #include "PacketListener.h" #include "Packet.h" #include "com.mojang.nbt.h" +#include "../Minecraft.Client/Windows64/Windows64_App.h" #ifndef _CONTENT_PACKAGE -#include "..\Minecraft.Client\Minecraft.h" -#include "..\Minecraft.Client\Gui.h" +#include "../Minecraft.Client/Minecraft.h" +#include "../Minecraft.Client/Gui.h" #endif void Packet::staticCtor() diff --git a/Minecraft.World/Tag.h b/Minecraft.World/Tag.h index 4c96b9812..7b4ec38e8 100644 --- a/Minecraft.World/Tag.h +++ b/Minecraft.World/Tag.h @@ -7,18 +7,18 @@ using namespace std; class Tag { public: - static const byte TAG_End = static_cast(0); - static const byte TAG_Byte = static_cast(1); - static const byte TAG_Short = static_cast(2); - static const byte TAG_Int = static_cast(3); - static const byte TAG_Long = static_cast(4); - static const byte TAG_Float = static_cast(5); - static const byte TAG_Double = static_cast(6); - static const byte TAG_Byte_Array = static_cast(7); - static const byte TAG_String = static_cast(8); - static const byte TAG_List = static_cast(9); - static const byte TAG_Compound = static_cast(10); - static const byte TAG_Int_Array = static_cast(11); + static const byte TAG_End = static_cast(0); + static const byte TAG_Byte = static_cast(1); + static const byte TAG_Short = static_cast(2); + static const byte TAG_Int = static_cast(3); + static const byte TAG_Long = static_cast(4); + static const byte TAG_Float = static_cast(5); + static const byte TAG_Double = static_cast(6); + static const byte TAG_Byte_Array = static_cast(7); + static const byte TAG_String = static_cast(8); + static const byte TAG_List = static_cast(9); + static const byte TAG_Compound = static_cast(10); + static const byte TAG_Int_Array = static_cast(11); private: wstring name; diff --git a/Minecraft.World/x64headers/extraX64.h b/Minecraft.World/x64headers/extraX64.h index 59b85bb56..4ee5a6cb9 100644 --- a/Minecraft.World/x64headers/extraX64.h +++ b/Minecraft.World/x64headers/extraX64.h @@ -441,7 +441,7 @@ const int QNET_SENDDATA_SEQUENTIAL = 0; struct XRNM_SEND_BUFFER { DWORD dwDataSize; - std::byte *pbyData; + byte *pbyData; }; const int D3DBLEND_CONSTANTALPHA = 0;