Implemented item frames, a part of #689
+ Implemented Item Frames * Fixed Pitch and Yaw being wrongly flipped in the protocol (XOFT!)
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user