mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-24 06:55:47 +00:00
fix: remove byte type alias
This commit is contained in:
@@ -14,8 +14,8 @@ AddMobPacket::AddMobPacket()
|
||||
x = 0;
|
||||
y = 0;
|
||||
z = 0;
|
||||
yRot = static_cast<byte>(0);
|
||||
xRot = static_cast<byte>(0);
|
||||
yRot = static_cast<uint8_t>(0);
|
||||
xRot = static_cast<uint8_t>(0);
|
||||
entityData = nullptr;
|
||||
unpack = NULL;
|
||||
}
|
||||
@@ -36,12 +36,12 @@ AddMobPacket::AddMobPacket(shared_ptr<Mob> 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<byte>(yRotp);
|
||||
xRot = static_cast<byte>(xRotp);
|
||||
yHeadRot = static_cast<byte>(yHeadRotp);
|
||||
// yRot = (byte) (mob->yRot * 256 / 360);
|
||||
// xRot = (byte) (mob->xRot * 256 / 360);
|
||||
// yHeadRot = (byte) (mob->yHeadRot * 256 / 360);
|
||||
yRot = static_cast<uint8_t>(yRotp);
|
||||
xRot = static_cast<uint8_t>(xRotp);
|
||||
yHeadRot = static_cast<uint8_t>(yHeadRotp);
|
||||
// yRot = (uint8_t) (mob->yRot * 256 / 360);
|
||||
// xRot = (uint8_t) (mob->xRot * 256 / 360);
|
||||
// yHeadRot = (uint8_t) (mob->yHeadRot * 256 / 360);
|
||||
|
||||
// From SetEntityMotionpacket
|
||||
double m = 3.9;
|
||||
@@ -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<byte>(type & 0xff));
|
||||
dos->writeByte(static_cast<uint8_t>(type & 0xff));
|
||||
#ifdef _LARGE_WORLDS
|
||||
dos->writeInt(x);
|
||||
dos->writeInt(y);
|
||||
|
||||
Reference in New Issue
Block a user