summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-18 00:00:03 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-18 00:00:03 +0100
commit464ec47eb7bf61ca1e9c2af6559ad2225038d06e (patch)
treed9c839c7fde5b3a200153e9cae8338d297784622 /src/Protocol/Protocol17x.cpp
parentMerge pull request #684 from narroo/Bug402 (diff)
downloadcuberite-464ec47eb7bf61ca1e9c2af6559ad2225038d06e.tar
cuberite-464ec47eb7bf61ca1e9c2af6559ad2225038d06e.tar.gz
cuberite-464ec47eb7bf61ca1e9c2af6559ad2225038d06e.tar.bz2
cuberite-464ec47eb7bf61ca1e9c2af6559ad2225038d06e.tar.lz
cuberite-464ec47eb7bf61ca1e9c2af6559ad2225038d06e.tar.xz
cuberite-464ec47eb7bf61ca1e9c2af6559ad2225038d06e.tar.zst
cuberite-464ec47eb7bf61ca1e9c2af6559ad2225038d06e.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol17x.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index f7d13774d..57a56d1a4 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -23,6 +23,7 @@ Implements the 1.7.x protocol classes:
#include "../Entities/FallingBlock.h"
#include "../Entities/Pickup.h"
#include "../Entities/Player.h"
+#include "../Entities/ItemFrame.h"
#include "../Mobs/IncludeAllMonsters.h"
#include "../UI/Window.h"
#include "../BlockEntities/CommandBlockEntity.h"
@@ -923,8 +924,8 @@ void cProtocol172::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
Pkt.WriteFPInt(a_Entity.GetPosX());
Pkt.WriteFPInt(a_Entity.GetPosY());
Pkt.WriteFPInt(a_Entity.GetPosZ());
- Pkt.WriteByteAngle(a_Entity.GetYaw());
Pkt.WriteByteAngle(a_Entity.GetPitch());
+ Pkt.WriteByteAngle(a_Entity.GetYaw());
Pkt.WriteInt(a_ObjectData);
if (a_ObjectData != 0)
{
@@ -946,8 +947,8 @@ void cProtocol172::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleTyp
Pkt.WriteFPInt(a_Vehicle.GetPosX());
Pkt.WriteFPInt(a_Vehicle.GetPosY());
Pkt.WriteFPInt(a_Vehicle.GetPosZ());
- Pkt.WriteByteAngle(a_Vehicle.GetYaw());
Pkt.WriteByteAngle(a_Vehicle.GetPitch());
+ Pkt.WriteByteAngle(a_Vehicle.GetYaw());
Pkt.WriteInt(a_VehicleSubType);
if (a_VehicleSubType != 0)
{
@@ -2391,6 +2392,16 @@ void cProtocol172::cPacketizer::WriteEntityMetadata(const cEntity & a_Entity)
WriteMobMetadata((const cMonster &)a_Entity);
break;
}
+ case cEntity::etItemFrame:
+ {
+ cItemFrame & Frame = (cItemFrame &)a_Entity;
+ WriteByte(0xA2);
+ WriteItem(Frame.GetItem());
+ WriteByte(0x3);
+ WriteByte(Frame.GetRotation());
+ break;
+ }
+ default: break;
}
}
@@ -2575,6 +2586,7 @@ void cProtocol172::cPacketizer::WriteMobMetadata(const cMonster & a_Mob)
WriteInt(Horse.GetHorseArmour());
break;
}
+ default: break;
} // switch (a_Mob.GetType())
}