diff --git a/Minecraft.World/EntityActionAtPositionPacket.cpp b/Minecraft.World/EntityActionAtPositionPacket.cpp index 7353f9329..a68716f9b 100644 --- a/Minecraft.World/EntityActionAtPositionPacket.cpp +++ b/Minecraft.World/EntityActionAtPositionPacket.cpp @@ -30,18 +30,18 @@ EntityActionAtPositionPacket::EntityActionAtPositionPacket(shared_ptr e, void EntityActionAtPositionPacket::read(DataInputStream *dis) //throws IOException { id = dis->readInt(); - action = dis->readByte(); + action = (int)dis->readByte(); x = dis->readInt(); - y = dis->readByte(); + y = (int)dis->readByte(); z = dis->readInt(); } void EntityActionAtPositionPacket::write(DataOutputStream *dos) //throws IOException { dos->writeInt(id); - dos->writeByte(action); + dos->writeByte((std::byte)action); dos->writeInt(x); - dos->writeByte(y); + dos->writeByte((std::byte)y); dos->writeInt(z); } diff --git a/Minecraft.World/EntityEventPacket.cpp b/Minecraft.World/EntityEventPacket.cpp index e92d76926..0a0c77915 100644 --- a/Minecraft.World/EntityEventPacket.cpp +++ b/Minecraft.World/EntityEventPacket.cpp @@ -9,7 +9,7 @@ EntityEventPacket::EntityEventPacket() { entityId = 0; - eventId = 0; + eventId = (std::byte)0; } EntityEventPacket::EntityEventPacket(int entityId, byte eventId) diff --git a/Minecraft.World/ExplodePacket.cpp b/Minecraft.World/ExplodePacket.cpp index aec5b2610..b1a5f031e 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(xx); - dos->writeByte(yy); - dos->writeByte(zz); + dos->writeByte((std::byte)xx); + dos->writeByte((std::byte)yy); + dos->writeByte((std::byte)zz); } } @@ -133,4 +133,4 @@ float ExplodePacket::getKnockbackY() float ExplodePacket::getKnockbackZ() { return knockbackZ; -} \ No newline at end of file +} diff --git a/Minecraft.World/GameCommandPacket.cpp b/Minecraft.World/GameCommandPacket.cpp index 98cdd3121..c5e2ca118 100644 --- a/Minecraft.World/GameCommandPacket.cpp +++ b/Minecraft.World/GameCommandPacket.cpp @@ -3,6 +3,7 @@ #include "PacketListener.h" #include "BasicTypeContainers.h" #include "GameCommandPacket.h" +#include "../Minecraft.Client/Windows64/Windows64_App.h" GameCommandPacket::GameCommandPacket() { @@ -69,4 +70,4 @@ void GameCommandPacket::handle(PacketListener *listener) int GameCommandPacket::getEstimatedSize() { return 2 + 2 + length; -} \ No newline at end of file +} diff --git a/Minecraft.World/GameEventPacket.cpp b/Minecraft.World/GameEventPacket.cpp index a85d5fe07..6ed5324d6 100644 --- a/Minecraft.World/GameEventPacket.cpp +++ b/Minecraft.World/GameEventPacket.cpp @@ -38,14 +38,14 @@ GameEventPacket::GameEventPacket(int _event, int param) void GameEventPacket::read(DataInputStream *dis) //throws IOException { - _event = dis->readByte(); - param = dis->readByte(); + _event = (int)dis->readByte(); + param = (int)dis->readByte(); } void GameEventPacket::write(DataOutputStream *dos) //throws IOException { - dos->writeByte(_event); - dos->writeByte(param); + dos->writeByte((std::byte)_event); + dos->writeByte((std::byte)param); } void GameEventPacket::handle(PacketListener *listener)